aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2023-09-24 22:12:52 +0100
committerMartin Ashby <martin@ashbysoft.com>2023-09-24 22:12:52 +0100
commit24439a295ca80a3b9a9e65d8b3436859d4ada46a (patch)
treea3c6b12c206c1150bc4b04499c549ae348b2bee3 /src/main.zig
parentbc0bf6b1500db54ebc9108671c328bce7a8a5b9e (diff)
downloadpgz-24439a295ca80a3b9a9e65d8b3436859d4ada46a.tar.gz
pgz-24439a295ca80a3b9a9e65d8b3436859d4ada46a.tar.bz2
pgz-24439a295ca80a3b9a9e65d8b3436859d4ada46a.tar.xz
pgz-24439a295ca80a3b9a9e65d8b3436859d4ada46a.zip
Add RowDescription structure
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig8
1 files changed, 8 insertions, 0 deletions
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;
}