Documentation ¶
Index ¶
- func Apply(q *queries.Query, mods ...QueryMod)
- type QueryMod
- func And(clause string, args ...interface{}) QueryMod
- func AndIn(clause string, args ...interface{}) QueryMod
- func For(clause string) QueryMod
- func From(from string) QueryMod
- func GroupBy(clause string) QueryMod
- func Having(clause string, args ...interface{}) QueryMod
- func InnerJoin(clause string, args ...interface{}) QueryMod
- func Limit(limit int) QueryMod
- func Load(relationships ...string) QueryMod
- func Offset(offset int) QueryMod
- func Or(clause string, args ...interface{}) QueryMod
- func OrIn(clause string, args ...interface{}) QueryMod
- func OrderBy(clause string) QueryMod
- func SQL(sql string, args ...interface{}) QueryMod
- func Select(columns ...string) QueryMod
- func Where(clause string, args ...interface{}) QueryMod
- func WhereIn(clause string, args ...interface{}) QueryMod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type QueryMod ¶
QueryMod to modify the query object
func And ¶
And allows you to specify a where clause separated by an AND for your statement And is a duplicate of the Where function, but allows for more natural looking query mod chains, for example: (Where("a=?"), And("b=?"), Or("c=?")))
func AndIn ¶
AndIn allows you to specify a "x IN (set)" clause separated by an AndIn for your where statement. AndIn is a duplicate of the WhereIn function, but allows for more natural looking query mod chains, for example: (WhereIn("column1 in ?"), AndIn("column2 in ?"), OrIn("column3 in ?"))
func Load ¶
Load allows you to specify foreign key relationships to eager load for your query. Passed in relationships need to be in the format MyThing or MyThings. Relationship name plurality is important, if your relationship is singular, you need to specify the singular form and vice versa.