import type { LixEngine } from "../../engine/boot.js";
import type { LixChangeRaw } from "../../change/schema-definition.js";
import type { MaterializedState as MaterializedChange } from "../vtable/generate-commit.js";
/**
 * Updates the state cache v2 directly to physical tables, bypassing the virtual table.
 *
 * This function writes directly to per-schema SQLite tables instead of going through
 * the vtable for two critical performance reasons:
 *
 * 1. **Minimizes JS <-> WASM overhead**: Direct table access avoids the vtable's
 *    row-by-row callback mechanism that crosses the JS/WASM boundary for each row.
 *
 * 2. **Enables efficient batching**: Vtables only support per-row logic, preventing
 *    batch optimizations like prepared statements, transactions, and bulk operations.
 *    Direct access allows us to batch hundreds of rows in a single transaction.
 *
 * The vtable (schema.ts) remains read-only for SELECT queries, providing a unified
 * query interface while mutations bypass it for ~50% better performance.
 *
 * This function handles:
 * - Direct writes to per-schema physical tables for optimal performance
 * - Batch inserting/updating cache entries
 * - Deletion copy-down operations for inheritance
 * - Tombstone management
 *
 * @example
 * updateStateCache({
 *   engine,
 *   changes: [change1, change2],
 *   commit_id: "commit-123",
 *   version_id: "v1"
 * });
 */
export declare function updateStateCache(args: {
    engine: Pick<LixEngine, "executeSync" | "runtimeCacheRef" | "hooks">;
    changes: Array<LixChangeRaw | MaterializedChange>;
    commit_id?: string;
    version_id?: string;
}): void;
//# sourceMappingURL=update-state-cache.d.ts.map