3 ms·
Ruby bindings are here: https://rubygems.org/gems/whitedb https://rubygems.org/gems/whitedb What has been done so far: * Create a database * Create a record
by joshguthrie 13y ago
Ruby bindings are here: https://rubygems.org/gems/whitedb https://rubygems.org/gems/whitedb
What has been done so far:
* Create a database
* Create a record
* Set field to a string
If you feel like testing it:
require "whitedb"
db = WhiteDB::Database.new("foo", 20000)
rec1 = db.create_record(5)
rec2 = db.create_record(4)
5.times{|x| rec1.set_field(x, "Rec1 #{x}") }
4.times{|x| rec2.set_field(x, "Rec2 #{x}") }
Then use the wgdb binary (`wgdb foo select 20`) to see your data in your database.
I'm still new to ruby C extensions so the API is quite ugly (no blocks yet, no error checks,...) and I'm currently adding features as I'm following the tutorial.