@@ -78,7 +78,6 @@ For example:
7878- Written in pure Zig with a simple API
7979- Implements semi-naive evaluation for efficient recursive query processing
8080- Uses immutable, sorted, and deduplicated relations as core data structures
81- - Supports parallel execution for joins and variable updates
8281- Provides primitives for multi-way joins, anti-joins, secondary indexes, and aggregation
8382
8483See [ ROADMAP.md] ( ROADMAP.md ) for the list of implemented and planned features.
@@ -130,10 +129,10 @@ const std = @import("std");
130129const zodd = @import("zodd");
131130
132131pub fn main() !void {
133- var gpa = std.heap.GeneralPurposeAllocator (.{}){};
132+ var gpa = std.heap.DebugAllocator (.{}){};
134133 defer _ = gpa.deinit();
135134 const allocator = gpa.allocator();
136- var ctx = try zodd.ExecutionContext.initWithThreads (allocator, 4 );
135+ var ctx = zodd.ExecutionContext.init (allocator);
137136 defer ctx.deinit();
138137
139138 const Edge = struct { u32, u32 };
@@ -155,13 +154,13 @@ pub fn main() !void {
155154
156155 // Fixed-point iteration: reachable(X,Z) :- reachable(X,Y), edge(Y,Z)
157156 while (try reachable.changed()) {
158- var new_tuples = std.ArrayList(Edge).init(allocator) ;
159- defer new_tuples.deinit();
157+ var new_tuples: std.ArrayList(Edge) = .empty ;
158+ defer new_tuples.deinit(allocator );
160159
161160 for (reachable.recent.elements) |r| {
162161 for (edges.elements) |e| {
163162 if (e[0] == r[1]) {
164- try new_tuples.append(.{ r[0], e[1] });
163+ try new_tuples.append(allocator, .{ r[0], e[1] });
165164 }
166165 }
167166 }
0 commit comments