Ruby driver for MonetDB
First build a gem file starting from the given gemspec:
gem build monetdb-sql.gemspec
Or:
make
Then install the resulting gem with the command:
gem install --local monetdb-sql-1.2.gem
require_relative 'MonetDB'
conn = MonetDB.new
conn.connect(user = "monetdb", passwd = "monetdb", lang = "sql", host="127.0.0.1", port = 50000, database_connection_name = "demo", auth_type = "SHA1")
result =conn.query("SELECT 1")
result.each_record do |record|
puts record
end
A more extensive example can be found in /lib/example.rb