Skip to documentation
SLOP

tiny.sql.RelationRoot

Reference tiny.sql RelationRoot

Defined in version.

API (12)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

Source: lib/sql/src/version.zig:99

zig
pub const RelationRoot = struct {    allocator: Allocator,    format: u32 = format_version,    name: []u8,    catalog: catalog_mod.Schema,    schema: Hash,    schema_descriptor: RelationSchema,    table: MapRoot,    indexes: []IndexRoot,    stats: StatsRoot,    hash: Hash,    pub fn deinit(self: *RelationRoot) void {        self.table.deinit();        for (self.indexes) |*index| index.deinit();        self.allocator.free(self.indexes);        self.schema_descriptor.deinit();        self.allocator.free(self.name);        self.* = undefined;    }    pub fn clone(self: *const RelationRoot, allocator: Allocator) Allocator.Error!RelationRoot {        const name = try allocator.dupe(u8, self.name);        errdefer allocator.free(name);        var table = try self.table.clone(allocator);        errdefer table.deinit();        const indexes = try allocator.alloc(IndexRoot, self.indexes.len);        var index_count: usize = 0;        errdefer {            for (indexes[0..index_count]) |*index| index.deinit();            allocator.free(indexes);        }        for (self.indexes, indexes) |index, *target| {            target.* = try index.clone(allocator);            index_count += 1;        }        var schema_descriptor = try self.schema_descriptor.clone(allocator);        errdefer schema_descriptor.deinit();        return .{            .allocator = allocator,            .format = self.format,            .name = name,            .catalog = self.catalog,            .schema = self.schema,            .schema_descriptor = schema_descriptor,            .table = table,            .indexes = indexes,            .stats = self.stats,            .hash = self.hash,        };    }};

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

zig
pub const RelationRoot = version.RelationRoot;
Called byCallsRelationValuecloneRelationSchemacloneRelationRootclone
Static calls · unresolved targets: 1 · external targets: 7.
Called byCallsConnectionRelationViewdeinitprivate sourcelib.sql.src.history.record.MaterializedRelati...deinitHistoryrelationRootprivate sourcelib.sql.src.session.database.StagedRelationdeinitRelationSessiondeinit+2 moreRelationSchemadeinitRelationRootdeinit
Static calls · unresolved targets: 2 · external targets: 1.

Complete caller list for RelationRoot.deinit

7 direct callers.

Audit

Definitions3
Public names6
Members10
Version26.7.0
Revisiondaab053ee433