commits in between.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
ks-keys-raw
|
||||
ks-key-count
|
||||
ks-transaction
|
||||
ks-commit
|
||||
)
|
||||
|
||||
(define-struct keystore
|
||||
@@ -116,6 +117,12 @@
|
||||
(query-exec (keystore-dbh ks) "COMMIT")
|
||||
r)))))
|
||||
|
||||
(define/contract (ks-commit ks)
|
||||
(-> keystore? boolean?)
|
||||
(query-exec (keystore-dbh ks) "COMMIT")
|
||||
(query-exec (keystore-dbg ks) "BEGIN")
|
||||
#t)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Internal working
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@@ -121,6 +121,7 @@ Returns raw key-value rows in the form:
|
||||
]
|
||||
}
|
||||
|
||||
@section{Transactions}
|
||||
|
||||
@defform[(ks-transaction [ks keystore?] b1 ...)]{
|
||||
|
||||
@@ -129,6 +130,12 @@ It uses with-handlers exn?, so if you raise an exception,
|
||||
it will do a "BEGIN/ROLLBACK" abd re-raise the exception.
|
||||
}
|
||||
|
||||
@defproc[(ks-commit [ks keystore?]) boolean?]{
|
||||
|
||||
Commits (part of a transaction) using COMMIT/BEGIN.
|
||||
Fits in a @tt{ks-transaction} form.
|
||||
}
|
||||
|
||||
@section{Examples}
|
||||
|
||||
@subsection{Basic Usage}
|
||||
|
||||
Reference in New Issue
Block a user