Skip to documentation
SLOP

tiny.sql.RelationSchema

Reference tiny.sql RelationSchema

Defined in version.

API (6)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

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

zig
pub const RelationSchema = struct {    allocator: Allocator,    columns: []catalog_mod.ColumnDefinition,    indexes: []catalog_mod.IndexDefinition,    pub fn init(allocator: Allocator, columns: []const catalog_mod.ColumnDefinition, indexes: []const catalog_mod.IndexDefinition) Allocator.Error!RelationSchema {        const owned_columns = try allocator.alloc(catalog_mod.ColumnDefinition, columns.len);        var column_count: usize = 0;        errdefer {            for (owned_columns[0..column_count]) |*column| deinitColumn(allocator, column);            allocator.free(owned_columns);        }        for (columns, owned_columns) |column, *target| {            target.* = try cloneColumn(allocator, column);            column_count += 1;        }        const owned_indexes = try allocator.alloc(catalog_mod.IndexDefinition, indexes.len);        var index_count: usize = 0;        errdefer {            for (owned_indexes[0..index_count]) |*index| deinitIndex(allocator, index);            allocator.free(owned_indexes);        }        for (indexes, owned_indexes) |index, *target| {            target.* = try cloneIndex(allocator, index);            index_count += 1;        }        return .{            .allocator = allocator,            .columns = owned_columns,            .indexes = owned_indexes,        };    }    pub fn deinit(self: *RelationSchema) void {        for (self.columns) |*column| deinitColumn(self.allocator, column);        for (self.indexes) |*index| deinitIndex(self.allocator, index);        self.allocator.free(self.columns);        self.allocator.free(self.indexes);        self.* = undefined;    }    pub fn clone(self: *const RelationSchema, allocator: Allocator) Allocator.Error!RelationSchema {        return try RelationSchema.init(allocator, self.columns, self.indexes);    }};

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

zig
pub const RelationSchema = version.RelationSchema;
Called byCallsRelationRootcloneRelationSchemainitRelationSchemaclone
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsRelationRootdeinitversionrelationRootprivate sourcelib.sql.src.versionrelationRootMaintainedFromprivate sourcelib.sql.src.versiondeinitColumnprivate sourcelib.sql.src.versiondeinitIndexRelationSchemadeinit
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallsprivate sourcelib.sql.src.history.storetestingRelationSchemaRelationSchemacloneversionrelationRootprivate sourcelib.sql.src.versionrelationRootMaintainedFromprivate sourcelib.sql.src.versioncloneColumnprivate sourcelib.sql.src.versioncloneIndexprivate sourcelib.sql.src.versiondeinitColumnprivate sourcelib.sql.src.versiondeinitIndexRelationSchemainit
Static calls · unresolved targets: 0 · external targets: 2.

Audit

Definitions4
Public names8
Members3
Version26.7.0
Revisiondaab053ee433