Skip to content
On this page

sqlite-vss with Ruby

Gem

WARNING

The Ruby bindings for sqlite-vss are still in beta and are subject to change. If you come across problems, please comment on this Ruby tracking issue.

Ruby developers can use sqlite-vss with the sqlite-vss Gem.

bash
gem install sqlite-vss

You can then use SqliteVss.load() to load sqlite-vss SQL functions in a given SQLite connection.

ruby
require 'sqlite3'
require 'sqlite_vss'

db = SQLite3::Database.new(':memory:')
db.enable_load_extension(true)
SqliteVss.load(db)
db.enable_load_extension(false)

result = db.execute('SELECT vss_version()')
puts result.first.first

Checkout the API Reference for all available SQL functions.

Also see Making SQLite extensions gem install-able (June 2023) for more information on how gem install'able SQLite extensions work.

MIT License