class
Memo::Dialect::SQLite
- Memo::Dialect::SQLite
- Memo::Dialect::Base
- Reference
- Object
Defined in:
memo/dialect/sqlite.crConstant Summary
-
SCHEMA_SQL =
{{ read_file("/srv/crystaldoc.info/github-trans-memo-v0.11.6/src/memo/dialect/../../../db/schema/memo_schema.sql") }}
Instance Method Summary
-
#db_file_path(db : DB::Database) : String | Nil
Get the database file path from a connection, if applicable.
-
#embedding_rowid_column : String
The column name for embedding row identity used as USearch key.
-
#fts_delete(db : DB::Database, source_id : Int64)
Delete FTS index entry for a source.
-
#fts_join_sql : String
Build FTS JOIN clause for search queries.
-
#fts_upsert(db : DB::Database, source_id : Int64, content : String)
Insert or update FTS index for a source.
-
#fts_where_sql : String
Build FTS WHERE clause for match queries.
-
#insert_or_ignore_sql(table : String, columns : String, placeholders : String) : String
Build INSERT OR IGNORE SQL.
-
#insert_returning_id(db : DB::Database, sql : String, *args) : Int64
Execute an INSERT and return the generated ID.
-
#schema_statements : Array(String)
Get schema DDL statements.
-
#upsert_sql(table : String, columns : String, placeholders : String, conflict_columns : String, update_columns : Array(String)) : String
Build upsert SQL (INSERT OR REPLACE equivalent).
Instance methods inherited from class Memo::Dialect::Base
db_file_path(db : DB::Database) : String | Nil
db_file_path,
embedding_rowid_column : String
embedding_rowid_column,
fts_delete(db : DB::Database, source_id : Int64)
fts_delete,
fts_join_sql : String
fts_join_sql,
fts_upsert(db : DB::Database, source_id : Int64, content : String)
fts_upsert,
fts_where_sql : String
fts_where_sql,
insert_or_ignore_sql(table : String, columns : String, placeholders : String) : String
insert_or_ignore_sql,
insert_returning_id(db : DB::Database, sql : String, *args) : Int64
insert_returning_id,
schema_statements : Array(String)
schema_statements,
upsert_sql(table : String, columns : String, placeholders : String, conflict_columns : String, update_columns : Array(String)) : String
upsert_sql
Instance Method Detail
Get the database file path from a connection, if applicable.
SQLite: reads pragma_database_list PostgreSQL: returns nil (no local file)
The column name for embedding row identity used as USearch key.
SQLite: "rowid" (implicit) PostgreSQL: "eid" (explicit column)
Delete FTS index entry for a source.
Build FTS JOIN clause for search queries.
Insert or update FTS index for a source.
Build FTS WHERE clause for match queries.
Build INSERT OR IGNORE SQL.
Execute an INSERT and return the generated ID.
Get schema DDL statements.
Build upsert SQL (INSERT OR REPLACE equivalent).