postgres module fixes (followup #17030) (#17053)

* Fix pqSetSingleRowMode case. Add links to the docs

* Add missing PGContextVisibility enum

* Remove unused PGContextVisibility enum
This commit is contained in:
Artem Klevtsov
2021-02-17 01:15:58 +06:00
committed by ringabout
parent b13bfa05a2
commit 2408bf4a33

View File

@@ -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,