import type { SqlClient } from "../../types.js"; import { FsStateBase } from "./state.js"; export declare class FsVersionBase extends FsStateBase { protected getVersionRootId(tx: SqlClient): Promise; protected createVersionRootRecord(tx: SqlClient, internalPath: string): Promise; protected assertCanCreateVersionRoot(tx: SqlClient, internalPath: string): Promise; protected ensureVersionRootInitialized(tx: SqlClient, internalPath: string): Promise; protected getCurrentVersionId(tx: SqlClient): Promise; /** * The id of this instance's labeled version, or null when the label has no * live version; caches the version root id on the way. A fresh instance * resolves both with one join instead of a root lookup and then a label * lookup. A missing root takes `getVersionRootId`'s path, which may create * the `/` root record or throw ENOTVERSIONED. */ private lookupLabeledVersionId; protected ensureVersion(tx: SqlClient): Promise; /** Resolve a label to a version ID in this workspace, or null if missing. */ protected getVersionIdByLabel(tx: SqlClient, label: string): Promise; protected requireVersionIdByLabel(tx: SqlClient, label: string): Promise; /** * Acquire transaction-scoped advisory locks for the given version IDs in * deterministic order (sorted ascending) to avoid deadlocks. Released at end * of transaction. */ protected lockVersions(tx: SqlClient, versionIds: number[]): Promise; /** * Find the lowest common ancestor (in the version graph) of `idA` and `idB`, * or `null` if they have no common ancestor. "Lowest" = smallest sum of * depths across the two ancestor chains, which is the version closest to * both endpoints. Used by `merge()` for three-way classification. */ protected findLCA(tx: SqlClient, idA: number, idB: number): Promise; /** * Count of visible (non-tombstone) entries across the entire workspace at * `versionId`. Used by batch operations to validate `maxFiles` once before * committing many writes, instead of re-checking after every write. */ protected globalVisibleCount(tx: SqlClient, versionId: number): Promise; } //# sourceMappingURL=version.d.ts.map