device

package
v0.11.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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 And

func And(predicates ...predicate.Device) predicate.Device

And groups predicates with the AND operator between them.

func HasActiveSession

func HasActiveSession() predicate.Device

HasActiveSession applies the HasEdge predicate on the "active_session" edge.

func HasActiveSessionWith

func HasActiveSessionWith(preds ...predicate.Session) predicate.Device

HasActiveSessionWith applies the HasEdge predicate on the "active_session" edge with a given conditions (other predicates).

func HasSessions

func HasSessions() predicate.Device

HasSessions applies the HasEdge predicate on the "sessions" edge.

func HasSessionsWith

func HasSessionsWith(preds ...predicate.Session) predicate.Device

HasSessionsWith applies the HasEdge predicate on the "sessions" edge with a given conditions (other predicates).

func ID

func ID(id schema.ID) predicate.Device

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id schema.ID) predicate.Device

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id schema.ID) predicate.Device

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id schema.ID) predicate.Device

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...schema.ID) predicate.Device

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id schema.ID) predicate.Device

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id schema.ID) predicate.Device

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id schema.ID) predicate.Device

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...schema.ID) predicate.Device

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Device) predicate.Device

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL