session

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 4 Imported by: 2

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"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// EdgeMessages holds the string denoting the messages edge name in mutations.
	EdgeMessages = "messages"
	// Table holds the table name of the session in the database.
	Table = "sessions"
	// MessagesTable is the table that holds the messages relation/edge.
	MessagesTable = "messages"
	// MessagesInverseTable is the table name for the Message entity.
	// It exists in this package in order to avoid circular dependency with the "message" package.
	MessagesInverseTable = "messages"
	// MessagesColumn is the table column denoting the messages relation/edge.
	MessagesColumn = "session_id"
)

Variables

View Source
var (
	// DefaultStatus holds the default value on creation for the "status" field.
	DefaultStatus bool
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
	DefaultDeletedAt int
)

Columns holds all SQL columns for session fields.

Functions

func And

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

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Session

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Session

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Session

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Session

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Session

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Session

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Session

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Session

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Session

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func DeletedAt

func DeletedAt(v int) predicate.Session

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v int) predicate.Session

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v int) predicate.Session

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v int) predicate.Session

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...int) predicate.Session

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v int) predicate.Session

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v int) predicate.Session

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v int) predicate.Session

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...int) predicate.Session

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func HasMessages

func HasMessages() predicate.Session

HasMessages applies the HasEdge predicate on the "messages" edge.

func HasMessagesWith

func HasMessagesWith(preds ...predicate.Message) predicate.Session

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

func ID

func ID(id int) predicate.Session

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Session

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Session

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Session

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Session

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Session

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Session

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Session

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) 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 Status

func Status(v bool) predicate.Session

Status applies equality check predicate on the "status" field. It's identical to StatusEQ.

func StatusEQ

func StatusEQ(v bool) predicate.Session

StatusEQ applies the EQ predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v bool) predicate.Session

StatusNEQ applies the NEQ predicate on the "status" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Session

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Session

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Session

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Session

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Session

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Session

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Session

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Session

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Session

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UserID

func UserID(v string) predicate.Session

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDContains

func UserIDContains(v string) predicate.Session

UserIDContains applies the Contains predicate on the "user_id" field.

func UserIDContainsFold

func UserIDContainsFold(v string) predicate.Session

UserIDContainsFold applies the ContainsFold predicate on the "user_id" field.

func UserIDEQ

func UserIDEQ(v string) predicate.Session

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDEqualFold

func UserIDEqualFold(v string) predicate.Session

UserIDEqualFold applies the EqualFold predicate on the "user_id" field.

func UserIDGT

func UserIDGT(v string) predicate.Session

UserIDGT applies the GT predicate on the "user_id" field.

func UserIDGTE

func UserIDGTE(v string) predicate.Session

UserIDGTE applies the GTE predicate on the "user_id" field.

func UserIDHasPrefix

func UserIDHasPrefix(v string) predicate.Session

UserIDHasPrefix applies the HasPrefix predicate on the "user_id" field.

func UserIDHasSuffix

func UserIDHasSuffix(v string) predicate.Session

UserIDHasSuffix applies the HasSuffix predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...string) predicate.Session

UserIDIn applies the In predicate on the "user_id" field.

func UserIDLT

func UserIDLT(v string) predicate.Session

UserIDLT applies the LT predicate on the "user_id" field.

func UserIDLTE

func UserIDLTE(v string) predicate.Session

UserIDLTE applies the LTE predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v string) predicate.Session

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...string) predicate.Session

UserIDNotIn applies the NotIn predicate on the "user_id" field.

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