sqlc

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserParams

type CreateUserParams struct {
	ID            string         `json:"id"`
	Avatar        sql.NullString `json:"avatar"`
	Name          string         `json:"name"`
	Email         sql.NullString `json:"email"`
	CreatedAt     string         `json:"created_at"`
	UpdatedAt     string         `json:"updated_at"`
	Disabled      int32          `json:"disabled"`
	PhoneNumber   sql.NullString `json:"phone_number"`
	PhoneVerified int32          `json:"phone_verified"`
}

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 Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateUser

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

SMS User Phone queries

func (*Queries) GetUserByID

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

func (*Queries) GetUserByPhone

func (q *Queries) GetUserByPhone(ctx context.Context, phoneNumber sql.NullString) (User, error)

func (*Queries) UpdateUserPhone

func (q *Queries) UpdateUserPhone(ctx context.Context, arg UpdateUserPhoneParams) error

func (*Queries) WithTx

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

type UpdateUserPhoneParams

type UpdateUserPhoneParams struct {
	ID            string         `json:"id"`
	PhoneNumber   sql.NullString `json:"phone_number"`
	PhoneVerified int32          `json:"phone_verified"`
	UpdatedAt     string         `json:"updated_at"`
}

type User

type User struct {
	ID            string         `json:"id"`
	Avatar        sql.NullString `json:"avatar"`
	Name          string         `json:"name"`
	Email         sql.NullString `json:"email"`
	CreatedAt     string         `json:"created_at"`
	UpdatedAt     string         `json:"updated_at"`
	Disabled      int32          `json:"disabled"`
	PhoneNumber   sql.NullString `json:"phone_number"`
	PhoneVerified int32          `json:"phone_verified"`
}

Jump to

Keyboard shortcuts

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