Memo::Dialect::Base
Abstract interface for SQL dialect differences between SQLite and PostgreSQL.
Most SQL in Memo is cross-database compatible. This module only abstracts the patterns that differ:
- Insert-and-return-ID (last_insert_rowid vs RETURNING)
- Conflict handling (INSERT OR IGNORE, INSERT OR REPLACE)
- Implicit rowid (SQLite) vs explicit column (PostgreSQL)
- FTS5 (SQLite) vs tsvector/GIN (PostgreSQL)
- Schema DDL (AUTOINCREMENT, BLOB, REAL types)
- DB path discovery (pragma vs connection string)
Instance methods
Get the database file path from a connection, if applicable.
SQLite: reads pragma_database_list PostgreSQL: returns nil (no local file)
embedding_rowid_column
The column name for embedding row identity used as USearch key.
SQLite: "rowid" (implicit) PostgreSQL: "eid" (explicit column)
Insert or update FTS index for a source.
Build INSERT OR IGNORE SQL.
Execute an INSERT and return the generated ID.