internal

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateBulkUserParams

type CreateBulkUserParams struct {
	Email       string        `json:"email"`
	Name        string        `json:"name"`
	Age         sql.NullInt32 `json:"age"`
	Password    string        `json:"password"`
	ApiKey      []byte        `json:"api_key"`
	IsActive    bool          `json:"is_active"`
	LoginCount  int64         `json:"login_count"`
	Rating      float64       `json:"rating"`
	Preferences string        `json:"preferences"`
	CreatedAt   time.Time     `json:"created_at"`
	UpdatedAt   time.Time     `json:"updated_at"`
}

type CreateUserParams

type CreateUserParams struct {
	Email       string        `json:"email"`
	Name        string        `json:"name"`
	Age         sql.NullInt32 `json:"age"`
	Password    string        `json:"password"`
	ApiKey      []byte        `json:"api_key"`
	IsActive    bool          `json:"is_active"`
	LoginCount  int64         `json:"login_count"`
	Rating      float64       `json:"rating"`
	Preferences string        `json:"preferences"`
	CreatedAt   time.Time     `json:"created_at"`
	UpdatedAt   time.Time     `json:"updated_at"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type ListUserFilterByAgeNameParams

type ListUserFilterByAgeNameParams struct {
	MinAge sql.NullInt32 `json:"min_age"`
	MaxAge sql.NullInt32 `json:"max_age"`
	Name   string        `json:"name"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateBulkUser

func (q *Queries) CreateBulkUser(ctx context.Context, arg CreateBulkUserParams) (int32, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (int32, error)

Code generated by entlite. DO NOT EDIT. SQLC compatible query definitions User CRUD operations

func (*Queries) DB

func (q *Queries) DB() DBTX

DB returns the handle this Queries was constructed with.

func (*Queries) DeleteAllUser

func (q *Queries) DeleteAllUser(ctx context.Context) error

func (*Queries) DeleteUser

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

func (*Queries) GetUserByEmail

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

Look up a user by email address

func (*Queries) GetUserByID

func (q *Queries) GetUserByID(ctx context.Context, id int32) (User, error)

func (*Queries) ListActive

func (q *Queries) ListActive(ctx context.Context, isActive bool) ([]User, error)

func (*Queries) ListAllUser

func (q *Queries) ListAllUser(ctx context.Context) ([]User, error)

func (*Queries) ListUserFilterByAgeName

func (q *Queries) ListUserFilterByAgeName(ctx context.Context, arg ListUserFilterByAgeNameParams) ([]User, error)

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)

func (*Queries) WithTx

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

type UpdateUserParams

type UpdateUserParams struct {
	Email       string          `json:"email"`
	Name        string          `json:"name"`
	Age         sql.NullInt32   `json:"age"`
	Password    sql.NullString  `json:"password"`
	IsActive    sql.NullBool    `json:"is_active"`
	LoginCount  sql.NullInt64   `json:"login_count"`
	Rating      sql.NullFloat64 `json:"rating"`
	Preferences sql.NullString  `json:"preferences"`
	UpdatedAt   time.Time       `json:"updated_at"`
	ID          int32           `json:"id"`
}

type User

type User struct {
	ID          int32         `json:"id"`
	Email       string        `json:"email"`
	Name        string        `json:"name"`
	Age         sql.NullInt32 `json:"age"`
	Password    string        `json:"password"`
	ApiKey      []byte        `json:"api_key"`
	IsActive    bool          `json:"is_active"`
	LoginCount  int64         `json:"login_count"`
	Rating      float64       `json:"rating"`
	Preferences string        `json:"preferences"`
	CreatedAt   time.Time     `json:"created_at"`
	UpdatedAt   time.Time     `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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