Switch over to use use blocks from nostrdb
This is still kind of broken until queries are switched over to nostrdb. Will do this next Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
208b3331ca
commit
28a06af534
@@ -21,6 +21,10 @@ class NdbTxn<T> {
|
||||
var generation: Int
|
||||
var name: String
|
||||
|
||||
static func pure(ndb: Ndb, val: T) -> NdbTxn<T> {
|
||||
.init(ndb: ndb, txn: ndb_txn(), val: val, generation: ndb.generation, inherited: true, name: "pure_txn")
|
||||
}
|
||||
|
||||
init?(ndb: Ndb, with: (NdbTxn<T>) -> T = { _ in () }, name: String? = nil) {
|
||||
guard !ndb.is_closed else { return nil }
|
||||
self.name = name ?? "txn"
|
||||
|
||||
Reference in New Issue
Block a user