mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-22 19:19:42 +00:00
add unsafeColumnAt procs, that return unsafe cstring from InstantRow (#11647)
This commit is contained in:
@@ -330,7 +330,11 @@ iterator instantRows*(db: var DbConn, query: SqlQuery,
|
||||
|
||||
proc `[]`*(row: InstantRow, col: int): string {.inline.} =
|
||||
## Returns text for given column of the row
|
||||
row.row[col]
|
||||
$row.row[col]
|
||||
|
||||
proc unsafeColumnAt*(row: InstantRow, index: int): cstring {.inline.} =
|
||||
## Return cstring of given column of the row
|
||||
row.row[index]
|
||||
|
||||
proc len*(row: InstantRow): int {.inline.} =
|
||||
## Returns number of columns in the row
|
||||
|
||||
Reference in New Issue
Block a user