Files
bun.sh/src/sql/postgres/protocol/ReadyForQuery.zig
pfg 83760fc446 Sort imports in all files (#21119)
Co-authored-by: taylor.fish <contact@taylor.fish>
2025-07-21 13:26:47 -07:00

20 lines
674 B
Zig

const ReadyForQuery = @This();
status: TransactionStatusIndicator = .I,
pub fn decodeInternal(this: *@This(), comptime Container: type, reader: NewReader(Container)) !void {
const length = try reader.length();
bun.assert(length >= 4);
const status = try reader.int(u8);
this.* = .{
.status = @enumFromInt(status),
};
}
pub const decode = DecoderWrap(ReadyForQuery, decodeInternal).decode;
const bun = @import("bun");
const DecoderWrap = @import("./DecoderWrap.zig").DecoderWrap;
const NewReader = @import("./NewReader.zig").NewReader;
const TransactionStatusIndicator = @import("./TransactionStatusIndicator.zig").TransactionStatusIndicator;