Add postgresql prepared queries and stop relying on string formatting
for sql parameter passing
This commit is contained in:
parent
2525215610
commit
08f1c6100b
2 changed files with 86 additions and 28 deletions
|
|
@ -213,6 +213,8 @@ proc PQexecParams*(conn: PPGconn, command: cstring, nParams: int32,
|
|||
paramTypes: POid, paramValues: cstringArray,
|
||||
paramLengths, paramFormats: ptr int32, resultFormat: int32): PPGresult{.
|
||||
cdecl, dynlib: dllName, importc: "PQexecParams".}
|
||||
proc PQprepare*(conn: PPGconn, stmtName, query: cstring, nParams: int32,
|
||||
paramTypes: POid): PPGresult{.cdecl, dynlib: dllName, importc: "PQprepare".}
|
||||
proc PQexecPrepared*(conn: PPGconn, stmtName: cstring, nParams: int32,
|
||||
paramValues: cstringArray,
|
||||
paramLengths, paramFormats: ptr int32, resultFormat: int32): PPGresult{.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue