import { createTreecrdtSqliteAdapter } from '@treecrdt/interface/sqlite';
import { dbGetText } from './sql.js';
function createRunner(db) {
    return {
        exec: (sql) => db.exec(sql),
        getText: (sql, params = []) => dbGetText(db, sql, params ?? []),
    };
}
export function createWaSqliteApi(db, opts = {}) {
    return createTreecrdtSqliteAdapter(createRunner(db), opts);
}
