Documentation ¶
Overview ¶
Transactions:
T ++ txId - confirmed transactions data: packed transaction data
Assets:
A ++ asset index - confirmed asset data: packed asset data
Ownership:
N ++ owner - next count value to use for appending to owned items data: count K ++ owner ++ count - list of owned items data: last transfer txId ++ last transfer block number ++ issue txId ++ issue block number ++ asset index D ++ owner ++ txId - position in list of owned items, for delete after transfer data: count
Payment:
C ++ currency(uint64) - currency processing data: latest block number (big endian uint64, 8 bytes) P ++ payId - payment confirmation (array of addresses + values) data: currency(varint) ++ txId_bytes(varint) ++ txId ++ [ count(varint) ++ address ++ value(varint) ]
Testing:
Z ++ key - testing data
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Pool pools
the instance
Functions ¶
func Initialise ¶
open up the database connection
this must be called before any pool.New() is created
Types ¶
type FetchCursor ¶
type FetchCursor struct {
// contains filtered or unexported fields
}
cursor structure
func (*FetchCursor) Fetch ¶
func (cursor *FetchCursor) Fetch(count int) ([]Element, error)
fetch some elements starting from key
func (*FetchCursor) Seek ¶
func (cursor *FetchCursor) Seek(key []byte) *FetchCursor
type PoolHandle ¶
type PoolHandle struct {
// contains filtered or unexported fields
}
a pool handle
func (*PoolHandle) Get ¶
func (p *PoolHandle) Get(key []byte) []byte
read a value for a given key
this returns the actual element - copy the result if it must be preserved
func (*PoolHandle) LastElement ¶
func (p *PoolHandle) LastElement() (Element, bool)
get the last element in a pool
func (*PoolHandle) NewFetchCursor ¶
func (p *PoolHandle) NewFetchCursor() *FetchCursor
initialise a cursor to the start of a key range
func (*PoolHandle) Put ¶
func (p *PoolHandle) Put(key []byte, value []byte)
store a key/value bytes pair to the database
Click to show internal directories.
Click to hide internal directories.