From 24439a295ca80a3b9a9e65d8b3436859d4ada46a Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Sun, 24 Sep 2023 22:12:52 +0100 Subject: Add RowDescription structure --- src/main.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 07b6628..8c2aed9 100644 --- a/src/main.zig +++ b/src/main.zig @@ -9,6 +9,7 @@ const ParameterStatus = @import("parameter_status.zig"); const BackendKeyData = @import("backend_key_data.zig"); const Query = @import("query.zig"); const DataRow = @import("data_row.zig"); +const RowDescription = @import("row_description.zig"); const Conn = @import("conn.zig"); pub const ProtocolError = error{ @@ -19,6 +20,7 @@ pub const ProtocolError = error{ MissingField, WrongMessageType, InvalidTransactionStatus, + InvalidFormatCode, }; pub const ClientError = error{ @@ -29,6 +31,11 @@ pub const ServerError = error{ ErrorResponse, }; +pub const FormatCode = enum(u16) { + Text = 0, + Binary = 1, +}; + // Fallible version of enumFromInt pub fn enum_from_int(comptime e: type, i: anytype) ?e { const enum_ti = @typeInfo(e); @@ -119,4 +126,5 @@ test { _ = BackendKeyData; _ = Query; _ = DataRow; + _ = RowDescription; } -- cgit v1.2.3-ZIG