[feature] add unsafeColumnAt procs, that return unsafe cstring from InstantRow (#11647)

This commit is contained in:
Huy 2019-07-10 19:56:09 +07:00 • committed by Andreas Rumpf
commit e5425b5f2f
5 changed files with 24 additions and 1 deletions

View file

@ -359,6 +359,14 @@ proc `[]`*(row: InstantRow, col: int32): string {.inline.} =
## example code
$column_text(row, col)
proc unsafeColumnAt*(row: InstantRow, index: int32): cstring {.inline.} =
## Returns cstring for given column of the row.
##
## See also:
## * `instantRows iterator <#instantRows.i,DbConn,SqlQuery,varargs[string,]>`_
## example code
column_text(row, index)
proc len*(row: InstantRow): int32 {.inline.} =
## Returns number of columns in a row.
##