Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Device) predicate.Device
- func HasActiveSession() predicate.Device
- func HasActiveSessionWith(preds ...predicate.Session) predicate.Device
- func HasSessions() predicate.Device
- func HasSessionsWith(preds ...predicate.Session) predicate.Device
- func ID(id schema.ID) predicate.Device
- func IDEQ(id schema.ID) predicate.Device
- func IDGT(id schema.ID) predicate.Device
- func IDGTE(id schema.ID) predicate.Device
- func IDIn(ids ...schema.ID) predicate.Device
- func IDLT(id schema.ID) predicate.Device
- func IDLTE(id schema.ID) predicate.Device
- func IDNEQ(id schema.ID) predicate.Device
- func IDNotIn(ids ...schema.ID) predicate.Device
- func Not(p predicate.Device) predicate.Device
- func Or(predicates ...predicate.Device) predicate.Device
- func ValidColumn(column string) bool
Constants ¶
View Source
const ( // Label holds the string label denoting the device type in the database. Label = "device" // FieldID holds the string denoting the id field in the database. FieldID = "id" // EdgeActiveSession holds the string denoting the active_session edge name in mutations. EdgeActiveSession = "active_session" // EdgeSessions holds the string denoting the sessions edge name in mutations. EdgeSessions = "sessions" // Table holds the table name of the device in the database. Table = "devices" // ActiveSessionTable is the table that holds the active_session relation/edge. ActiveSessionTable = "devices" // ActiveSessionInverseTable is the table name for the Session entity. // It exists in this package in order to avoid circular dependency with the "session" package. ActiveSessionInverseTable = "sessions" // ActiveSessionColumn is the table column denoting the active_session relation/edge. ActiveSessionColumn = "device_active_session" // SessionsTable is the table that holds the sessions relation/edge. SessionsTable = "sessions" // SessionsInverseTable is the table name for the Session entity. // It exists in this package in order to avoid circular dependency with the "session" package. SessionsInverseTable = "sessions" // SessionsColumn is the table column denoting the sessions relation/edge. SessionsColumn = "device_sessions" )
Variables ¶
View Source
var ( // DefaultID holds the default value on creation for the "id" field. DefaultID func() schema.ID // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func([]byte) error )
View Source
var Columns = []string{ FieldID, }
Columns holds all SQL columns for device fields.
View Source
var ForeignKeys = []string{
"device_active_session",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "devices" table and are not defined as standalone fields in the schema.
Functions ¶
func HasActiveSession ¶
HasActiveSession applies the HasEdge predicate on the "active_session" edge.
func HasActiveSessionWith ¶
HasActiveSessionWith applies the HasEdge predicate on the "active_session" edge with a given conditions (other predicates).
func HasSessions ¶
HasSessions applies the HasEdge predicate on the "sessions" edge.
func HasSessionsWith ¶
HasSessionsWith applies the HasEdge predicate on the "sessions" edge with a given conditions (other predicates).
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.