diff options
author | Huy <106477+ba0f3@users.noreply.github.com> | 2019-07-10 19:56:09 +0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-07-10 14:56:09 +0200 |
commit | e5425b5f2f9413896c87a868a84663ed5e814364 (patch) | |
tree | de3f5505b39fa4b0473b0a49c9198a5b9bcf0377 /lib/impure/db_odbc.nim | |
parent | c94647aecad6ed7fd12152800437a6cda11e06e6 (diff) | |
download | Nim-e5425b5f2f9413896c87a868a84663ed5e814364.tar.gz |
[feature] add `unsafeColumnAt` procs, that return unsafe cstring from InstantRow (#11647)
Diffstat (limited to 'lib/impure/db_odbc.nim')
-rw-r--r-- | lib/impure/db_odbc.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/impure/db_odbc.nim b/lib/impure/db_odbc.nim index 4c33a5a82..7b59f8313 100644 --- a/lib/impure/db_odbc.nim +++ b/lib/impure/db_odbc.nim @@ -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 |