table

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RecordInsert = "contract_table_insert"
	RecordUpdate = "contract_table_update"
	RecordDelete = "contract_table_delete"
)
View Source
const (
	ContractTablePrefix = "_ContractTable"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractTable

type ContractTable struct {
	// contains filtered or unexported fields
}

func (*ContractTable) DecodeRecordToJson

func (t *ContractTable) DecodeRecordToJson(encodedRecord []byte) (string, error)

func (*ContractTable) DeleteRecord

func (t *ContractTable) DeleteRecord(encodedPK []byte) error

func (*ContractTable) EnumRecords

func (t *ContractTable) EnumRecords(field string, start interface{}, limit interface{}, reverse bool, maxCount int, callback func(r interface{}) bool) int

func (*ContractTable) GetRecord

func (t *ContractTable) GetRecord(encodedPK []byte) ([]byte, error)

func (*ContractTable) NewRecord

func (t *ContractTable) NewRecord(encodedRecord []byte) error

func (*ContractTable) PrimaryKey

func (t *ContractTable) PrimaryKey(encodedRecord []byte) (string, error)

func (*ContractTable) QueryRecords

func (t *ContractTable) QueryRecords(field string, start interface{}, limit interface{}, reverse bool, maxCount int) ([]interface{}, error)

func (*ContractTable) QueryRecordsJson

func (t *ContractTable) QueryRecordsJson(field string, startJson string, limitJson string, reverse bool, maxCount int) (string, error)

func (*ContractTable) SetRecordCallback

func (t *ContractTable) SetRecordCallback(callback RecordCallbackFunc)

func (*ContractTable) UpdateRecord

func (t *ContractTable) UpdateRecord(encodedPK []byte, encodedRecord []byte) error

type ContractTables

type ContractTables struct {
	// contains filtered or unexported fields
}

func NewContractTables

func NewContractTables(owner string, contract string, abi abi.IContractABI, db iservices.IDatabaseRW) *ContractTables

func (*ContractTables) Table

func (tables *ContractTables) Table(name string) *ContractTable

type RecordCallbackFunc

type RecordCallbackFunc func(what string, key, before, after interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL