Documentation
¶
Overview ¶
Package db provides a lightweight GORM-based SQLite wrapper for persisting state required by the Push Universal Validator (UV), such as block tracking, processed cross-chain messages, and transaction receipts.
Index ¶
Constants ¶
View Source
const (
// InMemorySQLiteDSN is a special DSN to create an ephemeral in-memory SQLite database.
InMemorySQLiteDSN = ":memory:"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB wraps a GORM client and provides simplified DB lifecycle management.
func OpenFileDB ¶
OpenFileDB opens (or creates) a file-backed SQLite database located in the given directory. If `migrateSchema` is true, all defined schema models are automatically migrated.
func OpenInMemoryDB ¶
OpenInMemoryDB opens a non-persistent SQLite database in memory. This is useful for testing or ephemeral state.
Click to show internal directories.
Click to hide internal directories.