mysql

package
v0.0.0-...-ebe1b00 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage mysql

func New

func New(db *sqlx.DB, eventTable, undispatchCommitedTable, snapshotTable string) *Storage

New storage

func (*Storage) CreateTables

func (s *Storage) CreateTables()

CreateTables create table

func (*Storage) DropTables

func (s *Storage) DropTables()

DropTables drop table

func (*Storage) FlushAll

func (s *Storage) FlushAll()

FlushAll tables

func (*Storage) GetFromRevision

func (s *Storage) GetFromRevision(id string, from int) ([]goes.Event, error)

GetFromRevision get events from revision

func (*Storage) GetLastEvent

func (s *Storage) GetLastEvent(id string) ([]goes.Event, error)

GetLastEvent get all event

func (*Storage) GetSnapshot

func (s *Storage) GetSnapshot(id string, version int) (*goes.Snapshot, error)

GetSnapshot get snapshot with version

func (*Storage) GetUndispatchedEvent

func (s *Storage) GetUndispatchedEvent() ([]goes.Event, error)

GetUndispatchedEvent get undispatched event

func (*Storage) MarkDispatchedEvent

func (s *Storage) MarkDispatchedEvent(es []goes.Event) error

MarkDispatchedEvent makr event dispatched

func (*Storage) Save

func (s *Storage) Save(es []goes.Event) error

Save events

func (*Storage) SaveSnapshot

func (s *Storage) SaveSnapshot(snap *goes.Snapshot) error

SaveSnapshot save snapshot

Jump to

Keyboard shortcuts

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