mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
13 lines
461 B
Zig
13 lines
461 B
Zig
pub fn WriteWrap(comptime Container: type, comptime writeFn: anytype) type {
|
|
return struct {
|
|
pub fn write(this: *Container, context: anytype) AnyPostgresError!void {
|
|
const Context = @TypeOf(context);
|
|
try writeFn(this, Context, NewWriter(Context){ .wrapped = context });
|
|
}
|
|
};
|
|
}
|
|
|
|
const AnyPostgresError = @import("../AnyPostgresError.zig").AnyPostgresError;
|
|
|
|
const NewWriter = @import("./NewWriter.zig").NewWriter;
|