Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'drizzle'
- require 'drizzle/connection'
- host = "localhost"
- port = 4427
- db = "data_dictionary"
- con_opts = [ Drizzle::INJECTION_PREVENTION ]
- conn = Drizzle::Connection.new(host, port, db, con_opts)
- query_str = conn.randomize_query("select * from global_variables where variable_name = 'stad_key'")
- res = conn.query(query_str)
- res.buffer_result
- res.each do |row|
- puts "#{row[0]} : #{row[1]}"
- end
Add Comment
Please, Sign In to add comment