mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-30 19:23:57 +00:00
some code formating
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user