class

Memo::Dialect::SQLite

Inherits Memo::Dialect::Base < Reference < Object

Constants

SCHEMA_SQL = {{ read_file("/tmp/tmp.BmppGM/src/src/memo/dialect/../../../db/schema/memo_schema.sql") }}

Instance methods

db_file_path(db : DB::Database) : String | Nil

Get the database file path from a connection, if applicable.

SQLite: reads pragma_database_list PostgreSQL: returns nil (no local file)

Source
embedding_rowid_column

The column name for embedding row identity used as USearch key.

SQLite: "rowid" (implicit) PostgreSQL: "eid" (explicit column)

Source
fts_delete(db : DB::Database, source_id : Int64)

Delete FTS index entry for a source.

Source
fts_join_sql

Build FTS JOIN clause for search queries.

Source
fts_upsert(db : DB::Database, source_id : Int64, content : String)

Insert or update FTS index for a source.

Source
fts_where_sql

Build FTS WHERE clause for match queries.

Source
insert_or_ignore_sql(table : String, columns : String, placeholders : String) : String

Build INSERT OR IGNORE SQL.

Source
insert_returning_id(db : DB::Database, sql : String, *args) : Int64

Execute an INSERT and return the generated ID.

Source
schema_statements

Get schema DDL statements.

Source
upsert_sql(table : String, columns : String, placeholders : String, conflict_columns : String, update_columns : Array(String)) : String

Build upsert SQL (INSERT OR REPLACE equivalent).

Source