diff options
author | Artem Klevtsov <a.a.klevtsov@gmail.com> | 2021-02-17 01:15:58 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 20:15:58 +0100 |
commit | b7cba9ea089edd186b9937de50f5044162b48258 (patch) | |
tree | ef35ded618512884f34b95758ff0e152fed5c66b /lib | |
parent | 0a9a90d9918271f8ff327cf2c5ec590171fb86e3 (diff) | |
download | Nim-b7cba9ea089edd186b9937de50f5044162b48258.tar.gz |
postgres module fixes (followup #17030) (#17053)
* Fix pqSetSingleRowMode case. Add links to the docs * Add missing PGContextVisibility enum * Remove unused PGContextVisibility enum
Diffstat (limited to 'lib')
-rw-r--r-- | lib/wrappers/postgres.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/wrappers/postgres.nim b/lib/wrappers/postgres.nim index 23af8b75a..0bde3f1e6 100644 --- a/lib/wrappers/postgres.nim +++ b/lib/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, |