tiny.sql.RelationRoot
Defined in version.
API (12)
Actions
Public operations.
Fields and members
Public fields and members.
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;Complete caller list for RelationRoot.deinit
7 direct callers.
tiny.sql.ConnectionRelationView.deinit[method] atlib/sql/src/connection.zig:87lib.sql.src.history.record.MaterializedRelationRoot.deinit[method] — private source atlib/sql/src/history/record.zig:47in nearest public ownerlib.sql.src.history.recordtiny.sql.History.relationRoot[method] atlib/sql/src/history/store.zig:1005lib.sql.src.session.database.StagedRelation.deinit[method] — private source atlib/sql/src/session/database.zig:444in nearest public ownerlib.sql.src.session.databasetiny.sql.RelationSession.deinit[method] atlib/sql/src/session/relation.zig:82tiny.sql.RelationSession.refresh[method] atlib/sql/src/session/relation.zig:140tiny.sql.RelationValue.deinit[method] atlib/sql/src/version.zig:166
Audit
| Definitions | 3 |
|---|---|
| Public names | 6 |
| Members | 10 |
| Version | 26.7.0 |
| Revision | daab053ee433 |