Documentation ¶
Overview ¶
Package sqlserver contains generated code for schema 'northwind'.
Index ¶
- func Errorf(s string, v ...interface{})
- func Logf(s string, v ...interface{})
- func SetErrorLogger(logger interface{})
- func SetLogger(logger interface{})
- type Category
- 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
- 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
- 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
- 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
- type Employee
- 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
- 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
- type ErrUpdateFailed
- type ErrUpsertFailed
- type Error
- type Order
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶
func Errorf(s string, v ...interface{})
Errorf logs an error message using the package error logger.
func SetErrorLogger ¶
func SetErrorLogger(logger interface{})
SetErrorLogger sets the package error logger. Valid logger types:
io.Writer func(string, ...interface{}) (int, error) // fmt.Printf func(string, ...interface{}) // log.Printf
Types ¶
type Category ¶
type Category struct { CategoryID int16 `json:"category_id"` // category_id CategoryName string `json:"category_name"` // category_name Description sql.NullString `json:"description"` // description Picture []byte `json:"picture"` // picture // contains filtered or unexported fields }
Category represents a row from 'northwind.categories'.
func CategoryByCategoryID ¶
CategoryByCategoryID retrieves a row from 'northwind.categories' as a Category.
Generated from index 'categories_pkey'.
func (*Category) Deleted ¶
Deleted returns true when the Category has been marked for deletion from the database.
type Customer ¶
type Customer struct { CustomerID string `json:"customer_id"` // customer_id CompanyName string `json:"company_name"` // company_name ContactName sql.NullString `json:"contact_name"` // contact_name ContactTitle sql.NullString `json:"contact_title"` // contact_title Address sql.NullString `json:"address"` // address City sql.NullString `json:"city"` // city Region sql.NullString `json:"region"` // region PostalCode sql.NullString `json:"postal_code"` // postal_code Country sql.NullString `json:"country"` // country Phone sql.NullString `json:"phone"` // phone Fax sql.NullString `json:"fax"` // fax // contains filtered or unexported fields }
Customer represents a row from 'northwind.customers'.
func CustomerByCustomerID ¶
CustomerByCustomerID retrieves a row from 'northwind.customers' as a Customer.
Generated from index 'customers_pkey'.
func (*Customer) Deleted ¶
Deleted returns true when the Customer has been marked for deletion from the database.
type CustomerCustomerDemo ¶
type CustomerCustomerDemo struct { CustomerID string `json:"customer_id"` // customer_id CustomerTypeID string `json:"customer_type_id"` // customer_type_id // contains filtered or unexported fields }
CustomerCustomerDemo represents a row from 'northwind.customer_customer_demo'.
func CustomerCustomerDemoByCustomerIDCustomerTypeID ¶
func CustomerCustomerDemoByCustomerIDCustomerTypeID(ctx context.Context, db DB, customerID, customerTypeID string) (*CustomerCustomerDemo, error)
CustomerCustomerDemoByCustomerIDCustomerTypeID retrieves a row from 'northwind.customer_customer_demo' as a CustomerCustomerDemo.
Generated from index 'customer_customer_demo_pkey'.
func (*CustomerCustomerDemo) Customer ¶
Customer returns the Customer associated with the CustomerCustomerDemo's (CustomerID).
Generated from foreign key 'customer_customer_demo_customer_id_fkey'.
func (*CustomerCustomerDemo) CustomerDemographic ¶
func (ccd *CustomerCustomerDemo) CustomerDemographic(ctx context.Context, db DB) (*CustomerDemographic, error)
CustomerDemographic returns the CustomerDemographic associated with the CustomerCustomerDemo's (CustomerTypeID).
Generated from foreign key 'customer_customer_demo_customer_type_id_fkey'.
func (*CustomerCustomerDemo) Delete ¶
func (ccd *CustomerCustomerDemo) Delete(ctx context.Context, db DB) error
Delete deletes the CustomerCustomerDemo from the database.
func (*CustomerCustomerDemo) Deleted ¶
func (ccd *CustomerCustomerDemo) Deleted() bool
Deleted returns true when the CustomerCustomerDemo has been marked for deletion from the database.
func (*CustomerCustomerDemo) Exists ¶
func (ccd *CustomerCustomerDemo) Exists() bool
Exists returns true when the CustomerCustomerDemo exists in the database.
type CustomerDemographic ¶
type CustomerDemographic struct { CustomerTypeID string `json:"customer_type_id"` // customer_type_id CustomerDesc sql.NullString `json:"customer_desc"` // customer_desc // contains filtered or unexported fields }
CustomerDemographic represents a row from 'northwind.customer_demographics'.
func CustomerDemographicByCustomerTypeID ¶
func CustomerDemographicByCustomerTypeID(ctx context.Context, db DB, customerTypeID string) (*CustomerDemographic, error)
CustomerDemographicByCustomerTypeID retrieves a row from 'northwind.customer_demographics' as a CustomerDemographic.
Generated from index 'customer_demographics_pkey'.
func (*CustomerDemographic) Delete ¶
func (cd *CustomerDemographic) Delete(ctx context.Context, db DB) error
Delete deletes the CustomerDemographic from the database.
func (*CustomerDemographic) Deleted ¶
func (cd *CustomerDemographic) Deleted() bool
Deleted returns true when the CustomerDemographic has been marked for deletion from the database.
func (*CustomerDemographic) Exists ¶
func (cd *CustomerDemographic) Exists() bool
Exists returns true when the CustomerDemographic exists in the database.
func (*CustomerDemographic) Insert ¶
func (cd *CustomerDemographic) Insert(ctx context.Context, db DB) error
Insert inserts the CustomerDemographic to the database.
func (*CustomerDemographic) Save ¶
func (cd *CustomerDemographic) Save(ctx context.Context, db DB) error
Save saves the CustomerDemographic to the database.
type DB ¶
type DB interface { ExecContext(context.Context, string, ...interface{}) (sql.Result, error) QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) QueryRowContext(context.Context, string, ...interface{}) *sql.Row }
DB is the common interface for database operations that can be used with types from schema 'northwind'.
This works with both database/sql.DB and database/sql.Tx.
type Employee ¶
type Employee struct { EmployeeID int16 `json:"employee_id"` // employee_id LastName string `json:"last_name"` // last_name FirstName string `json:"first_name"` // first_name Title sql.NullString `json:"title"` // title TitleOfCourtesy sql.NullString `json:"title_of_courtesy"` // title_of_courtesy BirthDate sql.NullTime `json:"birth_date"` // birth_date HireDate sql.NullTime `json:"hire_date"` // hire_date Address sql.NullString `json:"address"` // address City sql.NullString `json:"city"` // city Region sql.NullString `json:"region"` // region PostalCode sql.NullString `json:"postal_code"` // postal_code Country sql.NullString `json:"country"` // country HomePhone sql.NullString `json:"home_phone"` // home_phone Extension sql.NullString `json:"extension"` // extension Photo []byte `json:"photo"` // photo Notes sql.NullString `json:"notes"` // notes ReportsTo sql.NullInt64 `json:"reports_to"` // reports_to PhotoPath sql.NullString `json:"photo_path"` // photo_path // contains filtered or unexported fields }
Employee represents a row from 'northwind.employees'.
func EmployeeByEmployeeID ¶
EmployeeByEmployeeID retrieves a row from 'northwind.employees' as a Employee.
Generated from index 'employees_pkey'.
func (*Employee) Deleted ¶
Deleted returns true when the Employee has been marked for deletion from the database.
func (*Employee) Employee ¶
Employee returns the Employee associated with the Employee's (ReportsTo).
Generated from foreign key 'employees_reports_to_fkey'.
type EmployeeTerritory ¶
type EmployeeTerritory struct { EmployeeID int16 `json:"employee_id"` // employee_id TerritoryID string `json:"territory_id"` // territory_id // contains filtered or unexported fields }
EmployeeTerritory represents a row from 'northwind.employee_territories'.
func EmployeeTerritoryByEmployeeIDTerritoryID ¶
func EmployeeTerritoryByEmployeeIDTerritoryID(ctx context.Context, db DB, employeeID int16, territoryID string) (*EmployeeTerritory, error)
EmployeeTerritoryByEmployeeIDTerritoryID retrieves a row from 'northwind.employee_territories' as a EmployeeTerritory.
Generated from index 'employee_territories_pkey'.
func (*EmployeeTerritory) Delete ¶
func (et *EmployeeTerritory) Delete(ctx context.Context, db DB) error
Delete deletes the EmployeeTerritory from the database.
func (*EmployeeTerritory) Deleted ¶
func (et *EmployeeTerritory) Deleted() bool
Deleted returns true when the EmployeeTerritory has been marked for deletion from the database.
func (*EmployeeTerritory) Employee ¶
Employee returns the Employee associated with the EmployeeTerritory's (EmployeeID).
Generated from foreign key 'employee_territories_employee_id_fkey'.
func (*EmployeeTerritory) Exists ¶
func (et *EmployeeTerritory) Exists() bool
Exists returns true when the EmployeeTerritory exists in the database.
type ErrInsertFailed ¶
type ErrInsertFailed struct {
Err error
}
ErrInsertFailed is the insert failed error.
func (*ErrInsertFailed) Error ¶
func (err *ErrInsertFailed) Error() string
Error satisfies the error interface.
func (*ErrInsertFailed) Unwrap ¶
func (err *ErrInsertFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type ErrUpdateFailed ¶
type ErrUpdateFailed struct {
Err error
}
ErrUpdateFailed is the update failed error.
func (*ErrUpdateFailed) Error ¶
func (err *ErrUpdateFailed) Error() string
Error satisfies the error interface.
func (*ErrUpdateFailed) Unwrap ¶
func (err *ErrUpdateFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type ErrUpsertFailed ¶
type ErrUpsertFailed struct {
Err error
}
ErrUpsertFailed is the upsert failed error.
func (*ErrUpsertFailed) Error ¶
func (err *ErrUpsertFailed) Error() string
Error satisfies the error interface.
func (*ErrUpsertFailed) Unwrap ¶
func (err *ErrUpsertFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type Error ¶
type Error string
Error is an error.
const ( // ErrAlreadyExists is the already exists error. ErrAlreadyExists Error = "already exists" // ErrDoesNotExist is the does not exist error. ErrDoesNotExist Error = "does not exist" // ErrMarkedForDeletion is the marked for deletion error. ErrMarkedForDeletion Error = "marked for deletion" )
Error values.
type Order ¶
type Order struct { OrderID int16 `json:"order_id"` // order_id CustomerID sql.NullString `json:"customer_id"` // customer_id EmployeeID sql.NullInt64 `json:"employee_id"` // employee_id OrderDate sql.NullTime `json:"order_date"` // order_date RequiredDate sql.NullTime `json:"required_date"` // required_date ShippedDate sql.NullTime `json:"shipped_date"` // shipped_date Freight sql.NullFloat64 `json:"freight"` // freight ShipName sql.NullString `json:"ship_name"` // ship_name ShipAddress sql.NullString `json:"ship_address"` // ship_address ShipCity sql.NullString `json:"ship_city"` // ship_city ShipRegion sql.NullString `json:"ship_region"` // ship_region ShipPostalCode sql.NullString `json:"ship_postal_code"` // ship_postal_code ShipCountry sql.NullString `json:"ship_country"` // ship_country // contains filtered or unexported fields }
Order represents a row from 'northwind.orders'.
func OrderByOrderID ¶
OrderByOrderID retrieves a row from 'northwind.orders' as a Order.
Generated from index 'orders_pkey'.
func (*Order) Customer ¶
Customer returns the Customer associated with the Order's (CustomerID).
Generated from foreign key 'orders_customer_id_fkey'.
func (*Order) Deleted ¶
Deleted returns true when the Order has been marked for deletion from the database.
func (*Order) Employee ¶
Employee returns the Employee associated with the Order's (EmployeeID).
Generated from foreign key 'orders_employee_id_fkey'.
type OrderDetail ¶
type OrderDetail struct { OrderID int16 `json:"order_id"` // order_id ProductID int16 `json:"product_id"` // product_id UnitPrice float32 `json:"unit_price"` // unit_price Quantity int16 `json:"quantity"` // quantity Discount float32 `json:"discount"` // discount // contains filtered or unexported fields }
OrderDetail represents a row from 'northwind.order_details'.
func OrderDetailByOrderIDProductID ¶
func OrderDetailByOrderIDProductID(ctx context.Context, db DB, orderID, productID int16) (*OrderDetail, error)
OrderDetailByOrderIDProductID retrieves a row from 'northwind.order_details' as a OrderDetail.
Generated from index 'order_details_pkey'.
func (*OrderDetail) Delete ¶
func (od *OrderDetail) Delete(ctx context.Context, db DB) error
Delete deletes the OrderDetail from the database.
func (*OrderDetail) Deleted ¶
func (od *OrderDetail) Deleted() bool
Deleted returns true when the OrderDetail has been marked for deletion from the database.
func (*OrderDetail) Exists ¶
func (od *OrderDetail) Exists() bool
Exists returns true when the OrderDetail exists in the database.
func (*OrderDetail) Insert ¶
func (od *OrderDetail) Insert(ctx context.Context, db DB) error
Insert inserts the OrderDetail to the database.
func (*OrderDetail) Order ¶
Order returns the Order associated with the OrderDetail's (OrderID).
Generated from foreign key 'order_details_order_id_fkey'.
func (*OrderDetail) Product ¶
Product returns the Product associated with the OrderDetail's (ProductID).
Generated from foreign key 'order_details_product_id_fkey'.
func (*OrderDetail) Save ¶
func (od *OrderDetail) Save(ctx context.Context, db DB) error
Save saves the OrderDetail to the database.
type Product ¶
type Product struct { ProductID int16 `json:"product_id"` // product_id ProductName string `json:"product_name"` // product_name SupplierID sql.NullInt64 `json:"supplier_id"` // supplier_id CategoryID sql.NullInt64 `json:"category_id"` // category_id QuantityPerUnit sql.NullString `json:"quantity_per_unit"` // quantity_per_unit UnitPrice sql.NullFloat64 `json:"unit_price"` // unit_price UnitsInStock sql.NullInt64 `json:"units_in_stock"` // units_in_stock UnitsOnOrder sql.NullInt64 `json:"units_on_order"` // units_on_order ReorderLevel sql.NullInt64 `json:"reorder_level"` // reorder_level Discontinued int `json:"discontinued"` // discontinued // contains filtered or unexported fields }
Product represents a row from 'northwind.products'.
func ProductByProductID ¶
ProductByProductID retrieves a row from 'northwind.products' as a Product.
Generated from index 'products_pkey'.
func (*Product) Category ¶
Category returns the Category associated with the Product's (CategoryID).
Generated from foreign key 'products_category_id_fkey'.
func (*Product) Deleted ¶
Deleted returns true when the Product has been marked for deletion from the database.
func (*Product) Supplier ¶
Supplier returns the Supplier associated with the Product's (SupplierID).
Generated from foreign key 'products_suplier_id_fkey'.
type Region ¶
type Region struct { RegionID int16 `json:"region_id"` // region_id RegionDescription string `json:"region_description"` // region_description // contains filtered or unexported fields }
Region represents a row from 'northwind.region'.
func RegionByRegionID ¶
RegionByRegionID retrieves a row from 'northwind.region' as a Region.
Generated from index 'regions_pkey'.
func (*Region) Deleted ¶
Deleted returns true when the Region has been marked for deletion from the database.
type Shipper ¶
type Shipper struct { ShipperID int16 `json:"shipper_id"` // shipper_id CompanyName string `json:"company_name"` // company_name Phone sql.NullString `json:"phone"` // phone // contains filtered or unexported fields }
Shipper represents a row from 'northwind.shippers'.
func ShipperByShipperID ¶
ShipperByShipperID retrieves a row from 'northwind.shippers' as a Shipper.
Generated from index 'shippers_pkey'.
func (*Shipper) Deleted ¶
Deleted returns true when the Shipper has been marked for deletion from the database.
type Supplier ¶
type Supplier struct { SupplierID int16 `json:"supplier_id"` // supplier_id CompanyName string `json:"company_name"` // company_name ContactName sql.NullString `json:"contact_name"` // contact_name ContactTitle sql.NullString `json:"contact_title"` // contact_title Address sql.NullString `json:"address"` // address City sql.NullString `json:"city"` // city Region sql.NullString `json:"region"` // region PostalCode sql.NullString `json:"postal_code"` // postal_code Country sql.NullString `json:"country"` // country Phone sql.NullString `json:"phone"` // phone Fax sql.NullString `json:"fax"` // fax Homepage sql.NullString `json:"homepage"` // homepage // contains filtered or unexported fields }
Supplier represents a row from 'northwind.suppliers'.
func SupplierBySupplierID ¶
SupplierBySupplierID retrieves a row from 'northwind.suppliers' as a Supplier.
Generated from index 'suppliers_pkey'.
func (*Supplier) Deleted ¶
Deleted returns true when the Supplier has been marked for deletion from the database.
type Territory ¶
type Territory struct { TerritoryID string `json:"territory_id"` // territory_id TerritoryDescription string `json:"territory_description"` // territory_description RegionID int16 `json:"region_id"` // region_id // contains filtered or unexported fields }
Territory represents a row from 'northwind.territories'.
func TerritoryByTerritoryID ¶
TerritoryByTerritoryID retrieves a row from 'northwind.territories' as a Territory.
Generated from index 'territories_pkey'.
func (*Territory) Deleted ¶
Deleted returns true when the Territory has been marked for deletion from the database.
func (*Territory) Region ¶
Region returns the Region associated with the Territory's (RegionID).
Generated from foreign key 'territories_region_id_fkey'.
type UsState ¶
type UsState struct { StateID int16 `json:"state_id"` // state_id StateName sql.NullString `json:"state_name"` // state_name StateAbbr sql.NullString `json:"state_abbr"` // state_abbr StateRegion sql.NullString `json:"state_region"` // state_region // contains filtered or unexported fields }
UsState represents a row from 'northwind.us_states'.
func UsStateByStateID ¶
UsStateByStateID retrieves a row from 'northwind.us_states' as a UsState.
Generated from index 'us_states_pkey'.
func (*UsState) Deleted ¶
Deleted returns true when the UsState has been marked for deletion from the database.