We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d18d3a commit f6c17bfCopy full SHA for f6c17bf
examples/pg.zig
@@ -1,10 +1,11 @@
1
const pg = @import("pg");
2
const std = @import("std");
3
-const print = std.debug.print;
4
5
pub fn main() !void {
6
var gpa = std.heap.GeneralPurposeAllocator(.{}).init;
+ defer std.debug.assert(gpa.deinit() == .ok);
7
const allocator = gpa.allocator();
8
+
9
var pool = try pg.Pool.init(allocator, .{ .auth = .{
10
.username = std.mem.sliceTo(std.posix.getenv("USER").?, 0),
11
.database = "pgvector_zig_test",
@@ -27,6 +28,6 @@ pub fn main() !void {
27
28
defer result.deinit();
29
while (try result.next()) |row| {
30
const id = row.get(i64, 0);
- print("{d}\n", .{id});
31
+ std.debug.print("{d}\n", .{id});
32
}
33
0 commit comments