session

package
v0.11.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the session type in the database.
	Label = "session"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// EdgeDevice holds the string denoting the device edge name in mutations.
	EdgeDevice = "device"
	// Table holds the table name of the session in the database.
	Table = "sessions"
	// DeviceTable is the table that holds the device relation/edge.
	DeviceTable = "sessions"
	// DeviceInverseTable is the table name for the Device entity.
	// It exists in this package in order to avoid circular dependency with the "device" package.
	DeviceInverseTable = "devices"
	// DeviceColumn is the table column denoting the device relation/edge.
	DeviceColumn = "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 session fields.

View Source
var ForeignKeys = []string{
	"device_sessions",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "sessions" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Session) predicate.Session

And groups predicates with the AND operator between them.

func HasDevice

func HasDevice() predicate.Session

HasDevice applies the HasEdge predicate on the "device" edge.

func HasDeviceWith

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

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

func ID

func ID(id schema.ID) predicate.Session

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id schema.ID) predicate.Session

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id schema.ID) predicate.Session

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id schema.ID) predicate.Session

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id schema.ID) predicate.Session

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id schema.ID) predicate.Session

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id schema.ID) predicate.Session

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.Session) predicate.Session

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