Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Item) predicate.Item
- func ID(id string) predicate.Item
- func IDContainsFold(id string) predicate.Item
- func IDEQ(id string) predicate.Item
- func IDEqualFold(id string) predicate.Item
- func IDGT(id string) predicate.Item
- func IDGTE(id string) predicate.Item
- func IDIn(ids ...string) predicate.Item
- func IDLT(id string) predicate.Item
- func IDLTE(id string) predicate.Item
- func IDNEQ(id string) predicate.Item
- func IDNotIn(ids ...string) predicate.Item
- func Not(p predicate.Item) predicate.Item
- func Or(predicates ...predicate.Item) predicate.Item
- func Text(v string) predicate.Item
- func TextContains(v string) predicate.Item
- func TextContainsFold(v string) predicate.Item
- func TextEQ(v string) predicate.Item
- func TextEqualFold(v string) predicate.Item
- func TextGT(v string) predicate.Item
- func TextGTE(v string) predicate.Item
- func TextHasPrefix(v string) predicate.Item
- func TextHasSuffix(v string) predicate.Item
- func TextIn(vs ...string) predicate.Item
- func TextIsNil() predicate.Item
- func TextLT(v string) predicate.Item
- func TextLTE(v string) predicate.Item
- func TextNEQ(v string) predicate.Item
- func TextNotIn(vs ...string) predicate.Item
- func TextNotNil() predicate.Item
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the item type in the database. Label = "item" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldText holds the string denoting the text field in the database. FieldText = "text" // Table holds the table name of the item in the database. Table = "items" )
Variables ¶
var ( // TextValidator is a validator for the "text" field. It is called by the builders before save. TextValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() string // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(string) error )
var Columns = []string{ FieldID, FieldText, }
Columns holds all SQL columns for item fields.
Functions ¶
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID field.
func TextContains ¶
TextContains applies the Contains predicate on the "text" field.
func TextContainsFold ¶
TextContainsFold applies the ContainsFold predicate on the "text" field.
func TextEqualFold ¶
TextEqualFold applies the EqualFold predicate on the "text" field.
func TextHasPrefix ¶
TextHasPrefix applies the HasPrefix predicate on the "text" field.
func TextHasSuffix ¶
TextHasSuffix applies the HasSuffix predicate on the "text" field.
func TextNotNil ¶
TextNotNil applies the NotNil predicate on the "text" 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 Item queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByText ¶
func ByText(opts ...sql.OrderTermOption) OrderOption
ByText orders the results by the text field.