shell

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the shell type in the database.
	Label = "shell"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldLastModifiedAt holds the string denoting the last_modified_at field in the database.
	FieldLastModifiedAt = "last_modified_at"
	// FieldClosedAt holds the string denoting the closed_at field in the database.
	FieldClosedAt = "closed_at"
	// FieldData holds the string denoting the data field in the database.
	FieldData = "data"
	// EdgeTask holds the string denoting the task edge name in mutations.
	EdgeTask = "task"
	// EdgeBeacon holds the string denoting the beacon edge name in mutations.
	EdgeBeacon = "beacon"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// EdgeActiveUsers holds the string denoting the active_users edge name in mutations.
	EdgeActiveUsers = "active_users"
	// Table holds the table name of the shell in the database.
	Table = "shells"
	// TaskTable is the table that holds the task relation/edge.
	TaskTable = "shells"
	// TaskInverseTable is the table name for the Task entity.
	// It exists in this package in order to avoid circular dependency with the "task" package.
	TaskInverseTable = "tasks"
	// TaskColumn is the table column denoting the task relation/edge.
	TaskColumn = "shell_task"
	// BeaconTable is the table that holds the beacon relation/edge.
	BeaconTable = "shells"
	// BeaconInverseTable is the table name for the Beacon entity.
	// It exists in this package in order to avoid circular dependency with the "beacon" package.
	BeaconInverseTable = "beacons"
	// BeaconColumn is the table column denoting the beacon relation/edge.
	BeaconColumn = "shell_beacon"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "shells"
	// 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 = "shell_owner"
	// ActiveUsersTable is the table that holds the active_users relation/edge. The primary key declared below.
	ActiveUsersTable = "shell_active_users"
	// ActiveUsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	ActiveUsersInverseTable = "users"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultLastModifiedAt holds the default value on creation for the "last_modified_at" field.
	DefaultLastModifiedAt func() time.Time
	// UpdateDefaultLastModifiedAt holds the default value on update for the "last_modified_at" field.
	UpdateDefaultLastModifiedAt func() time.Time
)
View Source
var (
	// ActiveUsersPrimaryKey and ActiveUsersColumn2 are the table columns denoting the
	// primary key for the active_users relation (M2M).
	ActiveUsersPrimaryKey = []string{"shell_id", "user_id"}
)

Columns holds all SQL columns for shell fields.

View Source
var ForeignKeys = []string{
	"shell_task",
	"shell_beacon",
	"shell_owner",
}

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

Functions

func And

func And(predicates ...predicate.Shell) predicate.Shell

And groups predicates with the AND operator between them.

func ClosedAt

func ClosedAt(v time.Time) predicate.Shell

ClosedAt applies equality check predicate on the "closed_at" field. It's identical to ClosedAtEQ.

func ClosedAtEQ

func ClosedAtEQ(v time.Time) predicate.Shell

ClosedAtEQ applies the EQ predicate on the "closed_at" field.

func ClosedAtGT

func ClosedAtGT(v time.Time) predicate.Shell

ClosedAtGT applies the GT predicate on the "closed_at" field.

func ClosedAtGTE

func ClosedAtGTE(v time.Time) predicate.Shell

ClosedAtGTE applies the GTE predicate on the "closed_at" field.

func ClosedAtIn

func ClosedAtIn(vs ...time.Time) predicate.Shell

ClosedAtIn applies the In predicate on the "closed_at" field.

func ClosedAtIsNil

func ClosedAtIsNil() predicate.Shell

ClosedAtIsNil applies the IsNil predicate on the "closed_at" field.

func ClosedAtLT

func ClosedAtLT(v time.Time) predicate.Shell

ClosedAtLT applies the LT predicate on the "closed_at" field.

func ClosedAtLTE

func ClosedAtLTE(v time.Time) predicate.Shell

ClosedAtLTE applies the LTE predicate on the "closed_at" field.

func ClosedAtNEQ

func ClosedAtNEQ(v time.Time) predicate.Shell

ClosedAtNEQ applies the NEQ predicate on the "closed_at" field.

func ClosedAtNotIn

func ClosedAtNotIn(vs ...time.Time) predicate.Shell

ClosedAtNotIn applies the NotIn predicate on the "closed_at" field.

func ClosedAtNotNil

func ClosedAtNotNil() predicate.Shell

ClosedAtNotNil applies the NotNil predicate on the "closed_at" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Shell

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Shell

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Shell

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Shell

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Shell

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Shell

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Shell

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

func CreatedAtNotIn

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

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

func Data

func Data(v []byte) predicate.Shell

Data applies equality check predicate on the "data" field. It's identical to DataEQ.

func DataEQ

func DataEQ(v []byte) predicate.Shell

DataEQ applies the EQ predicate on the "data" field.

func DataGT

func DataGT(v []byte) predicate.Shell

DataGT applies the GT predicate on the "data" field.

func DataGTE

func DataGTE(v []byte) predicate.Shell

DataGTE applies the GTE predicate on the "data" field.

func DataIn

func DataIn(vs ...[]byte) predicate.Shell

DataIn applies the In predicate on the "data" field.

func DataLT

func DataLT(v []byte) predicate.Shell

DataLT applies the LT predicate on the "data" field.

func DataLTE

func DataLTE(v []byte) predicate.Shell

DataLTE applies the LTE predicate on the "data" field.

func DataNEQ

func DataNEQ(v []byte) predicate.Shell

DataNEQ applies the NEQ predicate on the "data" field.

func DataNotIn

func DataNotIn(vs ...[]byte) predicate.Shell

DataNotIn applies the NotIn predicate on the "data" field.

func HasActiveUsers

func HasActiveUsers() predicate.Shell

HasActiveUsers applies the HasEdge predicate on the "active_users" edge.

func HasActiveUsersWith

func HasActiveUsersWith(preds ...predicate.User) predicate.Shell

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

func HasBeacon

func HasBeacon() predicate.Shell

HasBeacon applies the HasEdge predicate on the "beacon" edge.

func HasBeaconWith

func HasBeaconWith(preds ...predicate.Beacon) predicate.Shell

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

func HasOwner

func HasOwner() predicate.Shell

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.Shell

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

func HasTask

func HasTask() predicate.Shell

HasTask applies the HasEdge predicate on the "task" edge.

func HasTaskWith

func HasTaskWith(preds ...predicate.Task) predicate.Shell

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

func ID

func ID(id int) predicate.Shell

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Shell

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Shell

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Shell

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Shell

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Shell

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Shell

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Shell

IDNotIn applies the NotIn predicate on the ID field.

func LastModifiedAt

func LastModifiedAt(v time.Time) predicate.Shell

LastModifiedAt applies equality check predicate on the "last_modified_at" field. It's identical to LastModifiedAtEQ.

func LastModifiedAtEQ

func LastModifiedAtEQ(v time.Time) predicate.Shell

LastModifiedAtEQ applies the EQ predicate on the "last_modified_at" field.

func LastModifiedAtGT

func LastModifiedAtGT(v time.Time) predicate.Shell

LastModifiedAtGT applies the GT predicate on the "last_modified_at" field.

func LastModifiedAtGTE

func LastModifiedAtGTE(v time.Time) predicate.Shell

LastModifiedAtGTE applies the GTE predicate on the "last_modified_at" field.

func LastModifiedAtIn

func LastModifiedAtIn(vs ...time.Time) predicate.Shell

LastModifiedAtIn applies the In predicate on the "last_modified_at" field.

func LastModifiedAtLT

func LastModifiedAtLT(v time.Time) predicate.Shell

LastModifiedAtLT applies the LT predicate on the "last_modified_at" field.

func LastModifiedAtLTE

func LastModifiedAtLTE(v time.Time) predicate.Shell

LastModifiedAtLTE applies the LTE predicate on the "last_modified_at" field.

func LastModifiedAtNEQ

func LastModifiedAtNEQ(v time.Time) predicate.Shell

LastModifiedAtNEQ applies the NEQ predicate on the "last_modified_at" field.

func LastModifiedAtNotIn

func LastModifiedAtNotIn(vs ...time.Time) predicate.Shell

LastModifiedAtNotIn applies the NotIn predicate on the "last_modified_at" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Shell) predicate.Shell

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

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Shell queries.

func ByActiveUsers

func ByActiveUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByActiveUsers orders the results by active_users terms.

func ByActiveUsersCount

func ByActiveUsersCount(opts ...sql.OrderTermOption) OrderOption

ByActiveUsersCount orders the results by active_users count.

func ByBeaconField

func ByBeaconField(field string, opts ...sql.OrderTermOption) OrderOption

ByBeaconField orders the results by beacon field.

func ByClosedAt

func ByClosedAt(opts ...sql.OrderTermOption) OrderOption

ByClosedAt orders the results by the closed_at field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByLastModifiedAt

func ByLastModifiedAt(opts ...sql.OrderTermOption) OrderOption

ByLastModifiedAt orders the results by the last_modified_at field.

func ByOwnerField

func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption

ByOwnerField orders the results by owner field.

func ByTaskField

func ByTaskField(field string, opts ...sql.OrderTermOption) OrderOption

ByTaskField orders the results by task field.

Jump to

Keyboard shortcuts

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