From 2408bf4a33d73822fd089e24a9aab9ea4d978e80 Mon Sep 17 00:00:00 2001 From: Artem Klevtsov Date: Wed, 17 Feb 2021 01:15:58 +0600 Subject: [PATCH] postgres module fixes (followup #17030) (#17053) * Fix pqSetSingleRowMode case. Add links to the docs * Add missing PGContextVisibility enum * Remove unused PGContextVisibility enum --- src/wrappers/postgres.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wrappers/postgres.nim b/src/wrappers/postgres.nim index 23af8b75ac..0bde3f1e6e 100644 --- a/src/wrappers/postgres.nim +++ b/src/wrappers/postgres.nim @@ -116,7 +116,7 @@ type PQTRANS_UNKNOWN PPGVerbosity* = ptr PGVerbosity PGVerbosity* = enum - PQERRORS_TERSE, PQERRORS_DEFAULT, PQERRORS_VERBOSE + PQERRORS_TERSE, PQERRORS_DEFAULT, PQERRORS_VERBOSE, PQERRORS_SQLSTATE PPGNotify* = ptr pgNotify pgNotify*{.pure, final.} = object relname*: cstring @@ -240,6 +240,7 @@ proc pqexecPrepared*(conn: PPGconn, stmtName: cstring, nParams: int32, cdecl, dynlib: dllName, importc: "PQexecPrepared".} proc pqsendQuery*(conn: PPGconn, query: cstring): int32{.cdecl, dynlib: dllName, importc: "PQsendQuery".} + ## See also https://www.postgresql.org/docs/current/libpq-async.html proc pqsendQueryParams*(conn: PPGconn, command: cstring, nParams: int32, paramTypes: POid, paramValues: cstringArray, paramLengths, paramFormats: ptr int32, @@ -250,8 +251,9 @@ proc pqsendQueryPrepared*(conn: PPGconn, stmtName: cstring, nParams: int32, paramLengths, paramFormats: ptr int32, resultFormat: int32): int32{.cdecl, dynlib: dllName, importc: "PQsendQueryPrepared".} -proc pqsetsinglerowmode*(conn: PPGconn): int32{.cdecl, dynlib: dllName, +proc pqSetSingleRowMode*(conn: PPGconn): int32{.cdecl, dynlib: dllName, importc: "PQsetSingleRowMode".} + ## See also https://www.postgresql.org/docs/current/libpq-single-row-mode.html proc pqgetResult*(conn: PPGconn): PPGresult{.cdecl, dynlib: dllName, importc: "PQgetResult".} proc pqisBusy*(conn: PPGconn): int32{.cdecl, dynlib: dllName,