Files
bun.sh/src/sql/postgres/protocol/CommandComplete.zig
Ciro Spaciari ecbf103bf5 feat(MYSQL) Bun.SQL mysql support (#21968)
### What does this PR do?
Add MySQL support, Refactor will be in a followup PR
### How did you verify your code works?
A lot of tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
2025-08-21 15:28:15 -07:00

25 lines
677 B
Zig

const CommandComplete = @This();
command_tag: Data = .{ .empty = {} },
pub fn deinit(this: *@This()) void {
this.command_tag.deinit();
}
pub fn decodeInternal(this: *@This(), comptime Container: type, reader: NewReader(Container)) !void {
const length = try reader.length();
bun.assert(length >= 4);
const tag = try reader.readZ();
this.* = .{
.command_tag = tag,
};
}
pub const decode = DecoderWrap(CommandComplete, decodeInternal).decode;
const bun = @import("bun");
const Data = @import("../../shared/Data.zig").Data;
const DecoderWrap = @import("./DecoderWrap.zig").DecoderWrap;
const NewReader = @import("./NewReader.zig").NewReader;