/** * SqliteQuintStore - SQLite implementation of QuintStore using Drizzle ORM */ import { BaseQuintStore, type QuintRow, type SqlExecutor } from './BaseQuintStore'; import type { NewQuintRow } from './schema'; import type { QuintStoreOptions, StoreStats, QuintPattern, QueryOptions, Quint, TermMatch } from './types'; import { type PredicateObjectDataType } from './value-types'; interface SqliteIndexedQuintRow extends NewQuintRow { graph: string; subject: string; predicate: string; object: string; vector: string | null; objectKind: PredicateObjectDataType; objectKey: string | null; objectText: string | null; objectDigest: string | null; } export interface SqliteQuintStoreOptions extends QuintStoreOptions { /** SQLite database file path, use ':memory:' for in-memory database */ path: string; } export declare class SqliteQuintStore extends BaseQuintStore { private sqlite; private readonly sqliteRuntime; private readonly path; constructor(options: SqliteQuintStoreOptions); protected createExecutor(): Promise; protected closeExecutor(): Promise; protected openOnce(): Promise; protected buildSelectQuery(pattern: QuintPattern, options?: QueryOptions): { sql: string; params: any[]; }; stats(): Promise; clear(): Promise; private ensureTypedObjectSchema; private addColumnIfMissing; private createTypedObjectIndexes; private backfillMissingObjectIndexFields; private sqliteSpaceStats; private estimateDatabaseBytes; private collectSpaceObjects; private estimateSpaceObjectsFromSchema; private estimatePageSize; private objectIndexForSerialized; private objectDigestForIndex; protected resolveObjectDataTypeForPattern(pattern: QuintPattern): PredicateObjectDataType | undefined; protected buildWhereClause(pattern: QuintPattern): { whereClause: string; params: any[]; }; protected addTermConditions(conditions: string[], params: any[], column: string, match: TermMatch | undefined, isObject: boolean): void; protected addAliasedConditions(conditions: string[], params: any[], alias: string, pattern: QuintPattern): void; private addObjectConditions; private addObjectExactCondition; private addObjectExactValueCondition; private addObjectExactSerializedCondition; private addObjectComparableCondition; private addObjectTextCondition; private addObjectLexicalStringCondition; private addObjectLanguageCondition; private objectLexicalSql; private objectPredicateForOperatorValue; private objectFieldsForOperatorValue; private objectIndexForTerm; private objectFieldsForPrefix; private assertComparableObject; private predicateForIndex; put(quint: Quint): Promise; multiPut(quintList: Quint[]): Promise; private writeStatementForRow; protected quintToRow(quint: Quint): SqliteIndexedQuintRow; protected rowToQuint(row: QuintRow): Quint; } export {};