mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-19 03:10:10 -06:00
24 lines
399 B
Ruby
24 lines
399 B
Ruby
#!/usr/bin/ruby
|
|
|
|
require 'mysql'
|
|
|
|
user = ARGV[0]
|
|
port = ARGV[1]
|
|
db = ARGV[2]
|
|
|
|
queries = [
|
|
"create table test (pk int, `value` int, primary key(pk))",
|
|
"describe test",
|
|
"select * from test",
|
|
"insert into test (pk, `value`) values (0,0)",
|
|
"select * from test"
|
|
]
|
|
|
|
conn = Mysql::new("127.0.0.1", user, "", db, port)
|
|
queries.each do |query|
|
|
res = conn.query(query)
|
|
end
|
|
conn.close()
|
|
|
|
exit(0)
|