libnexakotlin
Toggle table of contents
0.5.12
common
Platform filter
common
Switch theme
Search in API
libnexakotlin
libnexakotlin
/
BchDb
/
BchHeaderDatabaseQueries
Bch
Header
Database
Queries
class
BchHeaderDatabaseQueries
(
driver
:
SqlDriver
)
:
TransacterImpl
Members
Constructors
Bch
Header
Database
Queries
Link copied to clipboard
constructor
(
driver
:
SqlDriver
)
Functions
delete
All
Link copied to clipboard
fun
deleteAll
(
)
:
QueryResult
<
Long
>
get
All
Link copied to clipboard
fun
getAll
(
)
:
Query
<
BchBlockHeaderTbl
>
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
>
get
At
Height
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
>
get
By
Hash
Link copied to clipboard
fun
getByHash
(
hash
:
ByteArray
)
:
Query
<
BchBlockHeaderTbl
>
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
>
get
By
Height
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
>
get
By
Latest
Height
Link copied to clipboard
fun
getByLatestHeight
(
)
:
Query
<
BchBlockHeaderTbl
>
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
>
get
By
Most
Work
Link copied to clipboard
fun
getByMostWork
(
)
:
Query
<
BchBlockHeaderTbl
>
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
>
insert
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
>
transaction
Link copied to clipboard
open
override
fun
transaction
(
noEnclosing
:
Boolean
,
body
:
TransactionWithoutReturn
.
(
)
->
Unit
)
transaction
With
Result
Link copied to clipboard
open
override
fun
<
R
>
transactionWithResult
(
noEnclosing
:
Boolean
,
bodyWithReturn
:
TransactionWithReturn
<
R
>
.
(
)
->
R
)
:
R
update
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
>
upsert
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
>