advanceddb

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 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 CreateOrderRow

type CreateOrderRow struct {
	Id          any
	UserId      any
	Status      any
	TotalAmount any
	CreatedAt   int32
	UpdatedAt   *int32
}

type CreateProductRow

type CreateProductRow struct {
	Id        any
	Sku       any
	Name      string
	Price     any
	CreatedAt int32
}

type CreateUserRow

type CreateUserRow struct {
	Id        any
	Email     any
	CreatedAt int32
}

type DBTX

type DBTX interface {
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}

type GetOrderRow

type GetOrderRow struct {
	Id          any
	UserId      any
	Status      any
	TotalAmount any
	CreatedAt   int32
	UpdatedAt   *int32
}

type GetOrderStatisticsRow

type GetOrderStatisticsRow struct {
	TotalOrders  int64
	TotalRevenue *any
}

type GetOrdersByStatusRow

type GetOrdersByStatusRow struct {
	Id          any
	UserId      any
	Status      any
	TotalAmount any
	CreatedAt   int32
}

type GetProductBySkuRow

type GetProductBySkuRow struct {
	Id        any
	Sku       any
	Name      string
	Price     any
	CreatedAt int32
}

type GetProductRow

type GetProductRow struct {
	Id        any
	Sku       any
	Name      string
	Price     any
	CreatedAt int32
}

type GetUserByEmailRow

type GetUserByEmailRow struct {
	Id        any
	Email     any
	CreatedAt int32
}

type GetUserRow

type GetUserRow struct {
	Id        any
	Email     any
	CreatedAt int32
}

type ListOrdersByUserRow

type ListOrdersByUserRow struct {
	Id          any
	Status      any
	TotalAmount any
	CreatedAt   int32
}

type ListProductsRow

type ListProductsRow struct {
	Id        any
	Sku       any
	Name      string
	Price     any
	CreatedAt int32
}

type ListUsersRow

type ListUsersRow struct {
	Id        any
	Email     any
	CreatedAt int32
}

type Orders

type Orders struct {
	Id          types.OrderID `json:"id"`
	UserId      types.UserID  `json:"user_id"`
	Status      types.Status  `json:"status"`
	TotalAmount types.Money   `json:"total_amount"`
	CreatedAt   int32         `json:"created_at"`
	UpdatedAt   *int32        `json:"updated_at"`
}

type Products

type Products struct {
	Id        types.ProductID `json:"id"`
	Sku       types.SKU       `json:"sku"`
	Name      string          `json:"name"`
	Price     types.Money     `json:"price"`
	CreatedAt int32           `json:"created_at"`
}

type Querier

type Querier interface {
	CreateOrder(ctx context.Context, arg1 any, arg2 any, arg3 any) (CreateOrderRow, error)
	CreateProduct(ctx context.Context, arg1 any, arg2 string, arg3 any) (CreateProductRow, error)
	CreateUser(ctx context.Context, arg1 any) (CreateUserRow, error)
	GetOrder(ctx context.Context, id any) (GetOrderRow, error)
	GetOrderStatistics(ctx context.Context, userId any) (GetOrderStatisticsRow, error)
	GetOrdersByStatus(ctx context.Context, status any) ([]GetOrdersByStatusRow, error)
	GetProduct(ctx context.Context, id any) (GetProductRow, error)
	GetProductBySku(ctx context.Context, sku any) (GetProductBySkuRow, error)
	GetUser(ctx context.Context, id any) (GetUserRow, error)
	GetUserByEmail(ctx context.Context, email any) (GetUserByEmailRow, error)
	ListOrdersByUser(ctx context.Context, userId any) ([]ListOrdersByUserRow, error)
	ListProducts(ctx context.Context) ([]ListProductsRow, error)
	ListUsers(ctx context.Context) ([]ListUsersRow, error)
	UpdateOrderStatus(ctx context.Context, status any, arg2 any) (UpdateOrderStatusRow, error)
	UpdateProductPrice(ctx context.Context, price any, arg2 any) (UpdateProductPriceRow, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateOrder

func (q *Queries) CreateOrder(ctx context.Context, arg1 any, arg2 any, arg3 any) (CreateOrderRow, error)

func (*Queries) CreateProduct

func (q *Queries) CreateProduct(ctx context.Context, arg1 any, arg2 string, arg3 any) (CreateProductRow, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg1 any) (CreateUserRow, error)

func (*Queries) GetOrder

func (q *Queries) GetOrder(ctx context.Context, id any) (GetOrderRow, error)

func (*Queries) GetOrderStatistics

func (q *Queries) GetOrderStatistics(ctx context.Context, userId any) (GetOrderStatisticsRow, error)

func (*Queries) GetOrdersByStatus

func (q *Queries) GetOrdersByStatus(ctx context.Context, status any) ([]GetOrdersByStatusRow, error)

func (*Queries) GetProduct

func (q *Queries) GetProduct(ctx context.Context, id any) (GetProductRow, error)

func (*Queries) GetProductBySku

func (q *Queries) GetProductBySku(ctx context.Context, sku any) (GetProductBySkuRow, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, id any) (GetUserRow, error)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email any) (GetUserByEmailRow, error)

func (*Queries) ListOrdersByUser

func (q *Queries) ListOrdersByUser(ctx context.Context, userId any) ([]ListOrdersByUserRow, error)

func (*Queries) ListProducts

func (q *Queries) ListProducts(ctx context.Context) ([]ListProductsRow, error)

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error)

func (*Queries) UpdateOrderStatus

func (q *Queries) UpdateOrderStatus(ctx context.Context, status any, arg2 any) (UpdateOrderStatusRow, error)

func (*Queries) UpdateProductPrice

func (q *Queries) UpdateProductPrice(ctx context.Context, price any, arg2 any) (UpdateProductPriceRow, error)

type QueryResult

type QueryResult struct {
	LastInsertID int64
	RowsAffected int64
}

type UpdateOrderStatusRow

type UpdateOrderStatusRow struct {
	Id          any
	UserId      any
	Status      any
	TotalAmount any
	CreatedAt   int32
	UpdatedAt   *int32
}

type UpdateProductPriceRow

type UpdateProductPriceRow struct {
	Id        any
	Sku       any
	Name      string
	Price     any
	CreatedAt int32
}

type Users

type Users struct {
	Id        types.UserID `json:"id"`
	Email     types.Email  `json:"email"`
	CreatedAt int32        `json:"created_at"`
}

Jump to

Keyboard shortcuts

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