much more efficient rod file generation

This commit is contained in:
Araq
2011-10-18 17:21:51 +02:00
committed by ringabout
parent 7c1e294e23
commit 19896f6a42

View File

@@ -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: