Documentation
¶
Index ¶
- Variables
- func ApplyEmbeddedDbSchema(version int64) error
- func EngineQuery(queryMap map[dbtypes.DBEngineType]string) string
- func GetAssignedBlocks(proposer uint64, firstSlot uint64, offset uint64, limit uint32, ...) []*dbtypes.AssignedBlock
- func GetBlocks(firstBlock uint64, limit uint32, withOrphaned bool) []*dbtypes.Block
- func GetBlocksForSlots(firstSlot uint64, lastSlot uint64, withOrphaned bool) []*dbtypes.Block
- func GetBlocksWithGraffiti(graffiti string, firstSlot uint64, offset uint64, limit uint32, ...) []*dbtypes.Block
- func GetEpochs(firstEpoch uint64, limit uint32) []*dbtypes.Epoch
- func GetExplorerState(key string, returnValue interface{}) (interface{}, error)
- func GetOrphanedBlock(root []byte) *dbtypes.OrphanedBlock
- func GetSlotAssignmentsForSlots(firstSlot uint64, lastSlot uint64) []*dbtypes.SlotAssignment
- func InsertBlock(block *dbtypes.Block, tx *sqlx.Tx) error
- func InsertEpoch(epoch *dbtypes.Epoch, tx *sqlx.Tx) error
- func InsertOrphanedBlock(block *dbtypes.OrphanedBlock, tx *sqlx.Tx) error
- func InsertSlotAssignments(slotAssignments []*dbtypes.SlotAssignment, tx *sqlx.Tx) error
- func IsEpochSynchronized(epoch uint64) bool
- func MustCloseDB()
- func MustInitDB()
- func SetExplorerState(key string, value interface{}, tx *sqlx.Tx) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DBPGX *pgxpool.Conn
View Source
var DbEngine dbtypes.DBEngineType
DB is a pointer to the explorer-database
View Source
var EmbedPgsqlSchema embed.FS
View Source
var EmbedSqliteSchema embed.FS
View Source
var ReaderDb *sqlx.DB
View Source
var WriterDb *sqlx.DB
Functions ¶
func ApplyEmbeddedDbSchema ¶
func EngineQuery ¶ added in v1.2.0
func EngineQuery(queryMap map[dbtypes.DBEngineType]string) string
func GetAssignedBlocks ¶ added in v1.1.0
func GetBlocksForSlots ¶
func GetBlocksWithGraffiti ¶
func GetExplorerState ¶
func GetOrphanedBlock ¶
func GetOrphanedBlock(root []byte) *dbtypes.OrphanedBlock
func GetSlotAssignmentsForSlots ¶
func GetSlotAssignmentsForSlots(firstSlot uint64, lastSlot uint64) []*dbtypes.SlotAssignment
func InsertOrphanedBlock ¶
func InsertOrphanedBlock(block *dbtypes.OrphanedBlock, tx *sqlx.Tx) error
func InsertSlotAssignments ¶
func InsertSlotAssignments(slotAssignments []*dbtypes.SlotAssignment, tx *sqlx.Tx) error
func IsEpochSynchronized ¶
func MustCloseDB ¶ added in v1.2.0
func MustCloseDB()
func MustInitDB ¶
func MustInitDB()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.