Versions in this module Expand all Collapse all v1 v1.1.1 Nov 5, 2022 Changes in this version + var TimestampFormats = []string + func Errorf(s string, v ...interface{}) + func Logf(s string, v ...interface{}) + func SetErrorLogger(logger interface{}) + func SetLogger(logger interface{}) + type Category struct + CategoryID int + CategoryName string + Description sql.NullString + Picture []byte + func CategoryByCategoryID(ctx context.Context, db DB, categoryID int) (*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, ...interface{}) (sql.Result, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type Employee struct + Address sql.NullString + BirthDate *Time + City sql.NullString + Country sql.NullString + EmployeeID int + Extension sql.NullString + FirstName string + HireDate *Time + 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 int) (*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 int + TerritoryID string + func EmployeeTerritoryByEmployeeIDTerritoryID(ctx context.Context, db DB, employeeID int, 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 ErrInvalidTime string + func (err ErrInvalidTime) Error() string + 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 *Time + OrderID int + RequiredDate *Time + ShipAddress sql.NullString + ShipCity sql.NullString + ShipCountry sql.NullString + ShipName sql.NullString + ShipPostalCode sql.NullString + ShipRegion sql.NullString + ShipVia sql.NullInt64 + ShippedDate *Time + func OrderByOrderID(ctx context.Context, db DB, orderID int) (*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) Shipper(ctx context.Context, db DB) (*Shipper, 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 float64 + OrderID int + ProductID int + Quantity int + UnitPrice float64 + func OrderDetailByOrderIDProductID(ctx context.Context, db DB, orderID, productID int) (*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 int + 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 int) (*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 int + func RegionByRegionID(ctx context.Context, db DB, regionID int) (*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 int + func ShipperByShipperID(ctx context.Context, db DB, shipperID int) (*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 int + func SupplierBySupplierID(ctx context.Context, db DB, supplierID int) (*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 int + 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 Time struct + func NewTime(t time.Time) Time + func (t *Time) Parse(s string) error + func (t *Time) Scan(v interface{}) error + func (t Time) Format(layout string) string + func (t Time) String() string + func (t Time) Time() time.Time + func (t Time) Value() (driver.Value, error) + type UsState struct + StateAbbr sql.NullString + StateID int + StateName sql.NullString + StateRegion sql.NullString + func UsStateByStateID(ctx context.Context, db DB, stateID int) (*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