Versions in this module Expand all Collapse all v1 v1.1.0 Jun 23, 2025 Changes in this version + func Errorf(s string, v ...any) + func Logf(s string, v ...any) + func SetErrorLogger(logger any) + func SetLogger(logger any) + type Category struct + CategoryID int16 + CategoryName string + Description sql.NullString + Picture []byte + func CategoryByCategoryID(ctx context.Context, db DB, categoryID int16) (*Category, error) + func (c *Category) Delete(ctx context.Context, db DB) error + func (c *Category) Deleted() bool + func (c *Category) Exists() bool + func (c *Category) Insert(ctx context.Context, db DB) error + func (c *Category) Save(ctx context.Context, db DB) error + func (c *Category) Update(ctx context.Context, db DB) error + func (c *Category) Upsert(ctx context.Context, db DB) error + type Customer struct + Address sql.NullString + City sql.NullString + CompanyName string + ContactName sql.NullString + ContactTitle sql.NullString + Country sql.NullString + CustomerID string + Fax sql.NullString + Phone sql.NullString + PostalCode sql.NullString + Region sql.NullString + func CustomerByCustomerID(ctx context.Context, db DB, customerID string) (*Customer, error) + func (c *Customer) Delete(ctx context.Context, db DB) error + func (c *Customer) Deleted() bool + func (c *Customer) Exists() bool + func (c *Customer) Insert(ctx context.Context, db DB) error + func (c *Customer) Save(ctx context.Context, db DB) error + func (c *Customer) Update(ctx context.Context, db DB) error + func (c *Customer) Upsert(ctx context.Context, db DB) error + type CustomerCustomerDemo struct + CustomerID string + CustomerTypeID string + func CustomerCustomerDemoByCustomerIDCustomerTypeID(ctx context.Context, db DB, customerID, customerTypeID string) (*CustomerCustomerDemo, error) + func (ccd *CustomerCustomerDemo) Customer(ctx context.Context, db DB) (*Customer, error) + func (ccd *CustomerCustomerDemo) CustomerDemographic(ctx context.Context, db DB) (*CustomerDemographic, error) + func (ccd *CustomerCustomerDemo) Delete(ctx context.Context, db DB) error + func (ccd *CustomerCustomerDemo) Deleted() bool + func (ccd *CustomerCustomerDemo) Exists() bool + func (ccd *CustomerCustomerDemo) Insert(ctx context.Context, db DB) error + type CustomerDemographic struct + CustomerDesc sql.NullString + CustomerTypeID string + func CustomerDemographicByCustomerTypeID(ctx context.Context, db DB, customerTypeID string) (*CustomerDemographic, error) + func (cd *CustomerDemographic) Delete(ctx context.Context, db DB) error + func (cd *CustomerDemographic) Deleted() bool + func (cd *CustomerDemographic) Exists() bool + func (cd *CustomerDemographic) Insert(ctx context.Context, db DB) error + func (cd *CustomerDemographic) Save(ctx context.Context, db DB) error + func (cd *CustomerDemographic) Update(ctx context.Context, db DB) error + func (cd *CustomerDemographic) Upsert(ctx context.Context, db DB) error + type DB interface + ExecContext func(context.Context, string, ...any) (sql.Result, error) + QueryContext func(context.Context, string, ...any) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...any) *sql.Row + type Employee struct + Address sql.NullString + BirthDate sql.NullTime + City sql.NullString + Country sql.NullString + EmployeeID int16 + Extension sql.NullString + FirstName string + HireDate sql.NullTime + HomePhone sql.NullString + LastName string + Notes sql.NullString + Photo []byte + PhotoPath sql.NullString + PostalCode sql.NullString + Region sql.NullString + ReportsTo sql.NullInt64 + Title sql.NullString + TitleOfCourtesy sql.NullString + func EmployeeByEmployeeID(ctx context.Context, db DB, employeeID int16) (*Employee, error) + func (e *Employee) Delete(ctx context.Context, db DB) error + func (e *Employee) Deleted() bool + func (e *Employee) Employee(ctx context.Context, db DB) (*Employee, error) + func (e *Employee) Exists() bool + func (e *Employee) Insert(ctx context.Context, db DB) error + func (e *Employee) Save(ctx context.Context, db DB) error + func (e *Employee) Update(ctx context.Context, db DB) error + func (e *Employee) Upsert(ctx context.Context, db DB) error + type EmployeeTerritory struct + EmployeeID int16 + TerritoryID string + func EmployeeTerritoryByEmployeeIDTerritoryID(ctx context.Context, db DB, employeeID int16, territoryID string) (*EmployeeTerritory, error) + func (et *EmployeeTerritory) Delete(ctx context.Context, db DB) error + func (et *EmployeeTerritory) Deleted() bool + func (et *EmployeeTerritory) Employee(ctx context.Context, db DB) (*Employee, error) + func (et *EmployeeTerritory) Exists() bool + func (et *EmployeeTerritory) Insert(ctx context.Context, db DB) error + func (et *EmployeeTerritory) Territory(ctx context.Context, db DB) (*Territory, error) + type ErrInsertFailed struct + Err error + func (err *ErrInsertFailed) Error() string + func (err *ErrInsertFailed) Unwrap() error + type ErrUpdateFailed struct + Err error + func (err *ErrUpdateFailed) Error() string + func (err *ErrUpdateFailed) Unwrap() error + type ErrUpsertFailed struct + Err error + func (err *ErrUpsertFailed) Error() string + func (err *ErrUpsertFailed) Unwrap() error + type Error string + const ErrAlreadyExists + const ErrDoesNotExist + const ErrMarkedForDeletion + func (err Error) Error() string + type Order struct + CustomerID sql.NullString + EmployeeID sql.NullInt64 + Freight sql.NullFloat64 + OrderDate sql.NullTime + OrderID int16 + RequiredDate sql.NullTime + ShipAddress sql.NullString + ShipCity sql.NullString + ShipCountry sql.NullString + ShipName sql.NullString + ShipPostalCode sql.NullString + ShipRegion sql.NullString + ShippedDate sql.NullTime + func OrderByOrderID(ctx context.Context, db DB, orderID int16) (*Order, error) + func (o *Order) Customer(ctx context.Context, db DB) (*Customer, error) + func (o *Order) Delete(ctx context.Context, db DB) error + func (o *Order) Deleted() bool + func (o *Order) Employee(ctx context.Context, db DB) (*Employee, error) + func (o *Order) Exists() bool + func (o *Order) Insert(ctx context.Context, db DB) error + func (o *Order) Save(ctx context.Context, db DB) error + func (o *Order) Update(ctx context.Context, db DB) error + func (o *Order) Upsert(ctx context.Context, db DB) error + type OrderDetail struct + Discount float32 + OrderID int16 + ProductID int16 + Quantity int16 + UnitPrice float32 + func OrderDetailByOrderIDProductID(ctx context.Context, db DB, orderID, productID int16) (*OrderDetail, error) + func (od *OrderDetail) Delete(ctx context.Context, db DB) error + func (od *OrderDetail) Deleted() bool + func (od *OrderDetail) Exists() bool + func (od *OrderDetail) Insert(ctx context.Context, db DB) error + func (od *OrderDetail) Order(ctx context.Context, db DB) (*Order, error) + func (od *OrderDetail) Product(ctx context.Context, db DB) (*Product, error) + func (od *OrderDetail) Save(ctx context.Context, db DB) error + func (od *OrderDetail) Update(ctx context.Context, db DB) error + func (od *OrderDetail) Upsert(ctx context.Context, db DB) error + type Product struct + CategoryID sql.NullInt64 + Discontinued int + ProductID int16 + ProductName string + QuantityPerUnit sql.NullString + ReorderLevel sql.NullInt64 + SupplierID sql.NullInt64 + UnitPrice sql.NullFloat64 + UnitsInStock sql.NullInt64 + UnitsOnOrder sql.NullInt64 + func ProductByProductID(ctx context.Context, db DB, productID int16) (*Product, error) + func (p *Product) Category(ctx context.Context, db DB) (*Category, error) + func (p *Product) Delete(ctx context.Context, db DB) error + func (p *Product) Deleted() bool + func (p *Product) Exists() bool + func (p *Product) Insert(ctx context.Context, db DB) error + func (p *Product) Save(ctx context.Context, db DB) error + func (p *Product) Supplier(ctx context.Context, db DB) (*Supplier, error) + func (p *Product) Update(ctx context.Context, db DB) error + func (p *Product) Upsert(ctx context.Context, db DB) error + type Region struct + RegionDescription string + RegionID int16 + func RegionByRegionID(ctx context.Context, db DB, regionID int16) (*Region, error) + func (r *Region) Delete(ctx context.Context, db DB) error + func (r *Region) Deleted() bool + func (r *Region) Exists() bool + func (r *Region) Insert(ctx context.Context, db DB) error + func (r *Region) Save(ctx context.Context, db DB) error + func (r *Region) Update(ctx context.Context, db DB) error + func (r *Region) Upsert(ctx context.Context, db DB) error + type Shipper struct + CompanyName string + Phone sql.NullString + ShipperID int16 + func ShipperByShipperID(ctx context.Context, db DB, shipperID int16) (*Shipper, error) + func (s *Shipper) Delete(ctx context.Context, db DB) error + func (s *Shipper) Deleted() bool + func (s *Shipper) Exists() bool + func (s *Shipper) Insert(ctx context.Context, db DB) error + func (s *Shipper) Save(ctx context.Context, db DB) error + func (s *Shipper) Update(ctx context.Context, db DB) error + func (s *Shipper) Upsert(ctx context.Context, db DB) error + type Supplier struct + Address sql.NullString + City sql.NullString + CompanyName string + ContactName sql.NullString + ContactTitle sql.NullString + Country sql.NullString + Fax sql.NullString + Homepage sql.NullString + Phone sql.NullString + PostalCode sql.NullString + Region sql.NullString + SupplierID int16 + func SupplierBySupplierID(ctx context.Context, db DB, supplierID int16) (*Supplier, error) + func (s *Supplier) Delete(ctx context.Context, db DB) error + func (s *Supplier) Deleted() bool + func (s *Supplier) Exists() bool + func (s *Supplier) Insert(ctx context.Context, db DB) error + func (s *Supplier) Save(ctx context.Context, db DB) error + func (s *Supplier) Update(ctx context.Context, db DB) error + func (s *Supplier) Upsert(ctx context.Context, db DB) error + type Territory struct + RegionID int16 + TerritoryDescription string + TerritoryID string + func TerritoryByTerritoryID(ctx context.Context, db DB, territoryID string) (*Territory, error) + func (t *Territory) Delete(ctx context.Context, db DB) error + func (t *Territory) Deleted() bool + func (t *Territory) Exists() bool + func (t *Territory) Insert(ctx context.Context, db DB) error + func (t *Territory) Region(ctx context.Context, db DB) (*Region, error) + func (t *Territory) Save(ctx context.Context, db DB) error + func (t *Territory) Update(ctx context.Context, db DB) error + func (t *Territory) Upsert(ctx context.Context, db DB) error + type UsState struct + StateAbbr sql.NullString + StateID int16 + StateName sql.NullString + StateRegion sql.NullString + func UsStateByStateID(ctx context.Context, db DB, stateID int16) (*UsState, error) + func (us *UsState) Delete(ctx context.Context, db DB) error + func (us *UsState) Deleted() bool + func (us *UsState) Exists() bool + func (us *UsState) Insert(ctx context.Context, db DB) error + func (us *UsState) Save(ctx context.Context, db DB) error + func (us *UsState) Update(ctx context.Context, db DB) error + func (us *UsState) Upsert(ctx context.Context, db DB) error