models_mysql

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queries

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

func New

func New(db models.DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db models.DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) Count

func (q *Queries) Count(ctx context.Context) (int64, error)

func (*Queries) CountMany

func (q *Queries) CountMany(ctx context.Context, isActive bool, isAdministrator bool) (int64, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, email string, username string, password string, firstName string, lastName string, isAdministrator bool, isActive bool) (int64, error)

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, id uint64) error

func (*Queries) Retrieve

func (q *Queries) Retrieve(ctx context.Context, limit int32, offset int32) ([]*models.User, error)

func (*Queries) RetrieveByEmail

func (q *Queries) RetrieveByEmail(ctx context.Context, email string) (*models.User, error)

func (*Queries) RetrieveByID

func (q *Queries) RetrieveByID(ctx context.Context, id uint64) (*models.User, error)

func (*Queries) RetrieveByUsername

func (q *Queries) RetrieveByUsername(ctx context.Context, username string) (*models.User, error)

func (*Queries) RetrieveMany

func (q *Queries) RetrieveMany(ctx context.Context, isActive bool, isAdministrator bool, limit int32, offset int32) ([]*models.User, error)

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, email string, username string, password string, firstName string, lastName string, isAdministrator bool, isActive bool, iD uint64) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) models.Querier

Jump to

Keyboard shortcuts

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