Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Sessions) predicate.Sessions
- func Data(v []byte) predicate.Sessions
- func DataEQ(v []byte) predicate.Sessions
- func DataGT(v []byte) predicate.Sessions
- func DataGTE(v []byte) predicate.Sessions
- func DataIn(vs ...[]byte) predicate.Sessions
- func DataLT(v []byte) predicate.Sessions
- func DataLTE(v []byte) predicate.Sessions
- func DataNEQ(v []byte) predicate.Sessions
- func DataNotIn(vs ...[]byte) predicate.Sessions
- func Expiry(v time.Time) predicate.Sessions
- func ExpiryEQ(v time.Time) predicate.Sessions
- func ExpiryGT(v time.Time) predicate.Sessions
- func ExpiryGTE(v time.Time) predicate.Sessions
- func ExpiryIn(vs ...time.Time) predicate.Sessions
- func ExpiryLT(v time.Time) predicate.Sessions
- func ExpiryLTE(v time.Time) predicate.Sessions
- func ExpiryNEQ(v time.Time) predicate.Sessions
- func ExpiryNotIn(vs ...time.Time) predicate.Sessions
- func HasOwner() predicate.Sessions
- func HasOwnerWith(preds ...predicate.User) predicate.Sessions
- func ID(id string) predicate.Sessions
- func IDContainsFold(id string) predicate.Sessions
- func IDEQ(id string) predicate.Sessions
- func IDEqualFold(id string) predicate.Sessions
- func IDGT(id string) predicate.Sessions
- func IDGTE(id string) predicate.Sessions
- func IDIn(ids ...string) predicate.Sessions
- func IDLT(id string) predicate.Sessions
- func IDLTE(id string) predicate.Sessions
- func IDNEQ(id string) predicate.Sessions
- func IDNotIn(ids ...string) predicate.Sessions
- func Not(p predicate.Sessions) predicate.Sessions
- func Or(predicates ...predicate.Sessions) predicate.Sessions
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the sessions type in the database. Label = "sessions" // FieldID holds the string denoting the id field in the database. FieldID = "token" // FieldData holds the string denoting the data field in the database. FieldData = "data" // FieldExpiry holds the string denoting the expiry field in the database. FieldExpiry = "expiry" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // UserFieldID holds the string denoting the ID field of the User. UserFieldID = "uid" // Table holds the table name of the sessions in the database. Table = "sessions" // OwnerTable is the table that holds the owner relation/edge. OwnerTable = "sessions" // OwnerInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. OwnerInverseTable = "users" // OwnerColumn is the table column denoting the owner relation/edge. OwnerColumn = "user_sessions" )
Variables ¶
var ( // DataValidator is a validator for the "data" field. It is called by the builders before save. DataValidator func([]byte) error // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(string) error )
var Columns = []string{ FieldID, FieldData, FieldExpiry, }
Columns holds all SQL columns for sessions fields.
var ForeignKeys = []string{
"user_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 Expiry ¶
Expiry applies equality check predicate on the "expiry" field. It's identical to ExpiryEQ.
func ExpiryNotIn ¶
ExpiryNotIn applies the NotIn predicate on the "expiry" field.
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID 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 Sessions queries.
func ByExpiry ¶
func ByExpiry(opts ...sql.OrderTermOption) OrderOption
ByExpiry orders the results by the expiry field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByOwnerField ¶
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
ByOwnerField orders the results by owner field.