implement close method for sqlite

This commit is contained in:
Dmitriy Ryajov 2022-09-19 22:40:01 -06:00
parent 68f3f86cd9
commit fc842663bb
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ method get*(self: SQLiteDatastore, key: Key): Future[?!seq[byte]] {.async.} =
method put*(self: SQLiteDatastore, key: Key, data: seq[byte]): Future[?!void] {.async.} =
return self.db.putStmt.exec((key.id, @data, timestamp()))
method close*(self: SQLiteDatastore): Future[?!void] {.async.} =
self.db.close()
return success()
# iterator query*(
# self: SQLiteDatastore,
# query: Query): Future[QueryResponse] =