From 31c1148eb0bcd31d9c7cac64a2084d462452bb59 Mon Sep 17 00:00:00 2001 From: Huy <106477+ba0f3@users.noreply.github.com> Date: Wed, 10 Jul 2019 19:56:09 +0700 Subject: [PATCH] add `unsafeColumnAt` procs, that return unsafe cstring from InstantRow (#11647) --- src/db_odbc.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/db_odbc.nim b/src/db_odbc.nim index 4c33a5a82f..7b59f8313e 100644 --- a/src/db_odbc.nim +++ b/src/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