Module: Neighbor::SQLite

Defined in:
lib/neighbor/sqlite.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.initialize!Object

note: this is a public API (unlike PostgreSQL and MySQL)



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/neighbor/sqlite.rb', line 4

def self.initialize!
  return if defined?(@initialized)

  require_relative "type/sqlite_vector"
  require_relative "type/sqlite_int8_vector"

  require "sqlite_vec"
  require "active_record/connection_adapters/sqlite3_adapter"

  ActiveRecord::ConnectionAdapters::SQLite3Adapter.prepend(InstanceMethods)

  @initialized = true
end