[feature] add unsafeColumnAt procs, that return unsafe cstring from InstantRow (#11647)
This commit is contained in:
parent
c94647aeca
commit
e5425b5f2f
5 changed files with 24 additions and 1 deletions
|
|
@ -381,6 +381,10 @@ proc `[]`*(row: InstantRow; col: int): string {.inline.} =
|
|||
## returns text for given column of the row
|
||||
$pqgetvalue(row.res, int32(row.line), int32(col))
|
||||
|
||||
proc unsafeColumnAt*(row: InstantRow, index: int): cstring {.inline.} =
|
||||
## Return cstring of given column of the row
|
||||
pqgetvalue(row.res, int32(row.line), int32(index))
|
||||
|
||||
proc len*(row: InstantRow): int {.inline.} =
|
||||
## returns number of columns in the row
|
||||
int(pqNfields(row.res))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue