query

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Q                 = new(Query)
	Character         *character
	CharacterSubjects *characterSubjects
	Episode           *episode
	Member            *member
	OAuthAccessToken  *oAuthAccessToken
	Person            *person
	PersonField       *personField
	PersonSubjects    *personSubjects
	Subject           *subject
	SubjectField      *subjectField
	SubjectRelation   *subjectRelation
	SubjectRevision   *subjectRevision
)

Functions

func SetDefault

func SetDefault(db *gorm.DB)

Types

type Query

type Query struct {
	Character         character
	CharacterSubjects characterSubjects
	Episode           episode
	Member            member
	OAuthAccessToken  oAuthAccessToken
	Person            person
	PersonField       personField
	PersonSubjects    personSubjects
	Subject           subject
	SubjectField      subjectField
	SubjectRelation   subjectRelation
	SubjectRevision   subjectRevision
	// contains filtered or unexported fields
}

func Use

func Use(db *gorm.DB) *Query

func (*Query) Available

func (q *Query) Available() bool

func (*Query) Begin

func (q *Query) Begin(opts ...*sql.TxOptions) *QueryTx

func (*Query) Transaction

func (q *Query) Transaction(fc func(tx *Query) error, opts ...*sql.TxOptions) error

func (*Query) WithContext

func (q *Query) WithContext(ctx context.Context) *queryCtx

type QueryTx

type QueryTx struct{ *Query }

func (*QueryTx) Commit

func (q *QueryTx) Commit() error

func (*QueryTx) Rollback

func (q *QueryTx) Rollback() error

func (*QueryTx) RollbackTo

func (q *QueryTx) RollbackTo(name string) error

func (*QueryTx) SavePoint

func (q *QueryTx) SavePoint(name string) error

Jump to

Keyboard shortcuts

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