mysql

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAffectedRows = errors.New("No affected rows")

Functions

func NewDatabaseEventStore

func NewDatabaseEventStore(db *sql.DB) cqrs.EventStore

Types

type EventStore

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

func (*EventStore) FindStream

func (s *EventStore) FindStream(aggregateTypes []string, aggregateIds []uuid.UUID, eventTypes []string) (cqrs.EventStream, error)

func (*EventStore) LoadStream

func (s *EventStore) LoadStream(aggregateType string, aggregateId uuid.UUID, version int) (cqrs.EventStream, error)

func (*EventStore) WriteEvent

func (s *EventStore) WriteEvent(aggregateType string, events ...cqrs.Event) error

type UUID

type UUID struct {
	uuid.UUID
}

mysql optimized ID key, we store it as a bytes VARBINARY(16) instead of string

func MysqlUUID

func MysqlUUID(uuid uuid.UUID) UUID

func (UUID) Value

func (u UUID) Value() (driver.Value, error)

optimized way of storing uuid in mysql

Jump to

Keyboard shortcuts

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