diff options
author | Araq <rumpf_a@web.de> | 2011-10-18 17:21:51 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-10-18 17:21:51 +0200 |
commit | 4de84024e5e1b91fcd66d4f093cec4d1a985194a (patch) | |
tree | 6b8941742c59c21c729e6d8ecd868bb0c29e4a36 /lib/impure | |
parent | 0914ba8980976ed5204f953aa5548e33ac103686 (diff) | |
download | Nim-4de84024e5e1b91fcd66d4f093cec4d1a985194a.tar.gz |
much more efficient rod file generation
Diffstat (limited to 'lib/impure')
-rwxr-xr-x | lib/impure/db_sqlite.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/impure/db_sqlite.nim b/lib/impure/db_sqlite.nim index 8c2de0dc7..d09051cd4 100755 --- a/lib/impure/db_sqlite.nim +++ b/lib/impure/db_sqlite.nim @@ -118,8 +118,7 @@ proc GetValue*(db: TDbConn, query: TSqlQuery, ## of the first row. Returns "" if the dataset contains no rows. var stmt = setupQuery(db, query, args) if step(stmt) == SQLITE_ROW: - result = newString(column_bytes(stmt, 0)) - setLen(result, 0) + result = newStringOfCap(column_bytes(stmt, 0)) add(result, column_text(stmt, 0)) if finalize(stmt) != SQLITE_OK: dbError(db) else: |