Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Counter) predicate.Counter
- func Count(v int) predicate.Counter
- func CountEQ(v int) predicate.Counter
- func CountGT(v int) predicate.Counter
- func CountGTE(v int) predicate.Counter
- func CountIn(vs ...int) predicate.Counter
- func CountLT(v int) predicate.Counter
- func CountLTE(v int) predicate.Counter
- func CountNEQ(v int) predicate.Counter
- func CountNotIn(vs ...int) predicate.Counter
- func ID(id int) predicate.Counter
- func IDEQ(id int) predicate.Counter
- func IDGT(id int) predicate.Counter
- func IDGTE(id int) predicate.Counter
- func IDIn(ids ...int) predicate.Counter
- func IDLT(id int) predicate.Counter
- func IDLTE(id int) predicate.Counter
- func IDNEQ(id int) predicate.Counter
- func IDNotIn(ids ...int) predicate.Counter
- func Not(p predicate.Counter) predicate.Counter
- func Or(predicates ...predicate.Counter) predicate.Counter
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
View Source
const ( // Label holds the string label denoting the counter type in the database. Label = "counter" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCount holds the string denoting the count field in the database. FieldCount = "count" // Table holds the table name of the counter in the database. Table = "counters" )
Variables ¶
View Source
var Columns = []string{ FieldID, FieldCount, }
Columns holds all SQL columns for counter fields.
View Source
var ( // DefaultCount holds the default value on creation for the "count" field. DefaultCount int )
Functions ¶
func Count ¶
Count applies equality check predicate on the "count" field. It's identical to CountEQ.
func CountNotIn ¶
CountNotIn applies the NotIn predicate on the "count" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Counter queries.
func ByCount ¶
func ByCount(opts ...sql.OrderTermOption) OrderOption
ByCount orders the results by the count field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
Click to show internal directories.
Click to hide internal directories.