impl

package
v0.0.1-alpha-3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT, Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInstrumentedSystemStore

func NewInstrumentedSystemStore(chainID tableland.ChainID, store sqlstore.SystemStore) (sqlstore.SystemStore, error)

NewInstrumentedSystemStore creates a new db pool and instantiate both the user and system stores.

func NewInstrumentedUserStore

func NewInstrumentedUserStore(store sqlstore.UserStore) (sqlstore.UserStore, error)

NewInstrumentedUserStore creates a new db pool and instantiate user store.

Types

type InstrumentedSystemStore

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

InstrumentedSystemStore implements a instrumented SQLStore.

func (*InstrumentedSystemStore) AreEVMEventsPersisted

func (s *InstrumentedSystemStore) AreEVMEventsPersisted(ctx context.Context, txnHash common.Hash) (bool, error)

AreEVMEventsPersisted implements sqlstore.SystemStore.

func (*InstrumentedSystemStore) Begin

func (s *InstrumentedSystemStore) Begin(ctx context.Context) (*sql.Tx, error)

Begin returns a new tx.

func (*InstrumentedSystemStore) Close

func (s *InstrumentedSystemStore) Close() error

Close closes the connection pool.

func (*InstrumentedSystemStore) DeletePendingTxByHash

func (s *InstrumentedSystemStore) DeletePendingTxByHash(ctx context.Context, hash common.Hash) error

DeletePendingTxByHash deletes a pending tx.

func (*InstrumentedSystemStore) GetACLOnTableByController

func (s *InstrumentedSystemStore) GetACLOnTableByController(
	ctx context.Context,
	table tables.TableID,
	address string,
) (sqlstore.SystemACL, error)

GetACLOnTableByController increments the counter.

func (*InstrumentedSystemStore) GetBlockExtraInfo

func (s *InstrumentedSystemStore) GetBlockExtraInfo(
	ctx context.Context,
	blockNumber int64,
) (tableland.EVMBlockInfo, error)

GetBlockExtraInfo implements sqlstore.SystemStore.

func (*InstrumentedSystemStore) GetBlocksMissingExtraInfo

func (s *InstrumentedSystemStore) GetBlocksMissingExtraInfo(
	ctx context.Context,
	fromHeight *int64,
) ([]int64, error)

GetBlocksMissingExtraInfo implements sqlstore.SystemStore.

func (*InstrumentedSystemStore) GetEVMEvents

func (s *InstrumentedSystemStore) GetEVMEvents(ctx context.Context, txnHash common.Hash) ([]tableland.EVMEvent, error)

GetEVMEvents implements sqlstore.SystemStore.

func (*InstrumentedSystemStore) GetID

GetID returns node identifier.

func (*InstrumentedSystemStore) GetReceipt

func (s *InstrumentedSystemStore) GetReceipt(
	ctx context.Context,
	txnHash string,
) (eventprocessor.Receipt, bool, error)

GetReceipt returns the receipt of a processed event by txn hash.

func (*InstrumentedSystemStore) GetSchemaByTableName

func (s *InstrumentedSystemStore) GetSchemaByTableName(ctx context.Context, name string) (sqlstore.TableSchema, error)

GetSchemaByTableName get the schema of a table by its name.

func (*InstrumentedSystemStore) GetTable

GetTable fetchs a table from its UUID.

func (*InstrumentedSystemStore) GetTablesByController

func (s *InstrumentedSystemStore) GetTablesByController(
	ctx context.Context,
	controller string,
) ([]sqlstore.Table, error)

GetTablesByController fetchs a table from controller address.

func (*InstrumentedSystemStore) GetTablesByStructure

func (s *InstrumentedSystemStore) GetTablesByStructure(
	ctx context.Context,
	structure string,
) ([]sqlstore.Table, error)

GetTablesByStructure gets all tables with a particular structure hash.

func (*InstrumentedSystemStore) InsertBlockExtraInfo

func (s *InstrumentedSystemStore) InsertBlockExtraInfo(ctx context.Context, blockNumber int64, timestamp uint64) error

InsertBlockExtraInfo implements sqlstore.SystemStore.

func (*InstrumentedSystemStore) InsertPendingTx

func (s *InstrumentedSystemStore) InsertPendingTx(
	ctx context.Context,
	addr common.Address,
	nonce int64,
	hash common.Hash,
) error

InsertPendingTx insert a new pending tx.

func (*InstrumentedSystemStore) ListPendingTx

func (s *InstrumentedSystemStore) ListPendingTx(
	ctx context.Context,
	addr common.Address,
) ([]nonce.PendingTx, error)

ListPendingTx lists all pendings txs.

func (*InstrumentedSystemStore) ReplacePendingTxByHash

func (s *InstrumentedSystemStore) ReplacePendingTxByHash(
	ctx context.Context,
	oldHash common.Hash,
	newHash common.Hash,
) error

ReplacePendingTxByHash replaces a pending txn hash and bumps the counter on how many times this happened.

func (*InstrumentedSystemStore) SaveEVMEvents

func (s *InstrumentedSystemStore) SaveEVMEvents(ctx context.Context, events []tableland.EVMEvent) error

SaveEVMEvents implements sqlstore.SystemStore.

func (*InstrumentedSystemStore) WithTx

WithTx returns a copy of the current InstrumentedSQLStore with a tx attached.

type InstrumentedUserStore

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

InstrumentedUserStore implements a instrumented SQLStore.

func (*InstrumentedUserStore) Close

func (s *InstrumentedUserStore) Close() error

Close closes the store.

func (*InstrumentedUserStore) Read

Read executes a read statement on the db.

Directories

Path Synopsis
migrations
Package migrations generated by go-bindata.// sources: migrations/001_init.down.sql migrations/001_init.up.sql migrations/002_receipterroridx.down.sql migrations/002_receipterroridx.up.sql migrations/003_evm_events.down.sql migrations/003_evm_events.up.sql migrations/004_system_id.down.sql migrations/004_system_id.up.sql
Package migrations generated by go-bindata.// sources: migrations/001_init.down.sql migrations/001_init.up.sql migrations/002_receipterroridx.down.sql migrations/002_receipterroridx.up.sql migrations/003_evm_events.down.sql migrations/003_evm_events.up.sql migrations/004_system_id.down.sql migrations/004_system_id.up.sql

Jump to

Keyboard shortcuts

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