Add pqsetsinglerowmode to postgres module (#17030)
* Add pqsetsinglerowmode to postgres module Very useful to reduce memory usage when fetch a large amount of data. Documentation: https://www.postgresql.org/docs/current/libpq-single-row-mode.html * Add missing enum to the ExecStatusType * Revert entry * Update ConnStatusType enum
This commit is contained in:
parent
fff5819ee7
commit
b68ecc82cb
1 changed files with 6 additions and 2 deletions
|
|
@ -53,7 +53,8 @@ type
|
||||||
PExecStatusType* = ptr ExecStatusType
|
PExecStatusType* = ptr ExecStatusType
|
||||||
ExecStatusType* = enum
|
ExecStatusType* = enum
|
||||||
PGRES_EMPTY_QUERY = 0, PGRES_COMMAND_OK, PGRES_TUPLES_OK, PGRES_COPY_OUT,
|
PGRES_EMPTY_QUERY = 0, PGRES_COMMAND_OK, PGRES_TUPLES_OK, PGRES_COPY_OUT,
|
||||||
PGRES_COPY_IN, PGRES_BAD_RESPONSE, PGRES_NONFATAL_ERROR, PGRES_FATAL_ERROR
|
PGRES_COPY_IN, PGRES_BAD_RESPONSE, PGRES_NONFATAL_ERROR, PGRES_FATAL_ERROR,
|
||||||
|
PGRES_COPY_BOTH, PGRES_SINGLE_TUPLE
|
||||||
PGlobjfuncs*{.pure, final.} = object
|
PGlobjfuncs*{.pure, final.} = object
|
||||||
fn_lo_open*: Oid
|
fn_lo_open*: Oid
|
||||||
fn_lo_close*: Oid
|
fn_lo_close*: Oid
|
||||||
|
|
@ -69,7 +70,8 @@ type
|
||||||
ConnStatusType* = enum
|
ConnStatusType* = enum
|
||||||
CONNECTION_OK, CONNECTION_BAD, CONNECTION_STARTED, CONNECTION_MADE,
|
CONNECTION_OK, CONNECTION_BAD, CONNECTION_STARTED, CONNECTION_MADE,
|
||||||
CONNECTION_AWAITING_RESPONSE, CONNECTION_AUTH_OK, CONNECTION_SETENV,
|
CONNECTION_AWAITING_RESPONSE, CONNECTION_AUTH_OK, CONNECTION_SETENV,
|
||||||
CONNECTION_SSL_STARTUP, CONNECTION_NEEDED
|
CONNECTION_SSL_STARTUP, CONNECTION_NEEDED, CONNECTION_CHECK_WRITABLE,
|
||||||
|
CONNECTION_CONSUME, CONNECTION_GSS_STARTUP, CONNECTION_CHECK_TARGET
|
||||||
PGconn*{.pure, final.} = object
|
PGconn*{.pure, final.} = object
|
||||||
pghost*: cstring
|
pghost*: cstring
|
||||||
pgtty*: cstring
|
pgtty*: cstring
|
||||||
|
|
@ -248,6 +250,8 @@ proc pqsendQueryPrepared*(conn: PPGconn, stmtName: cstring, nParams: int32,
|
||||||
paramLengths, paramFormats: ptr int32,
|
paramLengths, paramFormats: ptr int32,
|
||||||
resultFormat: int32): int32{.cdecl, dynlib: dllName,
|
resultFormat: int32): int32{.cdecl, dynlib: dllName,
|
||||||
importc: "PQsendQueryPrepared".}
|
importc: "PQsendQueryPrepared".}
|
||||||
|
proc pqsetsinglerowmode*(conn: PPGconn): int32{.cdecl, dynlib: dllName,
|
||||||
|
importc: "PQsetSingleRowMode".}
|
||||||
proc pqgetResult*(conn: PPGconn): PPGresult{.cdecl, dynlib: dllName,
|
proc pqgetResult*(conn: PPGconn): PPGresult{.cdecl, dynlib: dllName,
|
||||||
importc: "PQgetResult".}
|
importc: "PQgetResult".}
|
||||||
proc pqisBusy*(conn: PPGconn): int32{.cdecl, dynlib: dllName,
|
proc pqisBusy*(conn: PPGconn): int32{.cdecl, dynlib: dllName,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue