From e5425b5f2f9413896c87a868a84663ed5e814364 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: [feature] add `unsafeColumnAt` procs, that return unsafe cstring from InstantRow (#11647) --- lib/impure/db_odbc.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/impure/db_odbc.nim') 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 -- cgit 1.4.1-2-gfad0 td> This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log blame commit diff stats
path: root/tests/rodfiles/bmethods2.nim
blob: ac24a22014f67de5cdb79675defbbdaa041a7961 (plain) (tree)
1
2