db

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AreEVMEventsPersistedParams

type AreEVMEventsPersistedParams struct {
	ChainID int64
	TxHash  string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeletePendingTxByHashParams

type DeletePendingTxByHashParams struct {
	ChainID int64
	Hash    string
}

type GetAclByTableAndControllerParams

type GetAclByTableAndControllerParams struct {
	ChainID int64
	TableID int64
	UPPER   string
}

type GetBlockExtraInfoParams

type GetBlockExtraInfoParams struct {
	ChainID     int64
	BlockNumber int64
}

type GetBlocksMissingExtraInfoByBlockNumberParams

type GetBlocksMissingExtraInfoByBlockNumberParams struct {
	ChainID     int64
	BlockNumber int64
}

type GetEVMEventsParams

type GetEVMEventsParams struct {
	ChainID int64
	TxHash  string
}

type GetReceiptParams

type GetReceiptParams struct {
	ChainID int64
	TxnHash string
}

type GetTableParams

type GetTableParams struct {
	ChainID int64
	ID      int64
}

type GetTablesByControllerParams

type GetTablesByControllerParams struct {
	ChainID int64
	UPPER   string
}

type GetTablesByStructureParams

type GetTablesByStructureParams struct {
	ChainID   int64
	Structure string
}

type InsertBlockExtraInfoParams

type InsertBlockExtraInfoParams struct {
	ChainID     int64
	BlockNumber int64
	Timestamp   int64
}

type InsertEVMEventParams

type InsertEVMEventParams struct {
	ChainID     int64
	EventJson   string
	EventType   string
	Address     string
	Topics      string
	Data        []byte
	BlockNumber int64
	TxHash      string
	TxIndex     uint
	BlockHash   string
	EventIndex  uint
}

type InsertPendingTxParams

type InsertPendingTxParams struct {
	ChainID int64
	Address string
	Hash    string
	Nonce   int64
}

type ListPendingTxParams

type ListPendingTxParams struct {
	Address string
	ChainID int64
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) AreEVMEventsPersisted

func (q *Queries) AreEVMEventsPersisted(ctx context.Context, arg AreEVMEventsPersistedParams) (interface{}, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) DeletePendingTxByHash

func (q *Queries) DeletePendingTxByHash(ctx context.Context, arg DeletePendingTxByHashParams) error

func (*Queries) GetAclByTableAndController

func (q *Queries) GetAclByTableAndController(ctx context.Context, arg GetAclByTableAndControllerParams) (SystemAcl, error)

func (*Queries) GetBlockExtraInfo

func (q *Queries) GetBlockExtraInfo(ctx context.Context, arg GetBlockExtraInfoParams) (SystemEvmBlock, error)

func (*Queries) GetBlocksMissingExtraInfo

func (q *Queries) GetBlocksMissingExtraInfo(ctx context.Context, chainID int64) ([]int64, error)

func (*Queries) GetBlocksMissingExtraInfoByBlockNumber

func (q *Queries) GetBlocksMissingExtraInfoByBlockNumber(ctx context.Context, arg GetBlocksMissingExtraInfoByBlockNumberParams) ([]int64, error)

func (*Queries) GetEVMEvents

func (q *Queries) GetEVMEvents(ctx context.Context, arg GetEVMEventsParams) ([]SystemEvmEvent, error)

func (*Queries) GetId

func (q *Queries) GetId(ctx context.Context) (string, error)

func (*Queries) GetReceipt

func (q *Queries) GetReceipt(ctx context.Context, arg GetReceiptParams) (SystemTxnReceipt, error)

func (*Queries) GetSchemaByTableName

func (q *Queries) GetSchemaByTableName(ctx context.Context, name string) (string, error)

func (*Queries) GetTable

func (q *Queries) GetTable(ctx context.Context, arg GetTableParams) (Registry, error)

func (*Queries) GetTablesByController

func (q *Queries) GetTablesByController(ctx context.Context, arg GetTablesByControllerParams) ([]Registry, error)

func (*Queries) GetTablesByStructure

func (q *Queries) GetTablesByStructure(ctx context.Context, arg GetTablesByStructureParams) ([]Registry, error)

func (*Queries) InsertBlockExtraInfo

func (q *Queries) InsertBlockExtraInfo(ctx context.Context, arg InsertBlockExtraInfoParams) error

func (*Queries) InsertEVMEvent

func (q *Queries) InsertEVMEvent(ctx context.Context, arg InsertEVMEventParams) error

func (*Queries) InsertId

func (q *Queries) InsertId(ctx context.Context, id string) error

func (*Queries) InsertPendingTx

func (q *Queries) InsertPendingTx(ctx context.Context, arg InsertPendingTxParams) error

func (*Queries) ListPendingTx

func (q *Queries) ListPendingTx(ctx context.Context, arg ListPendingTxParams) ([]SystemPendingTx, error)

func (*Queries) ReplacePendingTxByHash

func (q *Queries) ReplacePendingTxByHash(ctx context.Context, arg ReplacePendingTxByHashParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Registry

type Registry struct {
	ID         int64
	Structure  string
	Controller string
	Prefix     string
	CreatedAt  int64
	ChainID    int64
}

type ReplacePendingTxByHashParams

type ReplacePendingTxByHashParams struct {
	Hash      string
	UpdatedAt sql.NullInt64
	ChainID   int64
	Hash_2    string
}

type SqliteMaster

type SqliteMaster struct {
	Name string
	Sql  string
}

type SystemAcl

type SystemAcl struct {
	TableID    int64
	Controller string
	Privileges int
	ChainID    int64
	CreatedAt  int64
	UpdatedAt  sql.NullInt64
}

type SystemController

type SystemController struct {
	ChainID    int64
	TableID    int64
	Controller string
}

type SystemEvmBlock

type SystemEvmBlock struct {
	ChainID     int64
	BlockNumber int64
	Timestamp   int64
}

type SystemEvmEvent

type SystemEvmEvent struct {
	ChainID     int64
	EventJson   string
	EventType   string
	Address     string
	Topics      string
	Data        []byte
	BlockNumber int64
	TxHash      string
	TxIndex     uint
	BlockHash   string
	EventIndex  uint
}

type SystemID

type SystemID struct {
	ID string
}

type SystemPendingTx

type SystemPendingTx struct {
	ChainID        int64
	Address        string
	Hash           string
	Nonce          int64
	BumpPriceCount int
	CreatedAt      int64
	UpdatedAt      sql.NullInt64
}

type SystemTxnProcessor

type SystemTxnProcessor struct {
	ChainID     int64
	BlockNumber int64
}

type SystemTxnReceipt

type SystemTxnReceipt struct {
	ChainID       int64
	BlockNumber   int64
	IndexInBlock  int64
	TxnHash       string
	Error         sql.NullString
	TableID       sql.NullInt64
	ErrorEventIdx sql.NullInt64
}

Jump to

Keyboard shortcuts

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