Documentation ¶
Index ¶
- type CreateProductParams
- type DBTX
- type Product
- type Querier
- type Queries
- func (q *Queries) CreateProduct(ctx context.Context, arg CreateProductParams) (Product, error)
- func (q *Queries) DeleteProduct(ctx context.Context, id int32) error
- func (q *Queries) GetProduct(ctx context.Context, id int32) (Product, error)
- func (q *Queries) GetProducts(ctx context.Context) ([]Product, error)
- func (q *Queries) UpdateProduct(ctx context.Context, arg UpdateProductParams) (Product, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type StoreExec
- type UpdateProductParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateProductParams ¶
type Product ¶
type Product struct { ID int32 `json:"id"` Name string `json:"name"` Price int32 `json:"price"` CreatedAt time.Time `json:"created_at"` }
Representação de tabela
type Querier ¶
type Querier interface { CreateProduct(ctx context.Context, arg CreateProductParams) (Product, error) DeleteProduct(ctx context.Context, id int32) error GetProduct(ctx context.Context, id int32) (Product, error) GetProducts(ctx context.Context) ([]Product, error) UpdateProduct(ctx context.Context, arg UpdateProductParams) (Product, error) }
Acesso por queries ao banco de dados
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateProduct ¶
func (*Queries) DeleteProduct ¶
func (*Queries) GetProduct ¶
func (*Queries) UpdateProduct ¶
type StoreExec ¶
type StoreExec struct { *Queries // contains filtered or unexported fields }
func NewStoreExec ¶
type UpdateProductParams ¶
Click to show internal directories.
Click to hide internal directories.