From f17a5c0c6b37996def46c367f47a519668b92bde Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 26 Apr 2012 01:16:50 +0200 Subject: [PATCH] some code formating --- src/db_sqlite.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/db_sqlite.nim b/src/db_sqlite.nim index d800a23174..3f5be772c1 100755 --- a/src/db_sqlite.nim +++ b/src/db_sqlite.nim @@ -162,15 +162,14 @@ proc ExecAffectedRows*(db: TDbConn, query: TSqlQuery, proc Close*(db: TDbConn) = ## closes the database connection. - if sqlite3.close(db) != SQLITE_OK: - dbError(db) + if sqlite3.close(db) != SQLITE_OK: dbError(db) proc Open*(connection, user, password, database: string): TDbConn = ## opens a database connection. Raises `EDb` if the connection could not ## be established. Only the ``connection`` parameter is used for ``sqlite``. var db: TDbConn if sqlite3.open(connection, db) == SQLITE_OK: - return db + result = db else: dbError(db)