Documentation ¶
Index ¶
- Constants
- type RDbStore
- func (store *RDbStore) GetAllByHeight(height int64) ([]entity_event.Event, error)
- func (store *RDbStore) GetLatestHeight() (*int64, error)
- func (store *RDbStore) Insert(event entity_event.Event) error
- func (store *RDbStore) InsertAll(events []entity_event.Event) error
- func (store *RDbStore) InsertAllWithRDbHandle(rdbHandle *rdb.Handle, events []entity_event.Event) error
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 ¶
GetLatestHeight returns latest event height, nil if no event is stored
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.
Click to show internal directories.
Click to hide internal directories.