database: db-open: Add DB optional argument.

* src/cuirass/database.scm (db-open): Add DB optional argument.
This commit is contained in:
Mathieu Lirzin 2016-07-26 11:06:48 +02:00
parent c83d5d4da8
commit f40ac8a535
No known key found for this signature in database
GPG Key ID: 0ADEE10094604D37
1 changed files with 2 additions and 2 deletions

View File

@ -94,10 +94,10 @@ database object."
(read-sql-file schema))
db))
(define (db-open)
(define* (db-open #:optional (db (%package-database)))
"Open database to store or read jobs and builds informations. Return a
database object."
(sqlite-open (%package-database) SQLITE_OPEN_READWRITE))
(sqlite-open db SQLITE_OPEN_READWRITE))
(define (db-close db)
"Close database object DB."