Documentation
¶
Index ¶
- type CreateSaleParams
- type DBTX
- type EOrderPriority
- type ESalesChannel
- type ListSalesParams
- type NullEOrderPriority
- type NullESalesChannel
- type Querier
- type Queries
- func (q *Queries) CreateSale(ctx context.Context, arg CreateSaleParams) (Sale, error)
- func (q *Queries) GetSale(ctx context.Context, id int64) (Sale, error)
- func (q *Queries) GetSaleForUpdate(ctx context.Context, id int64) (Sale, error)
- func (q *Queries) ListSales(ctx context.Context, arg ListSalesParams) ([]Sale, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Sale
- type Store
- type TxStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateSaleParams ¶
type CreateSaleParams struct { Region string `json:"region"` Country string `json:"country"` ItemType string `json:"item_type"` SalesChannel ESalesChannel `json:"sales_channel"` OrderPriority EOrderPriority `json:"order_priority"` OrderDate time.Time `json:"order_date"` OrderID int64 `json:"order_id"` ShipDate time.Time `json:"ship_date"` UnitsSold int32 `json:"units_sold"` UnitPrice float32 `json:"unit_price"` UnitCost float32 `json:"unit_cost"` TotalRevenue pgtype.Numeric `json:"total_revenue"` TotalCost pgtype.Numeric `json:"total_cost"` TotalProfit pgtype.Numeric `json:"total_profit"` }
type EOrderPriority ¶
type EOrderPriority string
const ( EOrderPriorityC EOrderPriority = "C" EOrderPriorityH EOrderPriority = "H" EOrderPriorityM EOrderPriority = "M" EOrderPriorityL EOrderPriority = "L" )
func (*EOrderPriority) Scan ¶
func (e *EOrderPriority) Scan(src interface{}) error
type ESalesChannel ¶
type ESalesChannel string
const ( ESalesChannelOffline ESalesChannel = "Offline" ESalesChannelOnline ESalesChannel = "Online" )
func (*ESalesChannel) Scan ¶
func (e *ESalesChannel) Scan(src interface{}) error
type ListSalesParams ¶
type NullEOrderPriority ¶
type NullEOrderPriority struct { EOrderPriority EOrderPriority `json:"e_order_priority"` Valid bool `json:"valid"` // Valid is true if EOrderPriority is not NULL }
func (*NullEOrderPriority) Scan ¶
func (ns *NullEOrderPriority) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullESalesChannel ¶
type NullESalesChannel struct { ESalesChannel ESalesChannel `json:"e_sales_channel"` Valid bool `json:"valid"` // Valid is true if ESalesChannel is not NULL }
func (*NullESalesChannel) Scan ¶
func (ns *NullESalesChannel) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateSale ¶
func (*Queries) GetSaleForUpdate ¶
type Sale ¶
type Sale struct { ID int64 `json:"id"` Region string `json:"region"` Country string `json:"country"` ItemType string `json:"item_type"` SalesChannel ESalesChannel `json:"sales_channel"` OrderPriority EOrderPriority `json:"order_priority"` OrderDate time.Time `json:"order_date"` OrderID int64 `json:"order_id"` ShipDate time.Time `json:"ship_date"` UnitsSold int32 `json:"units_sold"` UnitPrice float32 `json:"unit_price"` UnitCost float32 `json:"unit_cost"` TotalRevenue pgtype.Numeric `json:"total_revenue"` TotalCost pgtype.Numeric `json:"total_cost"` TotalProfit pgtype.Numeric `json:"total_profit"` CreatedAt time.Time `json:"created_at"` }
Click to show internal directories.
Click to hide internal directories.