refactor(postgres) improve postgres code base (#20808)

Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
This commit is contained in:
Ciro Spaciari
2025-07-07 18:41:01 -07:00
committed by GitHub
parent 19a855e02b
commit aa06455987
73 changed files with 5542 additions and 4995 deletions

View File

@@ -0,0 +1,20 @@
process_id: u32 = 0,
secret_key: u32 = 0,
pub const decode = DecoderWrap(BackendKeyData, decodeInternal).decode;
pub fn decodeInternal(this: *@This(), comptime Container: type, reader: NewReader(Container)) !void {
if (!try reader.expectInt(u32, 12)) {
return error.InvalidBackendKeyData;
}
this.* = .{
.process_id = @bitCast(try reader.int4()),
.secret_key = @bitCast(try reader.int4()),
};
}
// @sortImports
const BackendKeyData = @This();
const DecoderWrap = @import("./DecoderWrap.zig").DecoderWrap;
const NewReader = @import("./NewReader.zig").NewReader;