BchHeaderDatabaseQueries

class BchHeaderDatabaseQueries(driver: SqlDriver) : TransacterImpl

Constructors

Link copied to clipboard
constructor(driver: SqlDriver)

Functions

Link copied to clipboard
fun deleteAll(): QueryResult<Long>
Link copied to clipboard
fun <T : Any> getAll(mapper: (hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long) -> T): Query<T>
Link copied to clipboard
fun getAtHeight(heights: Long): Query<BchBlockHeaderTbl>
fun <T : Any> getAtHeight(heights: Long, mapper: (hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long) -> T): Query<T>
Link copied to clipboard
fun <T : Any> getByHash(hash: ByteArray, mapper: (hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long) -> T): Query<T>
Link copied to clipboard
fun getByHeight(height: Long): Query<BchBlockHeaderTbl>
fun <T : Any> getByHeight(height: Long, mapper: (hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long) -> T): Query<T>
Link copied to clipboard
fun <T : Any> getByLatestHeight(mapper: (hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long) -> T): Query<T>
Link copied to clipboard
fun <T : Any> getByMostWork(mapper: (hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long) -> T): Query<T>
Link copied to clipboard
fun insert(hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long): QueryResult<Long>
Link copied to clipboard
open override fun transaction(noEnclosing: Boolean, body: TransactionWithoutReturn.() -> Unit)
Link copied to clipboard
open override fun <R> transactionWithResult(noEnclosing: Boolean, bodyWithReturn: TransactionWithReturn<R>.() -> R): R
Link copied to clipboard
fun update(hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long): QueryResult<Long>
Link copied to clipboard
fun upsert(hash: ByteArray, hashPrevBlock: ByteArray?, diffBits: Long, hashAncestor: ByteArray?, time: Long, height: Long, chainWork: ByteArray, size: Long, nonce: Long, hashMerkleRoot: ByteArray?, txCount: Long): QueryResult<Long>