Skip to documentation
SLOP

tiny.sql.Connection

Reference tiny.sql Connection

Defined in connection.

API (34)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callsconnectionConnection
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/sql/src/connection.zig:120

zig
pub const Connection = struct {    catalog: catalog_mod.Catalog,    session: session_mod.DatabaseSession,    recovery_required: bool = false,    pub fn init(catalog: catalog_mod.Catalog, session: session_mod.DatabaseSession) Connection {        return .{            .catalog = catalog,            .session = session,        };    }    pub fn create(allocator: Allocator, database: *file.Database, history: *history_mod.History, options: Options) Error!Connection {        var catalog = try catalog_mod.Catalog.open(database, options.catalog);        var value = try version.databaseValue(            allocator,            &catalog,            version.ConflictRoot.empty().hash,        );        var value_live = true;        errdefer if (value_live) value.deinit();        const root_commit = version.Commit.init(value.root.hash, &.{});        try database.syncWal();        try publishDatabaseValue(history, &value);        try history.putCommit(root_commit);        _ = try history.createBranch(options.branch, root_commit.hash);        const checkout_value = try history.checkoutBranch(options.branch);        var root = value.intoRoot();        value_live = false;        const session = session_mod.DatabaseSession.initWithRoot(allocator, checkout_value, &root);        return Connection.init(catalog, session);    }    pub fn openLocal(allocator: Allocator, database: *file.Database, options: Options) Error!Connection {        const catalog = try catalog_mod.Catalog.open(database, options.catalog);        var root = try version.databaseRootMaintained(            allocator,            &catalog,            version.ConflictRoot.empty().hash,        );        errdefer root.deinit();        const root_commit = version.Commit.init(root.hash, &.{});        const checkout_value = branch_mod.checkout(.{            .name = options.branch,            .target = root_commit.hash,        }, root.hash);        return Connection.init(            catalog,            session_mod.DatabaseSession.initWithRoot(allocator, checkout_value, &root),        );    }    pub fn open(allocator: Allocator, database: *file.Database, history: *history_mod.History, options: Options) Error!Connection {        try recoverFastForward(allocator, database, history, options.catalog);        const catalog = try catalog_mod.Catalog.open(database, options.catalog);        const checkout_value = try history.checkoutBranch(options.branch);        var target = try history.databaseRoot(allocator, checkout_value.working.working);        defer target.deinit();        try history.validateConflictRoot(target.conflicts);        var root = try version.databaseRootMaintained(allocator, &catalog, target.conflicts);        errdefer root.deinit();        const live_checkout = checkout_value.withWorking(root.hash);        return Connection.init(catalog, session_mod.DatabaseSession.initWithRoot(allocator, live_checkout, &root));    }    pub fn adoptRebuiltHistory(self: *Connection, history: *history_mod.History, branch_name: []const u8) Error!void {        try self.ensureUsable();        std.debug.assert(history.len() == 0);        const allocator = self.session.allocator;        var value = try version.databaseValue(            allocator,            &self.catalog,            version.ConflictRoot.empty().hash,        );        var value_live = true;        errdefer if (value_live) value.deinit();        const root_commit = version.Commit.init(value.root.hash, &.{});        try self.catalog.database.syncWal();        try publishDatabaseValue(history, &value);        try history.putCommit(root_commit);        _ = try history.createBranch(branch_name, root_commit.hash);        const checkout_value = try history.checkoutBranch(branch_name);        var root = value.intoRoot();        value_live = false;        self.session.reinitWithRoot(checkout_value, &root);    }    pub fn deinit(self: *Connection) void {        self.session.deinit();        self.* = undefined;    }    pub fn lastRowId(self: *const Connection, allocator: Allocator, table_name: []const u8) Error!?i64 {        try self.ensureUsable();        var handle = try self.catalog.openRelation(allocator, table_name);        defer handle.deinit();        return try handle.relation.lastRowId();    }    pub fn prepare(self: *const Connection, allocator: Allocator, source: []const u8) statement_mod.Error!statement_mod.Prepared {        try self.ensureUsable();        return try statement_mod.prepare(&self.catalog, allocator, source);    }    pub fn execute(self: *Connection, allocator: Allocator, source: []const u8, options: ExecuteOptions) statement_mod.Error!statement_mod.Result {        var prepared = try self.prepare(allocator, source);        defer prepared.deinit();        return try self.executePrepared(&prepared, allocator, options);    }    pub fn executePrepared(self: *Connection, prepared: *statement_mod.Prepared, allocator: Allocator, options: ExecuteOptions) statement_mod.Error!statement_mod.Result {        try self.ensureUsable();        return try prepared.execute(allocator, options.statement(&self.session));    }    /// Opens a cursor over the rows `prepared` selects in `target`.    pub fn openCursor(        self: *Connection,        target: *statement_mod.Cursor,        prepared: *statement_mod.Prepared,        allocator: Allocator,    ) statement_mod.Error!void {        try self.ensureUsable();        try prepared.openCursor(target, allocator);    }    pub fn beginWrite(        self: *Connection,        workspace: *session_mod.DatabaseWrite.Workspace,        flush_allocator: Allocator,        options: WriteOptions,    ) session_mod.DatabaseError!session_mod.DatabaseWrite {        try self.ensureUsable();        return try self.session.beginWrite(            workspace,            flush_allocator,            options.limits,            options.commit(),        );    }    pub fn stage(self: *Connection) Error!void {        try self.ensureUsable();        self.session.stage();    }    pub fn commit(self: *Connection, history: *history_mod.History) Error!version.Hash {        try self.ensureUsable();        if (!self.session.checkout.working.hasStaged()) return error.NoStagedRoot;        try self.catalog.database.syncWal();        try self.publishStagedValue(history, self.session.checkout.working.staged);        return try self.session.commit(history);    }    pub fn commitLocal(self: *Connection) Error!version.Hash {        try self.ensureUsable();        if (!self.session.checkout.working.hasStaged()) return error.NoStagedRoot;        const root = self.session.checkout.working.staged;        const parents = [_]version.Hash{self.session.checkout.head};        const commit_value = version.Commit.init(root, &parents);        try self.session.advance(commit_value.hash, root);        return commit_value.hash;    }    pub fn mergeCommit(self: *Connection, history: *history_mod.History, theirs: version.Hash) Error!version.Hash {        try self.ensureUsable();        const root = self.session.checkout.working.working;        try self.catalog.database.syncWal();        try self.publishStagedValue(history, root);        const commit_hash = try history.mergeCommitBranch(self.session.checkout.name, root, theirs);        try self.session.advance(commit_hash, root);        return commit_hash;    }    pub fn createBranch(self: *const Connection, history: *history_mod.History, name: []const u8) history_mod.Error!version.Ref {        try self.ensureUsable();        return try history.createBranch(name, self.session.checkout.head);    }    pub fn checkoutBranch(self: *Connection, allocator: Allocator, history: *const history_mod.History, name: []const u8) Error!void {        try self.ensureUsable();        const checkout_value = try history.checkoutBranch(name);        var value = try history.databaseValue(allocator, checkout_value.working.working);        var value_live = true;        errdefer if (value_live) value.deinit();        try history.validateConflictRoot(value.root.conflicts);        try self.materializeDatabaseValue(allocator, &value, .{ .durability = .synced });        var root = value.intoRoot();        value_live = false;        self.session.reinitWithRoot(checkout_value, &root);    }    pub fn fastForwardBranch(self: *Connection, allocator: Allocator, history: *history_mod.History, target: version.Hash) Error!void {        try self.ensureUsable();        var next_ref = (try history.ref(self.session.checkout.name)) orelse return error.RefNotFound;        const baseline = try self.validateFastForwardBaseline(allocator, history, next_ref);        const entries = try history.commitEntries(allocator);        defer allocator.free(entries);        try branch_mod.fastForwardRef(allocator, entries, &next_ref, target);        const commit_value = try history.commitValue(target);        var value = try history.databaseValue(allocator, commit_value.root);        var value_live = true;        errdefer if (value_live) value.deinit();        try history.validateConflictRoot(value.root.conflicts);        var plan = try DatabaseMaterialization.init(self, allocator, &value);        defer plan.deinit();        try self.coordinateFastForward(            allocator,            history,            next_ref,            baseline,            &value,            &value_live,            &plan,        );    }    fn validateFastForwardBaseline(        self: *Connection,        allocator: Allocator,        history: *const history_mod.History,        current_ref: version.Ref,    ) Error!version.Hash {        if (!self.catalog.database.walSynced()) return error.WorkingSetChanged;        if (!version.same(current_ref.target, self.session.checkout.head)) return error.RefChanged;        const working = self.session.checkout.working;        if (!version.same(working.base, working.working) or            !version.same(working.base, working.staged) or            !version.same(working.base, self.session.workingRoot().hash) or            self.session.pendingRelations() != 0)        {            return error.WorkingSetChanged;        }        const current_commit = try history.commitValue(self.session.checkout.head);        if (!version.same(current_commit.root, working.base)) return error.WorkingSetChanged;        var live_root = try version.databaseRootMaintained(            allocator,            &self.catalog,            self.session.workingRoot().conflicts,        );        defer live_root.deinit();        if (!version.same(live_root.hash, working.base)) return error.WorkingSetChanged;        return working.base;    }    fn coordinateFastForward(        self: *Connection,        allocator: Allocator,        history: *history_mod.History,        next_ref: version.Ref,        baseline: version.Hash,        value: *version.DatabaseValue,        value_live: *bool,        plan: *DatabaseMaterialization,    ) Error!void {        try self.catalog.database.syncWal();        const savepoint = try self.catalog.database.savepoint();        try self.catalog.database.beginCoordinator();        var coordinator_active = true;        errdefer if (coordinator_active and !self.catalog.database.requiresRecovery()) {            self.catalog.database.endCoordinator();        };        var update = history.beginFastForward(            next_ref.name,            self.session.checkout.head,            next_ref.target,        ) catch |err| {            if (err == error.RecoveryRequired) {                self.poisonFastForward(history);                return error.RecoveryRequired;            }            self.catalog.database.endCoordinator();            coordinator_active = false;            return err;        };        plan.apply(self, .{ .durability = .synced }) catch |err| {            try self.restoreFastForward(history, &update, savepoint, baseline);            coordinator_active = false;            return err;        };        self.verifyMaterializedDatabaseRoot(allocator, &value.root) catch |err| {            try self.restoreFastForward(history, &update, savepoint, baseline);            coordinator_active = false;            return err;        };        update.commit() catch |err| {            if (err == error.RecoveryRequired) {                self.poisonFastForward(history);                return error.RecoveryRequired;            }            try self.restoreFastForward(history, &update, savepoint, baseline);            coordinator_active = false;            return err;        };        const checkout_value = branch_mod.checkout(next_ref, value.root.hash);        var root = value.intoRoot();        value_live.* = false;        self.session.reinitWithRoot(checkout_value, &root);        try self.completeFastForward(history, &update);        self.catalog.database.endCoordinator();        coordinator_active = false;    }    fn verifyMaterializedDatabaseRoot(        self: *Connection,        allocator: Allocator,        target: *const version.DatabaseRoot,    ) Error!void {        var names = try self.catalog.relationNames(allocator);        defer names.deinit();        if (names.names.len != target.entries.len) return error.InvalidHistory;        for (names.names) |name| {            const entry = relationEntry(target.entries, name) orelse return error.InvalidHistory;            var state = try self.catalog.readRelation(allocator, name);            defer state.deinit();            const live = try version.relationKey(name, &state.handle, state.relationStats());            if (!version.same(live.hash, entry.hash)) return error.InvalidHistory;        }        var verified = try version.databaseRootMaintained(            allocator,            &self.catalog,            target.conflicts,        );        defer verified.deinit();        if (!version.same(verified.hash, target.hash)) return error.InvalidHistory;    }    fn restoreFastForward(        self: *Connection,        history: *history_mod.History,        update: *history_mod.FastForwardUpdate,        savepoint: file.Savepoint,        baseline: version.Hash,    ) Error!void {        self.rollbackFastForward(update, savepoint, baseline) catch {            self.poisonFastForward(history);            return error.RecoveryRequired;        };    }    fn completeFastForward(        self: *Connection,        history: *history_mod.History,        update: *history_mod.FastForwardUpdate,    ) Error!void {        update.complete() catch |err| {            if (err != error.RecoveryRequired) update.complete() catch {                self.poisonFastForward(history);                return error.RecoveryRequired;            } else {                self.poisonFastForward(history);                return error.RecoveryRequired;            }        };    }    fn rollbackFastForward(        self: *Connection,        update: *history_mod.FastForwardUpdate,        savepoint: file.Savepoint,        baseline: version.Hash,    ) Error!void {        try self.catalog.database.restore(savepoint);        try self.catalog.database.syncWal();        var restored = try version.databaseRootMaintained(            self.session.allocator,            &self.catalog,            self.session.workingRoot().conflicts,        );        defer restored.deinit();        if (!version.same(restored.hash, baseline)) return error.RecoveryRequired;        try update.abort();        try update.complete();        self.catalog.database.endCoordinator();    }    fn poisonFastForward(self: *Connection, history: *history_mod.History) void {        self.recovery_required = true;        self.catalog.database.poison();        history.poison();    }    fn ensureUsable(self: *const Connection) error{RecoveryRequired}!void {        if (self.recovery_required or self.catalog.database.requiresRecovery()) {            return error.RecoveryRequired;        }    }    pub fn mergeBase(self: *const Connection, allocator: Allocator, history: *const history_mod.History, theirs: []const u8) history_mod.Error!?version.Hash {        try self.ensureUsable();        const theirs_ref = (try history.ref(theirs)) orelse return error.RefNotFound;        const entries = try history.commitEntries(allocator);        defer allocator.free(entries);        return try branch_mod.mergeBase(allocator, entries, self.session.checkout.head, theirs_ref.target);    }    pub fn relationView(self: *const Connection, allocator: Allocator, name: []const u8) Error!RelationView {        try self.ensureUsable();        var state = try self.catalog.readRelation(allocator, name);        errdefer state.handle.deinit();        defer if (state.stats) |*relation_stats| relation_stats.deinit();        var root = try version.relationRoot(            allocator,            name,            state.schema,            &state.handle,            state.relationStats(),        );        errdefer root.deinit();        return .{            .allocator = allocator,            .root = root,            .handle = state.handle,        };    }    pub fn databaseView(self: *const Connection, allocator: Allocator, history: *const history_mod.History, names: []const []const u8) Error!DatabaseView {        try self.ensureUsable();        var conflicts = try history.conflictArtifacts(allocator, self.session.workingRoot().conflicts);        errdefer conflicts.deinit();        const relations = try allocator.alloc(RelationView, names.len);        errdefer allocator.free(relations);        var relation_count: usize = 0;        errdefer for (relations[0..relation_count]) |*relation_view| relation_view.deinit();        const snapshots = try allocator.alloc(diff_mod.RelationSnapshot, names.len);        errdefer allocator.free(snapshots);        for (names, relations, snapshots) |name, *relation_view, *snapshot| {            relation_view.* = try self.relationView(allocator, name);            relation_count += 1;            snapshot.* = relation_view.snapshot();        }        return .{            .allocator = allocator,            .relations = relations,            .snapshots = snapshots,            .conflicts = conflicts,        };    }    pub fn databaseViewAtCommit(self: *const Connection, allocator: Allocator, history: *const history_mod.History, commit_hash: version.Hash) Error!DatabaseView {        try self.ensureUsable();        var root = try history.commitDatabaseRoot(allocator, commit_hash);        defer root.deinit();        return try databaseViewFromRoot(allocator, history, root);    }    pub fn diffRelation(self: *const Connection, allocator: Allocator, name: []const u8, other: diff_mod.RelationSnapshot) Error!diff_mod.RelationDiff {        try self.ensureUsable();        var local = try self.relationView(allocator, name);        defer local.deinit();        return try diff_mod.relation(allocator, local.snapshot(), other);    }    pub fn mergeDatabase(self: *Connection, allocator: Allocator, history: *history_mod.History, base: merge_mod.DatabaseSnapshot, theirs: merge_mod.DatabaseSnapshot, options: MergeOptions) Error!merge_mod.DatabaseMerge {        try self.ensureUsable();        var ours = try self.materializedWorkingValue(allocator);        defer ours.deinit();        var ours_conflicts = try history.conflictArtifacts(allocator, ours.root.conflicts);        defer ours_conflicts.deinit();        var result = try merge_mod.mergeDatabase(allocator, base, .{            .value = &ours,            .conflicts = .{                .root = ours_conflicts.root,                .artifacts = ours_conflicts.artifacts,            },        }, theirs);        errdefer result.deinit();        try self.materializeDatabaseMerge(allocator, history, &result, options.commit);        var root = try result.value.root.clone(self.session.allocator);        self.session.applyRoot(&root);        return result;    }    pub fn mergeBranch(self: *Connection, allocator: Allocator, history: *history_mod.History, theirs: []const u8, options: MergeOptions) Error!merge_mod.DatabaseMerge {        try self.ensureUsable();        const theirs_ref = (try history.ref(theirs)) orelse return error.RefNotFound;        const entries = try history.commitEntries(allocator);        defer allocator.free(entries);        const base_commit = (try branch_mod.mergeBase(allocator, entries, self.session.checkout.head, theirs_ref.target)) orelse return error.NoMergeBase;        var base_view = try self.databaseViewAtCommit(allocator, history, base_commit);        defer base_view.deinit();        var theirs_view = try self.databaseViewAtCommit(allocator, history, theirs_ref.target);        defer theirs_view.deinit();        return try self.mergeDatabase(allocator, history, base_view.snapshot(), theirs_view.snapshot(), options);    }    fn replaceConflictRoot(self: *Connection, conflicts: version.ConflictRoot) Error!version.Hash {        var root = try version.DatabaseRoot.initSorted(self.session.allocator, self.session.workingRoot().entries, conflicts);        self.session.applyRoot(&root);        return (try self.workingRoot());    }    pub fn conflictArtifacts(self: *const Connection, allocator: Allocator, history: *const history_mod.History) Error!history_mod.ConflictArtifacts {        try self.ensureUsable();        return try history.conflictArtifacts(allocator, self.session.workingRoot().conflicts);    }    pub fn resolveConflicts(self: *Connection, allocator: Allocator, history: *history_mod.History, resolved: []const version.Hash) Error!version.Hash {        try self.ensureUsable();        if (resolved.len == 0) return try self.workingRoot();        var entries = try history.conflictEntries(allocator, self.session.workingRoot().conflicts);        defer entries.deinit();        for (resolved) |hash| {            if (!hasConflictHash(entries.entries, hash)) return error.ConflictNotFound;        }        var remaining: std.ArrayList(version.ConflictEntry) = .empty;        defer remaining.deinit(allocator);        for (entries.entries) |entry| {            if (!hasConflictHashValue(resolved, entry.hash)) try remaining.append(allocator, entry);        }        const root = try history.putConflictRoot(remaining.items);        return try self.replaceConflictRoot(root);    }    pub fn checkout(self: *const Connection) Error!@import("branch.zig").Checkout {        try self.ensureUsable();        return self.session.checkout;    }    pub fn workingRoot(self: *const Connection) Error!version.Hash {        try self.ensureUsable();        return self.session.checkout.working.working;    }    fn relationViewFromRoot(allocator: Allocator, history: *const history_mod.History, root_hash: version.Hash) Error!RelationView {        var root = try history.relationRoot(allocator, root_hash);        errdefer root.deinit();        const rows = try history.relationRows(allocator, root_hash);        errdefer version.freeRelationRows(allocator, rows);        return .{            .allocator = allocator,            .root = root,            .rows = rows,        };    }    fn databaseViewFromRoot(allocator: Allocator, history: *const history_mod.History, root: version.DatabaseRoot) Error!DatabaseView {        var conflicts = try history.conflictArtifacts(allocator, root.conflicts);        errdefer conflicts.deinit();        const relations = try allocator.alloc(RelationView, root.entries.len);        errdefer allocator.free(relations);        var relation_count: usize = 0;        errdefer for (relations[0..relation_count]) |*relation_view| relation_view.deinit();        const snapshots = try allocator.alloc(diff_mod.RelationSnapshot, root.entries.len);        errdefer allocator.free(snapshots);        for (root.entries, relations, snapshots) |entry, *relation_view, *snapshot| {            relation_view.* = try relationViewFromRoot(allocator, history, entry.hash);            relation_count += 1;            snapshot.* = relation_view.snapshot();        }        return .{            .allocator = allocator,            .relations = relations,            .snapshots = snapshots,            .conflicts = conflicts,        };    }    fn materializeDatabaseValue(self: *Connection, allocator: Allocator, value: *const version.DatabaseValue, options: file.CommitOptions) Error!void {        var plan = try DatabaseMaterialization.init(self, allocator, value);        defer plan.deinit();        try plan.apply(self, options);    }    fn materializeDatabaseMerge(        self: *Connection,        allocator: Allocator,        history: *history_mod.History,        result: *const merge_mod.DatabaseMerge,        options: file.CommitOptions,    ) Error!void {        if (!version.same(result.value.root.conflicts, result.conflict_root.hash)) {            return error.InvalidHistory;        }        try result.persistConflicts(history);        try history.validateConflictRoot(result.value.root.conflicts);        try self.materializeDatabaseValue(allocator, &result.value, options);        try self.verifyMaterializedDatabaseRoot(allocator, &result.value.root);    }    fn publishStagedValue(self: *Connection, history: *history_mod.History, root: version.Hash) Error!void {        const allocator = self.session.allocator;        const working = self.session.workingRoot();        if (!version.same(working.hash, root)) return error.InvalidHistory;        try history.validateConflictRoot(working.conflicts);        var live_root = try version.databaseRootMaintained(            allocator,            &self.catalog,            working.conflicts,        );        defer live_root.deinit();        if (!version.same(live_root.hash, working.hash)) return error.InvalidHistory;        var batch = try history.beginWriteBatch();        errdefer batch.deinit();        var base_root: ?version.DatabaseRoot = null;        defer if (base_root) |*owned| owned.deinit();        base_root = history.commitDatabaseRoot(allocator, self.session.checkout.head) catch null;        for (working.entries) |entry| {            const base = self.publicationBase(&base_root, entry.name);            const need = try history.relationRowsNeed(allocator, entry.hash, base);            var state = try self.catalog.readRelation(allocator, entry.name);            defer state.deinit();            const live_key = try version.relationKey(                entry.name,                &state.handle,                state.relationStats(),            );            if (!version.same(live_key.hash, entry.hash)) return error.InvalidHistory;            if (need == .none and history.hasRelationRoot(entry.hash)) continue;            var relation_root = try version.relationRootMaintained(                allocator,                entry.name,                state.schema,                &state.handle,                state.relationStats(),            );            defer relation_root.deinit();            try history.putRelationRoot(relation_root);            switch (need) {                .none => {},                .full => {                    var writer = try history.beginRelationRows(entry.hash);                    defer writer.deinit();                    try streamRelationRows(&writer, allocator, &state.handle, null);                    try writer.finish();                },                .suffix => |plan| {                    var writer = try history.beginRelationRowsSuffix(entry.hash, base.?, plan);                    defer writer.deinit();                    try streamRelationRows(&writer, allocator, &state.handle, plan.boundary);                    try writer.finish();                },            }        }        try history.putDatabaseRoot(working.*);        try batch.finish();    }    fn streamRelationRows(        writer: *history_mod.RelationRowsWriter,        allocator: Allocator,        handle: *const catalog_mod.RelationHandle,        boundary: ?i64,    ) Error!void {        if (boundary) |value| {            if (value == std.math.maxInt(i64)) return;        }        const start: ?i64 = if (boundary) |value| value + 1 else null;        var scan: relation_mod.Scan = undefined;        try handle.relation.scan(&scan, allocator, start, null);        defer scan.deinit();        while (try scan.next()) |row_entry| try writer.append(row_entry.rowid, row_entry.bytes);    }    fn publicationBase(self: *const Connection, base_root: *const ?version.DatabaseRoot, name: []const u8) ?history_mod.IncrementalBase {        const root = base_root.* orelse return null;        const edited = self.session.pendingEditRowids(root.hash, name) orelse return null;        for (root.entries) |entry| {            if (std.mem.eql(u8, entry.name, name)) return .{ .root = entry.hash, .edited = edited };        }        return null;    }    pub fn materializedWorkingValue(self: *Connection, allocator: Allocator) Error!version.DatabaseValue {        try self.ensureUsable();        const working = self.session.workingRoot();        return try version.databaseValue(allocator, &self.catalog, working.conflicts);    }};

Source: lib/sql/src/root.zig:77

zig
pub const Connection = connection.Connection;
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableprivate sourcelib.sql.src.connectionpublishDatabaseValueCommitinitConflictRootemptyversiondatabaseValueConnectionadoptRebuiltHistory
Static calls · unresolved targets: 0 · external targets: 8.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionbeginWrite
Static calls · unresolved targets: 0 · external targets: 2.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectioncheckout
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableprivate sourcelib.sql.src.connection.ConnectionmaterializeDatabaseValueConnectioncheckoutBranch
Static calls · unresolved targets: 0 · external targets: 6.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableprivate sourcelib.sql.src.connection.ConnectionpublishStagedValueConnectioncommit
Static calls · unresolved targets: 0 · external targets: 3.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableCommitinitConnectioncommitLocal
Static calls · unresolved targets: 0 · external targets: 2.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionconflictArtifacts
Static calls · unresolved targets: 0 · external targets: 2.
Called byCallsprivate sourcelib.sql.src.connection.TestingConnectioninittest sourcelib.sql.src.connectiontest: connection checkout creates mis...test sourcelib.sql.src.connectiontest: connection checkout discards qu...test sourcelib.sql.src.connectiontest: connection checkout drops relat...test sourcelib.sql.src.connectiontest: connection checkout recreates s...+8 moreConnectioninitprivate sourcelib.sql.src.connectionpublishDatabaseValueCommitinitConflictRootemptyversiondatabaseValueConnectioncreate
Static calls · unresolved targets: 0 · external targets: 8.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectioncreateBranch
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionrelationViewConnectiondatabaseView
Static calls · unresolved targets: 0 · external targets: 7.
Called byCallsConnectionmergeBranchprivate sourcelib.sql.src.connection.ConnectiondatabaseViewFromRootprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectiondatabaseViewAtCommit
Static calls · unresolved targets: 0 · external targets: 2.
Called byCallsNo direct callsprivate sourcelib.sql.src.connection.TestingConnectiondeinitprivate sourcelib.sql.src.connectionrecoverFastForwardConnectiondeinit
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionrelationViewConnectiondiffRelation
Static calls · unresolved targets: 0 · external targets: 3.
Called byCallsNo direct callersConnectionexecutePreparedConnectionprepareConnectionexecute
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsConnectionexecuteprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionexecutePrepared
Static calls · unresolved targets: 0 · external targets: 2.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectioncoordinateFastForwardprivate sourcelib.sql.src.connection.ConnectionensureUsableprivate sourcelib.sql.src.connection.ConnectionvalidateFastForwardBaselineprivate sourcelib.sql.src.connection.DatabaseMaterializationdeinitprivate sourcelib.sql.src.connection.DatabaseMaterializationinitConnectionfastForwardBranch
Static calls · unresolved targets: 0 · external targets: 8.
Called byCallsNo direct callsConnectioncreateConnectionopenConnectionopenLocalprivate sourcelib.sql.src.connectionrecoverFastForwardConnectioninit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionlastRowId
Static calls · unresolved targets: 0 · external targets: 3.
Called byCallsConnectionmergeDatabaseprivate sourcelib.sql.src.connection.ConnectionensureUsableversiondatabaseValueConnectionmaterializedWorkingValue
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionmergeBase
Static calls · unresolved targets: 0 · external targets: 4.
Called byCallsNo direct callersConnectiondatabaseViewAtCommitprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionmergeDatabaseConnectionmergeBranch
Static calls · unresolved targets: 0 · external targets: 8.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableprivate sourcelib.sql.src.connection.ConnectionpublishStagedValueConnectionmergeCommit
Static calls · unresolved targets: 0 · external targets: 3.
Called byCallsConnectionmergeBranchprivate sourcelib.sql.src.connection.ConnectionensureUsableprivate sourcelib.sql.src.connection.ConnectionmaterializeDatabaseMergeConnectionmaterializedWorkingValueConnectionmergeDatabase
Static calls · unresolved targets: 0 · external targets: 7.
Called byCallstest sourcelib.sql.src.connectiontest: connection checkout creates mis...test sourcelib.sql.src.connectiontest: connection checkout recreates s...test sourcelib.sql.src.connectiontest: connection executes statement w...test sourcelib.sql.src.connectiontest: connection open repairs committ...test sourcelib.sql.src.connectiontest: connection open repairs pending...test sourcelib.sql.src.connectiontest: connection open seeds first wri...Connectioninitprivate sourcelib.sql.src.connectionrecoverFastForwardversiondatabaseRootMaintainedConnectionopen
Static calls · unresolved targets: 0 · external targets: 8.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionopenCursor
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallstest sourcelib.sql.src.connectiontest: local connection commits the ma...ConnectioninitCommitinitConflictRootemptyversiondatabaseRootMaintainedConnectionopenLocal
Static calls · unresolved targets: 0 · external targets: 4.
Called byCallsConnectionexecuteprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionprepare
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsConnectiondatabaseViewConnectiondiffRelationprivate sourcelib.sql.src.connection.ConnectionensureUsableversionrelationRootConnectionrelationView
Static calls · unresolved targets: 0 · external targets: 5.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableprivate sourcelib.sql.src.connection.ConnectionreplaceConflictRootConnectionworkingRootprivate sourcelib.sql.src.connectionhasConflictHashprivate sourcelib.sql.src.connectionhasConflictHashValueConnectionresolveConflicts
Static calls · unresolved targets: 1 · external targets: 5.
Called byCallsNo direct callersprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionstage
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsprivate sourcelib.sql.src.connection.ConnectionreplaceConflictRootConnectionresolveConflictsprivate sourcelib.sql.src.connection.ConnectionensureUsableConnectionworkingRoot
Static calls · unresolved targets: 0 · external targets: 0.

Complete caller list for Connection.create

13 direct callers.

Audit

Definitions32
Public names64
Members3
Version26.7.0
Revisiondaab053ee433