Documentation ¶
Overview ¶
Package pg contains generated code for schema 'public'.
Index ¶
- type GistQ
- func (q GistQ) Delete(g *data.Gist) error
- func (q GistQ) DeleteCtx(ctx context.Context, g *data.Gist) error
- func (q GistQ) GistByID(id string, isForUpdate bool) (*data.Gist, error)
- func (q GistQ) GistByIDCtx(ctx context.Context, id string, isForUpdate bool) (*data.Gist, error)
- func (q GistQ) GistByOperation(operation string, isForUpdate bool) (*data.Gist, error)
- func (q GistQ) GistByOperationCtx(ctx context.Context, operation string, isForUpdate bool) (*data.Gist, error)
- func (q GistQ) Insert(g *data.Gist) error
- func (q GistQ) InsertCtx(ctx context.Context, g *data.Gist) error
- func (q GistQ) Update(g *data.Gist) error
- func (q GistQ) UpdateCtx(ctx context.Context, g *data.Gist) error
- func (q GistQ) Upsert(g *data.Gist) error
- func (q GistQ) UpsertCtx(ctx context.Context, g *data.Gist) error
- type GistTransitionQ
- func (q GistTransitionQ) Delete(gt *data.GistTransition) error
- func (q GistTransitionQ) DeleteCtx(ctx context.Context, gt *data.GistTransition) error
- func (q GistTransitionQ) GistTransitionByTx(tx string, isForUpdate bool) (*data.GistTransition, error)
- func (q GistTransitionQ) GistTransitionByTxCtx(ctx context.Context, tx string, isForUpdate bool) (*data.GistTransition, error)
- func (q GistTransitionQ) GistTransitionsByGist(gist string, isForUpdate bool) ([]data.GistTransition, error)
- func (q GistTransitionQ) GistTransitionsByGistCtx(ctx context.Context, gist string, isForUpdate bool) ([]data.GistTransition, error)
- func (q GistTransitionQ) Insert(gt *data.GistTransition) error
- func (q GistTransitionQ) InsertCtx(ctx context.Context, gt *data.GistTransition) error
- func (q GistTransitionQ) Update(gt *data.GistTransition) error
- func (q GistTransitionQ) UpdateCtx(ctx context.Context, gt *data.GistTransition) error
- func (q GistTransitionQ) Upsert(gt *data.GistTransition) error
- func (q GistTransitionQ) UpsertCtx(ctx context.Context, gt *data.GistTransition) error
- type GorpMigrationQ
- func (q GorpMigrationQ) Delete(gm *data.GorpMigration) error
- func (q GorpMigrationQ) DeleteCtx(ctx context.Context, gm *data.GorpMigration) error
- func (q GorpMigrationQ) GorpMigrationByID(id string, isForUpdate bool) (*data.GorpMigration, error)
- func (q GorpMigrationQ) GorpMigrationByIDCtx(ctx context.Context, id string, isForUpdate bool) (*data.GorpMigration, error)
- func (q GorpMigrationQ) Insert(gm *data.GorpMigration) error
- func (q GorpMigrationQ) InsertCtx(ctx context.Context, gm *data.GorpMigration) error
- func (q GorpMigrationQ) Update(gm *data.GorpMigration) error
- func (q GorpMigrationQ) UpdateCtx(ctx context.Context, gm *data.GorpMigration) error
- func (q GorpMigrationQ) Upsert(gm *data.GorpMigration) error
- func (q GorpMigrationQ) UpsertCtx(ctx context.Context, gm *data.GorpMigration) error
- type StateQ
- func (q StateQ) Delete(s *data.State) error
- func (q StateQ) DeleteCtx(ctx context.Context, s *data.State) error
- func (q StateQ) Insert(s *data.State) error
- func (q StateQ) InsertCtx(ctx context.Context, s *data.State) error
- func (q StateQ) StateByID(id string, isForUpdate bool) (*data.State, error)
- func (q StateQ) StateByIDCtx(ctx context.Context, id string, isForUpdate bool) (*data.State, error)
- func (q StateQ) StateByOperation(operation string, isForUpdate bool) (*data.State, error)
- func (q StateQ) StateByOperationCtx(ctx context.Context, operation string, isForUpdate bool) (*data.State, error)
- func (q StateQ) Update(s *data.State) error
- func (q StateQ) UpdateCtx(ctx context.Context, s *data.State) error
- func (q StateQ) Upsert(s *data.State) error
- func (q StateQ) UpsertCtx(ctx context.Context, s *data.State) error
- type Storage
- func (s *Storage) Clone() *Storage
- func (s *Storage) DB() *pgdb.DB
- func (s Storage) GistQ() *GistQ
- func (s Storage) GistTransitionQ() *GistTransitionQ
- func (s Storage) GorpMigrationQ() *GorpMigrationQ
- func (s Storage) StateQ() *StateQ
- func (s *Storage) Transaction(tx func() error) error
- func (s Storage) TransitionQ() *TransitionQ
- type TransitionQ
- func (q TransitionQ) Delete(t *data.Transition) error
- func (q TransitionQ) DeleteCtx(ctx context.Context, t *data.Transition) error
- func (q TransitionQ) Insert(t *data.Transition) error
- func (q TransitionQ) InsertCtx(ctx context.Context, t *data.Transition) error
- func (q TransitionQ) TransitionByTx(tx string, isForUpdate bool) (*data.Transition, error)
- func (q TransitionQ) TransitionByTxCtx(ctx context.Context, tx string, isForUpdate bool) (*data.Transition, error)
- func (q TransitionQ) TransitionsByState(state string, isForUpdate bool) ([]data.Transition, error)
- func (q TransitionQ) TransitionsByStateCtx(ctx context.Context, state string, isForUpdate bool) ([]data.Transition, error)
- func (q TransitionQ) Update(t *data.Transition) error
- func (q TransitionQ) UpdateCtx(ctx context.Context, t *data.Transition) error
- func (q TransitionQ) Upsert(t *data.Transition) error
- func (q TransitionQ) UpsertCtx(ctx context.Context, t *data.Transition) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GistQ ¶
type GistQ struct {
// contains filtered or unexported fields
}
func (GistQ) GistByID ¶
GistByID retrieves a row from 'public.gists' as a Gist.
Generated from index 'gists_pkey'.
func (GistQ) GistByIDCtx ¶
GistByIDCtx retrieves a row from 'public.gists' as a Gist.
Generated from index 'gists_pkey'.
func (GistQ) GistByOperation ¶
GistByOperation retrieves a row from 'public.gists' as a Gist.
Generated from index 'gists_operation_key'.
func (GistQ) GistByOperationCtx ¶
func (q GistQ) GistByOperationCtx(ctx context.Context, operation string, isForUpdate bool) (*data.Gist, error)
GistByOperationCtx retrieves a row from 'public.gists' as a Gist.
Generated from index 'gists_operation_key'.
type GistTransitionQ ¶
type GistTransitionQ struct {
// contains filtered or unexported fields
}
func NewGistTransitionQ ¶
func NewGistTransitionQ(db *pgdb.DB) *GistTransitionQ
NewGistTransitionQ - creates new instance
func (GistTransitionQ) Delete ¶
func (q GistTransitionQ) Delete(gt *data.GistTransition) error
Delete deletes the GistTransition from the database.
func (GistTransitionQ) DeleteCtx ¶
func (q GistTransitionQ) DeleteCtx(ctx context.Context, gt *data.GistTransition) error
DeleteCtx deletes the GistTransition from the database.
func (GistTransitionQ) GistTransitionByTx ¶
func (q GistTransitionQ) GistTransitionByTx(tx string, isForUpdate bool) (*data.GistTransition, error)
GistTransitionByTx retrieves a row from 'public.gist_transitions' as a GistTransition.
Generated from index 'gist_transitions_pkey'.
func (GistTransitionQ) GistTransitionByTxCtx ¶
func (q GistTransitionQ) GistTransitionByTxCtx(ctx context.Context, tx string, isForUpdate bool) (*data.GistTransition, error)
GistTransitionByTxCtx retrieves a row from 'public.gist_transitions' as a GistTransition.
Generated from index 'gist_transitions_pkey'.
func (GistTransitionQ) GistTransitionsByGist ¶
func (q GistTransitionQ) GistTransitionsByGist(gist string, isForUpdate bool) ([]data.GistTransition, error)
GistTransitionsByGist retrieves a row from 'public.gist_transitions' as a GistTransition.
Generated from index 'gist_transitions_index'.
func (GistTransitionQ) GistTransitionsByGistCtx ¶
func (q GistTransitionQ) GistTransitionsByGistCtx(ctx context.Context, gist string, isForUpdate bool) ([]data.GistTransition, error)
GistTransitionsByGistCtx retrieves a row from 'public.gist_transitions' as a GistTransition.
Generated from index 'gist_transitions_index'.
func (GistTransitionQ) Insert ¶
func (q GistTransitionQ) Insert(gt *data.GistTransition) error
Insert insert a GistTransition to the database.
func (GistTransitionQ) InsertCtx ¶
func (q GistTransitionQ) InsertCtx(ctx context.Context, gt *data.GistTransition) error
InsertCtx inserts a GistTransition to the database.
func (GistTransitionQ) Update ¶
func (q GistTransitionQ) Update(gt *data.GistTransition) error
Update updates a GistTransition in the database.
func (GistTransitionQ) UpdateCtx ¶
func (q GistTransitionQ) UpdateCtx(ctx context.Context, gt *data.GistTransition) error
UpdateCtx updates a GistTransition in the database.
func (GistTransitionQ) Upsert ¶
func (q GistTransitionQ) Upsert(gt *data.GistTransition) error
Upsert performs an upsert for GistTransition.
func (GistTransitionQ) UpsertCtx ¶
func (q GistTransitionQ) UpsertCtx(ctx context.Context, gt *data.GistTransition) error
UpsertCtx performs an upsert for GistTransition.
type GorpMigrationQ ¶
type GorpMigrationQ struct {
// contains filtered or unexported fields
}
func NewGorpMigrationQ ¶
func NewGorpMigrationQ(db *pgdb.DB) *GorpMigrationQ
NewGorpMigrationQ - creates new instance
func (GorpMigrationQ) Delete ¶
func (q GorpMigrationQ) Delete(gm *data.GorpMigration) error
Delete deletes the GorpMigration from the database.
func (GorpMigrationQ) DeleteCtx ¶
func (q GorpMigrationQ) DeleteCtx(ctx context.Context, gm *data.GorpMigration) error
DeleteCtx deletes the GorpMigration from the database.
func (GorpMigrationQ) GorpMigrationByID ¶
func (q GorpMigrationQ) GorpMigrationByID(id string, isForUpdate bool) (*data.GorpMigration, error)
GorpMigrationByID retrieves a row from 'public.gorp_migrations' as a GorpMigration.
Generated from index 'gorp_migrations_pkey'.
func (GorpMigrationQ) GorpMigrationByIDCtx ¶
func (q GorpMigrationQ) GorpMigrationByIDCtx(ctx context.Context, id string, isForUpdate bool) (*data.GorpMigration, error)
GorpMigrationByIDCtx retrieves a row from 'public.gorp_migrations' as a GorpMigration.
Generated from index 'gorp_migrations_pkey'.
func (GorpMigrationQ) Insert ¶
func (q GorpMigrationQ) Insert(gm *data.GorpMigration) error
Insert insert a GorpMigration to the database.
func (GorpMigrationQ) InsertCtx ¶
func (q GorpMigrationQ) InsertCtx(ctx context.Context, gm *data.GorpMigration) error
InsertCtx inserts a GorpMigration to the database.
func (GorpMigrationQ) Update ¶
func (q GorpMigrationQ) Update(gm *data.GorpMigration) error
Update updates a GorpMigration in the database.
func (GorpMigrationQ) UpdateCtx ¶
func (q GorpMigrationQ) UpdateCtx(ctx context.Context, gm *data.GorpMigration) error
UpdateCtx updates a GorpMigration in the database.
func (GorpMigrationQ) Upsert ¶
func (q GorpMigrationQ) Upsert(gm *data.GorpMigration) error
Upsert performs an upsert for GorpMigration.
func (GorpMigrationQ) UpsertCtx ¶
func (q GorpMigrationQ) UpsertCtx(ctx context.Context, gm *data.GorpMigration) error
UpsertCtx performs an upsert for GorpMigration.
type StateQ ¶
type StateQ struct {
// contains filtered or unexported fields
}
func (StateQ) StateByID ¶
StateByID retrieves a row from 'public.states' as a State.
Generated from index 'states_pkey'.
func (StateQ) StateByIDCtx ¶
StateByIDCtx retrieves a row from 'public.states' as a State.
Generated from index 'states_pkey'.
func (StateQ) StateByOperation ¶
StateByOperation retrieves a row from 'public.states' as a State.
Generated from index 'states_operation_key'.
func (StateQ) StateByOperationCtx ¶
func (q StateQ) StateByOperationCtx(ctx context.Context, operation string, isForUpdate bool) (*data.State, error)
StateByOperationCtx retrieves a row from 'public.states' as a State.
Generated from index 'states_operation_key'.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the helper struct for database operations
func (Storage) GistTransitionQ ¶
func (s Storage) GistTransitionQ() *GistTransitionQ
GistTransitionQ - creates new instance of GistTransitionQ
func (Storage) GorpMigrationQ ¶
func (s Storage) GorpMigrationQ() *GorpMigrationQ
GorpMigrationQ - creates new instance of GorpMigrationQ
func (*Storage) Transaction ¶
Transaction begins a transaction on repo.
func (Storage) TransitionQ ¶
func (s Storage) TransitionQ() *TransitionQ
TransitionQ - creates new instance of TransitionQ
type TransitionQ ¶
type TransitionQ struct {
// contains filtered or unexported fields
}
func NewTransitionQ ¶
func NewTransitionQ(db *pgdb.DB) *TransitionQ
NewTransitionQ - creates new instance
func (TransitionQ) Delete ¶
func (q TransitionQ) Delete(t *data.Transition) error
Delete deletes the Transition from the database.
func (TransitionQ) DeleteCtx ¶
func (q TransitionQ) DeleteCtx(ctx context.Context, t *data.Transition) error
DeleteCtx deletes the Transition from the database.
func (TransitionQ) Insert ¶
func (q TransitionQ) Insert(t *data.Transition) error
Insert insert a Transition to the database.
func (TransitionQ) InsertCtx ¶
func (q TransitionQ) InsertCtx(ctx context.Context, t *data.Transition) error
InsertCtx inserts a Transition to the database.
func (TransitionQ) TransitionByTx ¶
func (q TransitionQ) TransitionByTx(tx string, isForUpdate bool) (*data.Transition, error)
TransitionByTx retrieves a row from 'public.transitions' as a Transition.
Generated from index 'transitions_pkey'.
func (TransitionQ) TransitionByTxCtx ¶
func (q TransitionQ) TransitionByTxCtx(ctx context.Context, tx string, isForUpdate bool) (*data.Transition, error)
TransitionByTxCtx retrieves a row from 'public.transitions' as a Transition.
Generated from index 'transitions_pkey'.
func (TransitionQ) TransitionsByState ¶
func (q TransitionQ) TransitionsByState(state string, isForUpdate bool) ([]data.Transition, error)
TransitionsByState retrieves a row from 'public.transitions' as a Transition.
Generated from index 'transitions_index'.
func (TransitionQ) TransitionsByStateCtx ¶
func (q TransitionQ) TransitionsByStateCtx(ctx context.Context, state string, isForUpdate bool) ([]data.Transition, error)
TransitionsByStateCtx retrieves a row from 'public.transitions' as a Transition.
Generated from index 'transitions_index'.
func (TransitionQ) Update ¶
func (q TransitionQ) Update(t *data.Transition) error
Update updates a Transition in the database.
func (TransitionQ) UpdateCtx ¶
func (q TransitionQ) UpdateCtx(ctx context.Context, t *data.Transition) error
UpdateCtx updates a Transition in the database.
func (TransitionQ) Upsert ¶
func (q TransitionQ) Upsert(t *data.Transition) error
Upsert performs an upsert for Transition.
func (TransitionQ) UpsertCtx ¶
func (q TransitionQ) UpsertCtx(ctx context.Context, t *data.Transition) error
UpsertCtx performs an upsert for Transition.