Adapter to connect to XTDB v2 using Sequel.
Install the gem and add to the application's Gemfile by executing:
bundle add sequel-xtdb
If bundler is not being used to manage dependencies, install the gem by executing:
gem install sequel-xtdb
Shortcut to happiness:
# Get a Ruby console using the sequel CLI
$ sequel 'xtdb://localhost:5432/xtdb'
# ..or from repl/your project
DB = Sequel.connect("xtdb://localhost:54321/xtdb")
# then
irb(main)> DB << "insert into products(_id, name, price) values(1, 'Spam', 1000), (2, 'Ham', 1200)"
irb(main)> DB["select * from products"].all
=> [{:_id=>2, :name=>"Ham", :price=>1200}, {:_id=>1, :name=>"Spam", :price=>1100}]
Very early days :)
Currently it's essentially the postgres-adapter with support for a xtdb-scheme url.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/eval/sequel-xtdb.
The gem is available as open source under the terms of the MIT License.