tiny.sql.Statement
Defined in tiny.sql.
API (10)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/sql/src/statement/ast.zig:145
zig
pub const Statement = union(enum) { insert: Insert, select: Select, update: Update, delete: Delete, create_table: CreateTable, create_index: CreateIndex, drop_table: DropTable, analyze: Analyze, pub fn deinit(self: *Statement, allocator: Allocator) void { switch (self.*) { .insert => |insert| { if (insert.columns) |columns| allocator.free(columns); allocator.free(insert.values); }, .select => |select| { switch (select.projection) { .all => {}, .columns => |columns| allocator.free(columns), } allocator.free(select.predicates); allocator.free(select.order); }, .update => |update| { allocator.free(update.assignments); allocator.free(update.predicates); }, .delete => |delete| allocator.free(delete.predicates), .create_table => |create_table| { for (create_table.indexes) |index| allocator.free(@constCast(index.fields)); allocator.free(create_table.indexes); allocator.free(create_table.columns); }, .create_index => |create_index| allocator.free(create_index.columns), .drop_table => {}, .analyze => {}, } self.* = undefined; } pub fn tableName(self: Statement) []const u8 { return switch (self) { .insert => |insert| insert.table, .select => |select| select.table, .update => |update| update.table, .delete => |delete| delete.table, .create_table => |create_table| create_table.table, .create_index => |create_index| create_index.table, .drop_table => |drop_table| drop_table.table, .analyze => |analyze| analyze.table, }; }};Source: lib/sql/src/root.zig:173
zig
pub const Statement = statement.Statement;Also reachable as
Audit
| Definitions | 3 |
|---|---|
| Public names | 6 |
| Members | 8 |
| Version | 26.7.0 |
| Revision | daab053ee433 |