Documentation ¶
Overview ¶
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Index ¶
- Constants
- Variables
- func FilmInStock(db XODB, v0 int, v1 int) ([]int, error)
- func FilmNotInStock(db XODB, v0 int, v1 int) ([]int, error)
- func GetCustomerBalance(db XODB, v0 int, v1 time.Time) (float64, error)
- func GroupConcat(db XODB, v0 string, v1 string) (string, error)
- func InventoryHeldByCustomer(db XODB, v0 int) (int, error)
- func InventoryInStock(db XODB, v0 int) (bool, error)
- func LastDay(db XODB, v0 time.Time) (time.Time, error)
- type Actor
- type ActorInfo
- type Address
- func (a *Address) City(db XODB) (*City, error)
- func (a *Address) Delete(db XODB) error
- func (a *Address) Deleted() bool
- func (a *Address) Exists() bool
- func (a *Address) Insert(db XODB) error
- func (a *Address) Save(db XODB) error
- func (a *Address) Update(db XODB) error
- func (a *Address) Upsert(db XODB) error
- type Category
- type City
- type Country
- type Customer
- func CustomerByCustomerID(db XODB, customerID int) (*Customer, error)
- func CustomersByAddressID(db XODB, addressID int16) ([]*Customer, error)
- func CustomersByLastName(db XODB, lastName string) ([]*Customer, error)
- func CustomersByStoreID(db XODB, storeID int16) ([]*Customer, error)
- func RewardsReport(db XODB, v0 int, v1 float64) ([]Customer, error)
- func (c *Customer) Address(db XODB) (*Address, error)
- func (c *Customer) Delete(db XODB) error
- func (c *Customer) Deleted() bool
- func (c *Customer) Exists() bool
- func (c *Customer) Insert(db XODB) error
- func (c *Customer) Save(db XODB) error
- func (c *Customer) Update(db XODB) error
- func (c *Customer) Upsert(db XODB) error
- type CustomerList
- type Film
- type FilmActor
- func (fa *FilmActor) Actor(db XODB) (*Actor, error)
- func (fa *FilmActor) Delete(db XODB) error
- func (fa *FilmActor) Deleted() bool
- func (fa *FilmActor) Exists() bool
- func (fa *FilmActor) Film(db XODB) (*Film, error)
- func (fa *FilmActor) Insert(db XODB) error
- func (fa *FilmActor) Save(db XODB) error
- func (fa *FilmActor) Update(db XODB) error
- func (fa *FilmActor) Upsert(db XODB) error
- type FilmCategory
- func (fc *FilmCategory) Category(db XODB) (*Category, error)
- func (fc *FilmCategory) Delete(db XODB) error
- func (fc *FilmCategory) Deleted() bool
- func (fc *FilmCategory) Exists() bool
- func (fc *FilmCategory) Film(db XODB) (*Film, error)
- func (fc *FilmCategory) Insert(db XODB) error
- func (fc *FilmCategory) Save(db XODB) error
- func (fc *FilmCategory) Update(db XODB) error
- func (fc *FilmCategory) Upsert(db XODB) error
- type FilmList
- type Inventory
- func (i *Inventory) Delete(db XODB) error
- func (i *Inventory) Deleted() bool
- func (i *Inventory) Exists() bool
- func (i *Inventory) Film(db XODB) (*Film, error)
- func (i *Inventory) Insert(db XODB) error
- func (i *Inventory) Save(db XODB) error
- func (i *Inventory) Update(db XODB) error
- func (i *Inventory) Upsert(db XODB) error
- type Language
- type MpaaRating
- type NicerButSlowerFilmList
- type Payment
- func (p *Payment) Customer(db XODB) (*Customer, error)
- func (p *Payment) Delete(db XODB) error
- func (p *Payment) Deleted() bool
- func (p *Payment) Exists() bool
- func (p *Payment) Insert(db XODB) error
- func (p *Payment) Rental(db XODB) (*Rental, error)
- func (p *Payment) Save(db XODB) error
- func (p *Payment) Staff(db XODB) (*Staff, error)
- func (p *Payment) Update(db XODB) error
- func (p *Payment) Upsert(db XODB) error
- type Rental
- func (r *Rental) Customer(db XODB) (*Customer, error)
- func (r *Rental) Delete(db XODB) error
- func (r *Rental) Deleted() bool
- func (r *Rental) Exists() bool
- func (r *Rental) Insert(db XODB) error
- func (r *Rental) Inventory(db XODB) (*Inventory, error)
- func (r *Rental) Save(db XODB) error
- func (r *Rental) Staff(db XODB) (*Staff, error)
- func (r *Rental) Update(db XODB) error
- func (r *Rental) Upsert(db XODB) error
- type SalesByFilmCategory
- type SalesByStore
- type ScannerValuer
- type Slice
- type Staff
- type StaffList
- type Store
- func (s *Store) Address(db XODB) (*Address, error)
- func (s *Store) Delete(db XODB) error
- func (s *Store) Deleted() bool
- func (s *Store) Exists() bool
- func (s *Store) Insert(db XODB) error
- func (s *Store) Save(db XODB) error
- func (s *Store) Staff(db XODB) (*Staff, error)
- func (s *Store) Update(db XODB) error
- func (s *Store) Upsert(db XODB) error
- type StringSlice
- type XODB
Constants ¶
const ( // MpaaRatingG is the 'G' MpaaRating. MpaaRatingG = MpaaRating(1) // MpaaRatingPg is the 'PG' MpaaRating. MpaaRatingPg = MpaaRating(2) // MpaaRatingPg13 is the 'PG-13' MpaaRating. MpaaRatingPg13 = MpaaRating(3) // MpaaRatingR is the 'R' MpaaRating. MpaaRatingR = MpaaRating(4) // MpaaRatingNc17 is the 'NC-17' MpaaRating. MpaaRatingNc17 = MpaaRating(5) )
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
func FilmInStock ¶
FilmInStock calls the stored procedure 'public.film_in_stock(integer, integer) SETOF integer' on db.
func FilmNotInStock ¶
FilmNotInStock calls the stored procedure 'public.film_not_in_stock(integer, integer) SETOF integer' on db.
func GetCustomerBalance ¶
GetCustomerBalance calls the stored procedure 'public.get_customer_balance(integer, timestamp without time zone) numeric' on db.
func GroupConcat ¶
GroupConcat calls the stored procedure 'public._group_concat(text, text) text' on db.
func InventoryHeldByCustomer ¶
InventoryHeldByCustomer calls the stored procedure 'public.inventory_held_by_customer(integer) integer' on db.
func InventoryInStock ¶
InventoryInStock calls the stored procedure 'public.inventory_in_stock(integer) boolean' on db.
Types ¶
type Actor ¶
type Actor struct { ActorID int `json:"actor_id"` // actor_id FirstName string `json:"first_name"` // first_name LastName string `json:"last_name"` // last_name LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
Actor represents a row from 'public.actor'.
func ActorByActorID ¶
ActorByActorID retrieves a row from 'public.actor' as a Actor.
Generated from index 'actor_pkey'.
func ActorsByLastName ¶
ActorsByLastName retrieves a row from 'public.actor' as a Actor.
Generated from index 'idx_actor_last_name'.
func (*Actor) Deleted ¶
Deleted provides information if the Actor has been deleted from the database.
type ActorInfo ¶
type ActorInfo struct { ActorID sql.NullInt64 `json:"actor_id"` // actor_id FirstName sql.NullString `json:"first_name"` // first_name LastName sql.NullString `json:"last_name"` // last_name FilmInfo sql.NullString `json:"film_info"` // film_info }
ActorInfo represents a row from 'public.actor_info'.
type Address ¶
type Address struct { AddressID int `json:"address_id"` // address_id Address string `json:"address"` // address Address2 sql.NullString `json:"address2"` // address2 District string `json:"district"` // district CityID int16 `json:"city_id"` // city_id PostalCode sql.NullString `json:"postal_code"` // postal_code Phone string `json:"phone"` // phone LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
Address represents a row from 'public.address'.
func AddressByAddressID ¶
AddressByAddressID retrieves a row from 'public.address' as a Address.
Generated from index 'address_pkey'.
func AddressesByCityID ¶
AddressesByCityID retrieves a row from 'public.address' as a Address.
Generated from index 'idx_fk_city_id'.
func (*Address) City ¶
City returns the City associated with the Address's CityID (city_id).
Generated from foreign key 'fk_address_city'.
func (*Address) Deleted ¶
Deleted provides information if the Address has been deleted from the database.
type Category ¶
type Category struct { CategoryID int `json:"category_id"` // category_id Name string `json:"name"` // name LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
Category represents a row from 'public.category'.
func CategoryByCategoryID ¶
CategoryByCategoryID retrieves a row from 'public.category' as a Category.
Generated from index 'category_pkey'.
func (*Category) Deleted ¶
Deleted provides information if the Category has been deleted from the database.
type City ¶
type City struct { CityID int `json:"city_id"` // city_id City string `json:"city"` // city CountryID int16 `json:"country_id"` // country_id LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
City represents a row from 'public.city'.
func CitiesByCountryID ¶
CitiesByCountryID retrieves a row from 'public.city' as a City.
Generated from index 'idx_fk_country_id'.
func CityByCityID ¶
CityByCityID retrieves a row from 'public.city' as a City.
Generated from index 'city_pkey'.
func (*City) Country ¶
Country returns the Country associated with the City's CountryID (country_id).
Generated from foreign key 'fk_city'.
type Country ¶
type Country struct { CountryID int `json:"country_id"` // country_id Country string `json:"country"` // country LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
Country represents a row from 'public.country'.
func CountryByCountryID ¶
CountryByCountryID retrieves a row from 'public.country' as a Country.
Generated from index 'country_pkey'.
func (*Country) Deleted ¶
Deleted provides information if the Country has been deleted from the database.
type Customer ¶
type Customer struct { CustomerID int `json:"customer_id"` // customer_id StoreID int16 `json:"store_id"` // store_id FirstName string `json:"first_name"` // first_name LastName string `json:"last_name"` // last_name Email sql.NullString `json:"email"` // email AddressID int16 `json:"address_id"` // address_id Activebool bool `json:"activebool"` // activebool CreateDate time.Time `json:"create_date"` // create_date LastUpdate pq.NullTime `json:"last_update"` // last_update Active sql.NullInt64 `json:"active"` // active // contains filtered or unexported fields }
Customer represents a row from 'public.customer'.
func CustomerByCustomerID ¶
CustomerByCustomerID retrieves a row from 'public.customer' as a Customer.
Generated from index 'customer_pkey'.
func CustomersByAddressID ¶
CustomersByAddressID retrieves a row from 'public.customer' as a Customer.
Generated from index 'idx_fk_address_id'.
func CustomersByLastName ¶
CustomersByLastName retrieves a row from 'public.customer' as a Customer.
Generated from index 'idx_last_name'.
func CustomersByStoreID ¶
CustomersByStoreID retrieves a row from 'public.customer' as a Customer.
Generated from index 'idx_fk_store_id'.
func RewardsReport ¶
RewardsReport calls the stored procedure 'public.rewards_report(integer, numeric) SETOF customer' on db.
func (*Customer) Address ¶
Address returns the Address associated with the Customer's AddressID (address_id).
Generated from foreign key 'customer_address_id_fkey'.
func (*Customer) Deleted ¶
Deleted provides information if the Customer has been deleted from the database.
type CustomerList ¶
type CustomerList struct { ID sql.NullInt64 `json:"id"` // id Name sql.NullString `json:"name"` // name Address sql.NullString `json:"address"` // address ZipCode sql.NullString `json:"zip code"` // zip code Phone sql.NullString `json:"phone"` // phone City sql.NullString `json:"city"` // city Country sql.NullString `json:"country"` // country Notes sql.NullString `json:"notes"` // notes Sid sql.NullInt64 `json:"sid"` // sid }
CustomerList represents a row from 'public.customer_list'.
type Film ¶
type Film struct { FilmID int `json:"film_id"` // film_id Title string `json:"title"` // title Description sql.NullString `json:"description"` // description ReleaseYear string `json:"release_year"` // release_year LanguageID int16 `json:"language_id"` // language_id RentalDuration int16 `json:"rental_duration"` // rental_duration RentalRate float64 `json:"rental_rate"` // rental_rate Length sql.NullInt64 `json:"length"` // length ReplacementCost float64 `json:"replacement_cost"` // replacement_cost Rating MpaaRating `json:"rating"` // rating LastUpdate time.Time `json:"last_update"` // last_update SpecialFeatures []sql.NullString `json:"special_features"` // special_features Fulltext string `json:"fulltext"` // fulltext // contains filtered or unexported fields }
Film represents a row from 'public.film'.
func FilmByFilmID ¶
FilmByFilmID retrieves a row from 'public.film' as a Film.
Generated from index 'film_pkey'.
func FilmsByFulltext ¶
FilmsByFulltext retrieves a row from 'public.film' as a Film.
Generated from index 'film_fulltext_idx'.
func FilmsByLanguageID ¶
FilmsByLanguageID retrieves a row from 'public.film' as a Film.
Generated from index 'idx_fk_language_id'.
func FilmsByTitle ¶
FilmsByTitle retrieves a row from 'public.film' as a Film.
Generated from index 'idx_title'.
type FilmActor ¶
type FilmActor struct { ActorID int16 `json:"actor_id"` // actor_id FilmID int16 `json:"film_id"` // film_id LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
FilmActor represents a row from 'public.film_actor'.
func FilmActorByActorIDFilmID ¶
FilmActorByActorIDFilmID retrieves a row from 'public.film_actor' as a FilmActor.
Generated from index 'film_actor_pkey'.
func FilmActorsByFilmID ¶
FilmActorsByFilmID retrieves a row from 'public.film_actor' as a FilmActor.
Generated from index 'idx_fk_film_id'.
func (*FilmActor) Actor ¶
Actor returns the Actor associated with the FilmActor's ActorID (actor_id).
Generated from foreign key 'film_actor_actor_id_fkey'.
func (*FilmActor) Deleted ¶
Deleted provides information if the FilmActor has been deleted from the database.
func (*FilmActor) Film ¶
Film returns the Film associated with the FilmActor's FilmID (film_id).
Generated from foreign key 'film_actor_film_id_fkey'.
type FilmCategory ¶
type FilmCategory struct { FilmID int16 `json:"film_id"` // film_id CategoryID int16 `json:"category_id"` // category_id LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
FilmCategory represents a row from 'public.film_category'.
func FilmCategoryByFilmIDCategoryID ¶
func FilmCategoryByFilmIDCategoryID(db XODB, filmID int16, categoryID int16) (*FilmCategory, error)
FilmCategoryByFilmIDCategoryID retrieves a row from 'public.film_category' as a FilmCategory.
Generated from index 'film_category_pkey'.
func (*FilmCategory) Category ¶
func (fc *FilmCategory) Category(db XODB) (*Category, error)
Category returns the Category associated with the FilmCategory's CategoryID (category_id).
Generated from foreign key 'film_category_category_id_fkey'.
func (*FilmCategory) Delete ¶
func (fc *FilmCategory) Delete(db XODB) error
Delete deletes the FilmCategory from the database.
func (*FilmCategory) Deleted ¶
func (fc *FilmCategory) Deleted() bool
Deleted provides information if the FilmCategory has been deleted from the database.
func (*FilmCategory) Exists ¶
func (fc *FilmCategory) Exists() bool
Exists determines if the FilmCategory exists in the database.
func (*FilmCategory) Film ¶
func (fc *FilmCategory) Film(db XODB) (*Film, error)
Film returns the Film associated with the FilmCategory's FilmID (film_id).
Generated from foreign key 'film_category_film_id_fkey'.
func (*FilmCategory) Insert ¶
func (fc *FilmCategory) Insert(db XODB) error
Insert inserts the FilmCategory to the database.
func (*FilmCategory) Save ¶
func (fc *FilmCategory) Save(db XODB) error
Save saves the FilmCategory to the database.
func (*FilmCategory) Update ¶
func (fc *FilmCategory) Update(db XODB) error
Update updates the FilmCategory in the database.
func (*FilmCategory) Upsert ¶
func (fc *FilmCategory) Upsert(db XODB) error
Upsert performs an upsert for FilmCategory.
NOTE: PostgreSQL 9.5+ only
type FilmList ¶
type FilmList struct { Fid sql.NullInt64 `json:"fid"` // fid Title sql.NullString `json:"title"` // title Description sql.NullString `json:"description"` // description Category sql.NullString `json:"category"` // category Price sql.NullFloat64 `json:"price"` // price Length sql.NullInt64 `json:"length"` // length Rating MpaaRating `json:"rating"` // rating Actors sql.NullString `json:"actors"` // actors }
FilmList represents a row from 'public.film_list'.
type Inventory ¶
type Inventory struct { InventoryID int `json:"inventory_id"` // inventory_id FilmID int16 `json:"film_id"` // film_id StoreID int16 `json:"store_id"` // store_id LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
Inventory represents a row from 'public.inventory'.
func InventoriesByStoreIDFilmID ¶
InventoriesByStoreIDFilmID retrieves a row from 'public.inventory' as a Inventory.
Generated from index 'idx_store_id_film_id'.
func InventoryByInventoryID ¶
InventoryByInventoryID retrieves a row from 'public.inventory' as a Inventory.
Generated from index 'inventory_pkey'.
func (*Inventory) Deleted ¶
Deleted provides information if the Inventory has been deleted from the database.
func (*Inventory) Film ¶
Film returns the Film associated with the Inventory's FilmID (film_id).
Generated from foreign key 'inventory_film_id_fkey'.
type Language ¶
type Language struct { LanguageID int `json:"language_id"` // language_id Name string `json:"name"` // name LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
Language represents a row from 'public.language'.
func LanguageByLanguageID ¶
LanguageByLanguageID retrieves a row from 'public.language' as a Language.
Generated from index 'language_pkey'.
func (*Language) Deleted ¶
Deleted provides information if the Language has been deleted from the database.
type MpaaRating ¶
type MpaaRating uint16
MpaaRating is the 'mpaa_rating' enum type from schema 'public'.
func (MpaaRating) MarshalText ¶
func (mr MpaaRating) MarshalText() ([]byte, error)
MarshalText marshals MpaaRating into text.
func (*MpaaRating) Scan ¶
func (mr *MpaaRating) Scan(src interface{}) error
Scan satisfies the database/sql.Scanner interface for MpaaRating.
func (MpaaRating) String ¶
func (mr MpaaRating) String() string
String returns the string value of the MpaaRating.
func (*MpaaRating) UnmarshalText ¶
func (mr *MpaaRating) UnmarshalText(text []byte) error
UnmarshalText unmarshals MpaaRating from text.
type NicerButSlowerFilmList ¶
type NicerButSlowerFilmList struct { Fid sql.NullInt64 `json:"fid"` // fid Title sql.NullString `json:"title"` // title Description sql.NullString `json:"description"` // description Category sql.NullString `json:"category"` // category Price sql.NullFloat64 `json:"price"` // price Length sql.NullInt64 `json:"length"` // length Rating MpaaRating `json:"rating"` // rating Actors sql.NullString `json:"actors"` // actors }
NicerButSlowerFilmList represents a row from 'public.nicer_but_slower_film_list'.
type Payment ¶
type Payment struct { PaymentID int `json:"payment_id"` // payment_id CustomerID int16 `json:"customer_id"` // customer_id StaffID int16 `json:"staff_id"` // staff_id RentalID int `json:"rental_id"` // rental_id Amount float64 `json:"amount"` // amount PaymentDate time.Time `json:"payment_date"` // payment_date // contains filtered or unexported fields }
Payment represents a row from 'public.payment'.
func PaymentByPaymentID ¶
PaymentByPaymentID retrieves a row from 'public.payment' as a Payment.
Generated from index 'payment_pkey'.
func PaymentsByCustomerID ¶
PaymentsByCustomerID retrieves a row from 'public.payment' as a Payment.
Generated from index 'idx_fk_customer_id'.
func PaymentsByRentalID ¶
PaymentsByRentalID retrieves a row from 'public.payment' as a Payment.
Generated from index 'idx_fk_rental_id'.
func PaymentsByStaffID ¶
PaymentsByStaffID retrieves a row from 'public.payment' as a Payment.
Generated from index 'idx_fk_staff_id'.
func (*Payment) Customer ¶
Customer returns the Customer associated with the Payment's CustomerID (customer_id).
Generated from foreign key 'payment_customer_id_fkey'.
func (*Payment) Deleted ¶
Deleted provides information if the Payment has been deleted from the database.
func (*Payment) Rental ¶
Rental returns the Rental associated with the Payment's RentalID (rental_id).
Generated from foreign key 'payment_rental_id_fkey'.
func (*Payment) Staff ¶
Staff returns the Staff associated with the Payment's StaffID (staff_id).
Generated from foreign key 'payment_staff_id_fkey'.
type Rental ¶
type Rental struct { RentalID int `json:"rental_id"` // rental_id RentalDate time.Time `json:"rental_date"` // rental_date InventoryID int `json:"inventory_id"` // inventory_id CustomerID int16 `json:"customer_id"` // customer_id ReturnDate pq.NullTime `json:"return_date"` // return_date StaffID int16 `json:"staff_id"` // staff_id LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
Rental represents a row from 'public.rental'.
func RentalByRentalDateInventoryIDCustomerID ¶
func RentalByRentalDateInventoryIDCustomerID(db XODB, rentalDate time.Time, inventoryID int, customerID int16) (*Rental, error)
RentalByRentalDateInventoryIDCustomerID retrieves a row from 'public.rental' as a Rental.
Generated from index 'idx_unq_rental_rental_date_inventory_id_customer_id'.
func RentalByRentalID ¶
RentalByRentalID retrieves a row from 'public.rental' as a Rental.
Generated from index 'rental_pkey'.
func RentalsByInventoryID ¶
RentalsByInventoryID retrieves a row from 'public.rental' as a Rental.
Generated from index 'idx_fk_inventory_id'.
func (*Rental) Customer ¶
Customer returns the Customer associated with the Rental's CustomerID (customer_id).
Generated from foreign key 'rental_customer_id_fkey'.
func (*Rental) Deleted ¶
Deleted provides information if the Rental has been deleted from the database.
func (*Rental) Inventory ¶
Inventory returns the Inventory associated with the Rental's InventoryID (inventory_id).
Generated from foreign key 'rental_inventory_id_fkey'.
func (*Rental) Staff ¶
Staff returns the Staff associated with the Rental's StaffID (staff_id).
Generated from foreign key 'rental_staff_id_key'.
type SalesByFilmCategory ¶
type SalesByFilmCategory struct { Category sql.NullString `json:"category"` // category TotalSales sql.NullFloat64 `json:"total_sales"` // total_sales }
SalesByFilmCategory represents a row from 'public.sales_by_film_category'.
type SalesByStore ¶
type SalesByStore struct { Store sql.NullString `json:"store"` // store Manager sql.NullString `json:"manager"` // manager TotalSales sql.NullFloat64 `json:"total_sales"` // total_sales }
SalesByStore represents a row from 'public.sales_by_store'.
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type Staff ¶
type Staff struct { StaffID int `json:"staff_id"` // staff_id FirstName string `json:"first_name"` // first_name LastName string `json:"last_name"` // last_name AddressID int16 `json:"address_id"` // address_id Email sql.NullString `json:"email"` // email StoreID int16 `json:"store_id"` // store_id Active bool `json:"active"` // active Username string `json:"username"` // username Password sql.NullString `json:"password"` // password LastUpdate time.Time `json:"last_update"` // last_update Picture []byte `json:"picture"` // picture // contains filtered or unexported fields }
Staff represents a row from 'public.staff'.
func StaffByStaffID ¶
StaffByStaffID retrieves a row from 'public.staff' as a Staff.
Generated from index 'staff_pkey'.
func (*Staff) Address ¶
Address returns the Address associated with the Staff's AddressID (address_id).
Generated from foreign key 'staff_address_id_fkey'.
func (*Staff) Deleted ¶
Deleted provides information if the Staff has been deleted from the database.
type StaffList ¶
type StaffList struct { ID sql.NullInt64 `json:"id"` // id Name sql.NullString `json:"name"` // name Address sql.NullString `json:"address"` // address ZipCode sql.NullString `json:"zip code"` // zip code Phone sql.NullString `json:"phone"` // phone City sql.NullString `json:"city"` // city Country sql.NullString `json:"country"` // country Sid sql.NullInt64 `json:"sid"` // sid }
StaffList represents a row from 'public.staff_list'.
type Store ¶
type Store struct { StoreID int `json:"store_id"` // store_id ManagerStaffID int16 `json:"manager_staff_id"` // manager_staff_id AddressID int16 `json:"address_id"` // address_id LastUpdate time.Time `json:"last_update"` // last_update // contains filtered or unexported fields }
Store represents a row from 'public.store'.
func StoreByManagerStaffID ¶
StoreByManagerStaffID retrieves a row from 'public.store' as a Store.
Generated from index 'idx_unq_manager_staff_id'.
func StoreByStoreID ¶
StoreByStoreID retrieves a row from 'public.store' as a Store.
Generated from index 'store_pkey'.
func (*Store) Address ¶
Address returns the Address associated with the Store's AddressID (address_id).
Generated from foreign key 'store_address_id_fkey'.
func (*Store) Deleted ¶
Deleted provides information if the Store has been deleted from the database.
func (*Store) Staff ¶
Staff returns the Staff associated with the Store's ManagerStaffID (manager_staff_id).
Generated from foreign key 'store_manager_staff_id_fkey'.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type XODB ¶
type XODB interface { Exec(string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row }
XODB is the common interface for database operations that can be used with types from schema 'public'.
This should work with database/sql.DB and database/sql.Tx.
Source Files ¶
- actor.xo.go
- actorinfo.xo.go
- address.xo.go
- category.xo.go
- city.xo.go
- country.xo.go
- customer.xo.go
- customerlist.xo.go
- film.xo.go
- filmactor.xo.go
- filmcategory.xo.go
- filmlist.xo.go
- inventory.xo.go
- language.xo.go
- mpaarating.xo.go
- nicerbutslowerfilmlist.xo.go
- payment.xo.go
- rental.xo.go
- salesbyfilmcategory.xo.go
- salesbystore.xo.go
- sp_filminstock.xo.go
- sp_filmnotinstock.xo.go
- sp_getcustomerbalance.xo.go
- sp_groupconcat.xo.go
- sp_inventoryheldbycustomer.xo.go
- sp_inventoryinstock.xo.go
- sp_lastday.xo.go
- sp_rewardsreport.xo.go
- staff.xo.go
- stafflist.xo.go
- store.xo.go
- xo_db.xo.go