Documentation ¶
Index ¶
- Variables
- func SetDb(d *sqlx.DB)
- type City
- func (c *City) Find(id int) (*City, error)
- func (c *City) Where(column string, arg interface{}) ([]*City, error)
- func (c *City) WhereFirst(column string, arg interface{}) (*City, error)
- func (c *City) WhereIn(column string, args ...interface{}) ([]*City, error)
- func (c *City) WhereWithMap(args map[string]interface{}) ([]*City, error)
- type Country
- func (c *Country) Where(column string, arg interface{}) ([]*Country, error)
- func (c *Country) WhereFirst(column string, arg interface{}) (*Country, error)
- func (c *Country) WhereIn(column string, args ...interface{}) ([]*Country, error)
- func (c *Country) WhereWithMap(args map[string]interface{}) ([]*Country, error)
- type CountryLanguage
- func (c *CountryLanguage) Where(column string, arg interface{}) ([]*CountryLanguage, error)
- func (c *CountryLanguage) WhereFirst(column string, arg interface{}) (*CountryLanguage, error)
- func (c *CountryLanguage) WhereIn(column string, args ...interface{}) ([]*CountryLanguage, error)
- func (c *CountryLanguage) WhereWithMap(args map[string]interface{}) ([]*CountryLanguage, error)
Constants ¶
This section is empty.
Variables ¶
var (
Cities = &City{}
)
var (
Countries = &Country{}
)
var (
CountryLanguages = &CountryLanguage{}
)
Functions ¶
Types ¶
type City ¶
type City struct { ID int `db:"ID"` Name string `db:"Name"` CountryCode string `db:"CountryCode"` District string `db:"District"` Population int `db:"Population"` }
City is a generated struct from a mysql database. See github.com/alistanis/stg for more information.
func (*City) Find ¶
Find is a generated function. See github.com/alistanis/stg for more information.
func (*City) Where ¶
Where is a generated function. See github.com/alistanis/stg for more information.
func (*City) WhereFirst ¶
WhereFirst is a generated function. See github.com/alistanis/stg for more information.
type Country ¶
type Country struct { Code string `db:"Code"` Name string `db:"Name"` Continent interface{} `db:"Continent"` Region string `db:"Region"` SurfaceArea float64 `db:"SurfaceArea"` IndepYear int `db:"IndepYear"` Population int `db:"Population"` LifeExpectancy float64 `db:"LifeExpectancy"` GNP float64 `db:"GNP"` GNPOld float64 `db:"GNPOld"` LocalName string `db:"LocalName"` GovernmentForm string `db:"GovernmentForm"` HeadOfState string `db:"HeadOfState"` Capital int `db:"Capital"` Code2 string `db:"Code2"` }
Country is a generated struct from a mysql database. See github.com/alistanis/stg for more information.
func (*Country) Where ¶
Where is a generated function. See github.com/alistanis/stg for more information.
func (*Country) WhereFirst ¶
WhereFirst is a generated function. See github.com/alistanis/stg for more information.
type CountryLanguage ¶
type CountryLanguage struct { CountryCode string `db:"CountryCode"` Language string `db:"Language"` IsOfficial interface{} `db:"IsOfficial"` Percentage float64 `db:"Percentage"` }
CountryLanguage is a generated struct from a mysql database. See github.com/alistanis/stg for more information.
func (*CountryLanguage) Where ¶
func (c *CountryLanguage) Where(column string, arg interface{}) ([]*CountryLanguage, error)
Where is a generated function. See github.com/alistanis/stg for more information.
func (*CountryLanguage) WhereFirst ¶
func (c *CountryLanguage) WhereFirst(column string, arg interface{}) (*CountryLanguage, error)
WhereFirst is a generated function. See github.com/alistanis/stg for more information.
func (*CountryLanguage) WhereIn ¶
func (c *CountryLanguage) WhereIn(column string, args ...interface{}) ([]*CountryLanguage, error)
WhereIn is a generated function. See github.com/alistanis/stg for more information.
func (*CountryLanguage) WhereWithMap ¶
func (c *CountryLanguage) WhereWithMap(args map[string]interface{}) ([]*CountryLanguage, error)
WhereWithMap is a generated function. See github.com/alistanis/stg for more information.