Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionField ¶
func ActionField(name string, val interface{}) *actionField
func NewExecutor ¶
func NewExecutor(storage Pusher, afterExec func(act CompositeAction)) *executor
Types ¶
type CompositeAction ¶
type CompositeAction interface {
// contains filtered or unexported methods
}
type DeleteAction ¶
type DeleteAction struct {
// contains filtered or unexported fields
}
func NewDeleteAction ¶
func NewDeleteAction(deleteCondition map[string]interface{}) *DeleteAction
type InsertAction ¶
type InsertAction struct {
// contains filtered or unexported fields
}
func NewInsertAction ¶
func NewInsertAction(pkHydrator func([]interface{}) error, box *persistBox) *InsertAction
func (*InsertAction) Box ¶
func (i *InsertAction) Box() *entity.Box
type PersistGraph ¶
type PersistGraph struct {
// contains filtered or unexported fields
}
PersistGraph graph of database actions derived from entities.
func NewPersistGraph ¶
func NewPersistGraph( checkInDirty func(box *d3entity.Box) (bool, error), originalFactory func(box *d3entity.Box) interface{}, ) *PersistGraph
NewPersistGraph create new graph.
func (*PersistGraph) ProcessDeletedEntity ¶
func (p *PersistGraph) ProcessDeletedEntity(box *d3entity.Box) error
func (*PersistGraph) ProcessEntity ¶
func (p *PersistGraph) ProcessEntity(box *d3entity.Box) error
ProcessEntity process entity and all related entities into database actions.
type Pusher ¶
type Pusher interface { Insert(table string, cols []string, values []interface{}, onConflict OnConflict) error InsertWithReturn(table string, cols []string, values []interface{}, returnCols []string, withReturned func(scanner Scanner) error) error Update(table string, cols []string, values []interface{}, identityCond map[string]interface{}) error Remove(table string, identityCond map[string]interface{}) error }
type UpdateAction ¶
type UpdateAction struct {
// contains filtered or unexported fields
}
func NewUpdateAction ¶
func NewUpdateAction(identityCondition map[string]interface{}) *UpdateAction
Click to show internal directories.
Click to hide internal directories.