Help us shape the future of Go! Take the 2026 Go Developer Survey

event

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_TABLE = "events"

Variables

This section is empty.

Functions

This section is empty.

Types

type RDbStore

type RDbStore struct {
	Registry *entity_event.Registry
	// contains filtered or unexported fields
}

EventStore implemented using relational database

func NewRDbStore

func NewRDbStore(handle *rdb.Handle, registry *entity_event.Registry) *RDbStore

func (*RDbStore) GetAllByHeight

func (store *RDbStore) GetAllByHeight(height int64) ([]entity_event.Event, error)

func (*RDbStore) GetLatestHeight

func (store *RDbStore) GetLatestHeight() (*int64, error)

GetLatestHeight returns latest event height, nil if no event is stored

func (*RDbStore) Insert

func (store *RDbStore) Insert(event entity_event.Event) error

func (*RDbStore) InsertAll

func (store *RDbStore) InsertAll(events []entity_event.Event) error

InsertAll insert all events into store. It will rollback when the insert fails at any point.

func (*RDbStore) InsertAllWithRDbHandle

func (store *RDbStore) InsertAllWithRDbHandle(rdbHandle *rdb.Handle, events []entity_event.Event) error

InsertAll insert all events into store. It will rollback when the insert fails at any point.

Jump to

Keyboard shortcuts

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