pg

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pg contains generated code for schema 'public'.

Index

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 NewGistQ

func NewGistQ(db *pgdb.DB) *GistQ

NewGistQ - creates new instance

func (GistQ) Delete

func (q GistQ) Delete(g *data.Gist) error

Delete deletes the Gist from the database.

func (GistQ) DeleteCtx

func (q GistQ) DeleteCtx(ctx context.Context, g *data.Gist) error

DeleteCtx deletes the Gist from the database.

func (GistQ) GistByID

func (q GistQ) GistByID(id string, isForUpdate bool) (*data.Gist, error)

GistByID retrieves a row from 'public.gists' as a Gist.

Generated from index 'gists_pkey'.

func (GistQ) GistByIDCtx

func (q GistQ) GistByIDCtx(ctx context.Context, id string, isForUpdate bool) (*data.Gist, error)

GistByIDCtx retrieves a row from 'public.gists' as a Gist.

Generated from index 'gists_pkey'.

func (GistQ) GistByOperation

func (q GistQ) GistByOperation(operation string, isForUpdate bool) (*data.Gist, error)

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'.

func (GistQ) Insert

func (q GistQ) Insert(g *data.Gist) error

Insert insert a Gist to the database.

func (GistQ) InsertCtx

func (q GistQ) InsertCtx(ctx context.Context, g *data.Gist) error

InsertCtx inserts a Gist to the database.

func (GistQ) Update

func (q GistQ) Update(g *data.Gist) error

Update updates a Gist in the database.

func (GistQ) UpdateCtx

func (q GistQ) UpdateCtx(ctx context.Context, g *data.Gist) error

UpdateCtx updates a Gist in the database.

func (GistQ) Upsert

func (q GistQ) Upsert(g *data.Gist) error

Upsert performs an upsert for Gist.

func (GistQ) UpsertCtx

func (q GistQ) UpsertCtx(ctx context.Context, g *data.Gist) error

UpsertCtx performs an upsert for Gist.

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 NewStateQ

func NewStateQ(db *pgdb.DB) *StateQ

NewStateQ - creates new instance

func (StateQ) Delete

func (q StateQ) Delete(s *data.State) error

Delete deletes the State from the database.

func (StateQ) DeleteCtx

func (q StateQ) DeleteCtx(ctx context.Context, s *data.State) error

DeleteCtx deletes the State from the database.

func (StateQ) Insert

func (q StateQ) Insert(s *data.State) error

Insert insert a State to the database.

func (StateQ) InsertCtx

func (q StateQ) InsertCtx(ctx context.Context, s *data.State) error

InsertCtx inserts a State to the database.

func (StateQ) StateByID

func (q StateQ) StateByID(id string, isForUpdate bool) (*data.State, error)

StateByID retrieves a row from 'public.states' as a State.

Generated from index 'states_pkey'.

func (StateQ) StateByIDCtx

func (q StateQ) StateByIDCtx(ctx context.Context, id string, isForUpdate bool) (*data.State, error)

StateByIDCtx retrieves a row from 'public.states' as a State.

Generated from index 'states_pkey'.

func (StateQ) StateByOperation

func (q StateQ) StateByOperation(operation string, isForUpdate bool) (*data.State, error)

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'.

func (StateQ) Update

func (q StateQ) Update(s *data.State) error

Update updates a State in the database.

func (StateQ) UpdateCtx

func (q StateQ) UpdateCtx(ctx context.Context, s *data.State) error

UpdateCtx updates a State in the database.

func (StateQ) Upsert

func (q StateQ) Upsert(s *data.State) error

Upsert performs an upsert for State.

func (StateQ) UpsertCtx

func (q StateQ) UpsertCtx(ctx context.Context, s *data.State) error

UpsertCtx performs an upsert for State.

type Storage

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

Storage is the helper struct for database operations

func New

func New(db *pgdb.DB) *Storage

New - returns new instance of storage

func (*Storage) Clone

func (s *Storage) Clone() *Storage

Clone - returns new storage with clone of db

func (*Storage) DB

func (s *Storage) DB() *pgdb.DB

DB - returns db used by Storage

func (Storage) GistQ

func (s Storage) GistQ() *GistQ

GistQ - creates new instance of GistQ

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) StateQ

func (s Storage) StateQ() *StateQ

StateQ - creates new instance of StateQ

func (*Storage) Transaction

func (s *Storage) Transaction(tx func() error) error

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.

Jump to

Keyboard shortcuts

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