SqldelightTxDatabase

class SqldelightTxDatabase(val name: String, val sql: SqlDriver) : TxDatabase

Constructors

Link copied to clipboard
constructor(name: String, sql: SqlDriver)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sql: SqlDriver

Functions

Link copied to clipboard
open override fun clear()

Delete all items

Link copied to clipboard
open override fun clearDecrypter()

If you want to use the same database sequentially with multiple wallets, then you can clear the decrypter. This is really meant for efficient tests not production use.

Link copied to clipboard
open override fun close()

close this database, releasing any resources

Link copied to clipboard
open override fun delete(vararg idems: ByteArray)
open fun delete(vararg idems: Hash256)
Link copied to clipboard
open override fun forEach(doit: (TransactionHistory) -> Boolean, startingDate: Long, count: Long)

Iterates from newest to oldest

Link copied to clipboard
open override fun forEachForwards(doit: (TransactionHistory) -> Boolean, startingDate: Long, count: Long)

Iterates from oldest to newest

Link copied to clipboard
open override fun forEachWithAddress(addr: PayAddress, doit: (TransactionHistory) -> Boolean)

Wallet history iterator, of a particular address.

Link copied to clipboard
open override fun installDecrypter(decrypt: (ByteArray, Int) -> ByteArray)

Provide a decryption function to associate with any SecuredSecrets stored in this database. The decryption function will not be called until the secret is actually needed.

Link copied to clipboard
open override fun read(idem: Hash256): TransactionHistory?

Read one item

Link copied to clipboard

Read all items and return a map of each entry

Link copied to clipboard
open override fun size(): Long
Link copied to clipboard
open override fun write(vararg txh: TransactionHistory?)
Link copied to clipboard
open override fun writeAll(fullmap: MutableMap<Hash256, TransactionHistory>)

Insert or overwrite all items in the provided map into the database

Link copied to clipboard
open override fun writeDirty(fullmap: MutableMap<Hash256, TransactionHistory>): Int

Insert or overwrite all changed items in the provided map into the database