Documentation ¶
Index ¶
- func Register(ctx context.Context, conn RegisterConn) error
- type CreateTenantRow
- type DBQuerier
- func (q *DBQuerier) CreateTenant(ctx context.Context, key string, name string) (CreateTenantRow, error)
- func (q *DBQuerier) FindOrdersByCustomer(ctx context.Context, customerID int32) ([]FindOrdersByCustomerRow, error)
- func (q *DBQuerier) FindOrdersByPrice(ctx context.Context, minTotal pgtype.Numeric) ([]FindOrdersByPriceRow, error)
- func (q *DBQuerier) FindOrdersMRR(ctx context.Context) ([]FindOrdersMRRRow, error)
- func (q *DBQuerier) FindProductsInOrder(ctx context.Context, orderID int32) ([]FindProductsInOrderRow, error)
- func (q *DBQuerier) InsertCustomer(ctx context.Context, params InsertCustomerParams) (InsertCustomerRow, error)
- func (q *DBQuerier) InsertOrder(ctx context.Context, params InsertOrderParams) (InsertOrderRow, error)
- type FindOrdersByCustomerRow
- type FindOrdersByPriceRow
- type FindOrdersMRRRow
- type FindProductsInOrderRow
- type InsertCustomerParams
- type InsertCustomerRow
- type InsertOrderParams
- type InsertOrderRow
- type Querier
- type RegisterConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateTenantRow ¶
type DBQuerier ¶
type DBQuerier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
NewQuerier creates a DBQuerier that implements Querier.
func (*DBQuerier) CreateTenant ¶
func (q *DBQuerier) CreateTenant(ctx context.Context, key string, name string) (CreateTenantRow, error)
CreateTenant implements Querier.CreateTenant.
func (*DBQuerier) FindOrdersByCustomer ¶
func (q *DBQuerier) FindOrdersByCustomer(ctx context.Context, customerID int32) ([]FindOrdersByCustomerRow, error)
FindOrdersByCustomer implements Querier.FindOrdersByCustomer.
func (*DBQuerier) FindOrdersByPrice ¶
func (q *DBQuerier) FindOrdersByPrice(ctx context.Context, minTotal pgtype.Numeric) ([]FindOrdersByPriceRow, error)
FindOrdersByPrice implements Querier.FindOrdersByPrice.
func (*DBQuerier) FindOrdersMRR ¶
func (q *DBQuerier) FindOrdersMRR(ctx context.Context) ([]FindOrdersMRRRow, error)
FindOrdersMRR implements Querier.FindOrdersMRR.
func (*DBQuerier) FindProductsInOrder ¶
func (q *DBQuerier) FindProductsInOrder(ctx context.Context, orderID int32) ([]FindProductsInOrderRow, error)
FindProductsInOrder implements Querier.FindProductsInOrder.
func (*DBQuerier) InsertCustomer ¶
func (q *DBQuerier) InsertCustomer(ctx context.Context, params InsertCustomerParams) (InsertCustomerRow, error)
InsertCustomer implements Querier.InsertCustomer.
func (*DBQuerier) InsertOrder ¶
func (q *DBQuerier) InsertOrder(ctx context.Context, params InsertOrderParams) (InsertOrderRow, error)
InsertOrder implements Querier.InsertOrder.
type FindOrdersByCustomerRow ¶
type FindOrdersByPriceRow ¶
type FindOrdersMRRRow ¶
type FindOrdersMRRRow struct { Month pgtype.Timestamptz `json:"month"` OrderMRR pgtype.Numeric `json:"order_mrr"` }
type FindProductsInOrderRow ¶
type InsertCustomerParams ¶
type InsertCustomerRow ¶
type InsertOrderParams ¶
type InsertOrderParams struct { OrderDate pgtype.Timestamptz `json:"order_date"` OrderTotal pgtype.Numeric `json:"order_total"` CustID int32 `json:"cust_id"` }
type InsertOrderRow ¶
type Querier ¶
type Querier interface { CreateTenant(ctx context.Context, key string, name string) (CreateTenantRow, error) FindOrdersByCustomer(ctx context.Context, customerID int32) ([]FindOrdersByCustomerRow, error) FindProductsInOrder(ctx context.Context, orderID int32) ([]FindProductsInOrderRow, error) InsertCustomer(ctx context.Context, params InsertCustomerParams) (InsertCustomerRow, error) InsertOrder(ctx context.Context, params InsertOrderParams) (InsertOrderRow, error) FindOrdersByPrice(ctx context.Context, minTotal pgtype.Numeric) ([]FindOrdersByPriceRow, error) FindOrdersMRR(ctx context.Context) ([]FindOrdersMRRRow, error) }
Querier is a typesafe Go interface backed by SQL queries.
Click to show internal directories.
Click to hide internal directories.