search for standard sites
pub-search.waow.tech
search
zig
blog
atproto
1const std = @import("std");
2
3const schema = @import("schema.zig");
4const result = @import("result.zig");
5
6// re-exports
7pub const Client = @import("Client.zig");
8pub const Row = result.Row;
9pub const Result = result.Result;
10pub const BatchResult = result.BatchResult;
11
12// global state
13var gpa: std.heap.GeneralPurposeAllocator(.{}) = .{};
14var client: ?Client = null;
15
16pub fn init() !void {
17 client = try Client.init(gpa.allocator());
18 try schema.init(&client.?);
19}
20
21pub fn getClient() ?*Client {
22 if (client) |*c| return c;
23 return null;
24}