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 postgres 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 string `db:"continent"`
Region string `db:"region"`
Surfacearea float64 `db:"surfacearea"`
Indepyear int `db:"indepyear"`
Population int `db:"population"`
Lifeexpectancy float64 `db:"lifeexpectancy"`
Gnp int `db:"gnp"`
Gnpold int `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 postgres 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 bool `db:"isofficial"`
Percentage float64 `db:"percentage"`
}
Countrylanguage is a generated struct from a postgres 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.