Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Subject) predicate.Subject
- func HasStatement() predicate.Subject
- func HasStatementWith(preds ...predicate.Statement) predicate.Subject
- func HasSubjectDigests() predicate.Subject
- func HasSubjectDigestsWith(preds ...predicate.SubjectDigest) predicate.Subject
- func ID(id uuid.UUID) predicate.Subject
- func IDEQ(id uuid.UUID) predicate.Subject
- func IDGT(id uuid.UUID) predicate.Subject
- func IDGTE(id uuid.UUID) predicate.Subject
- func IDIn(ids ...uuid.UUID) predicate.Subject
- func IDLT(id uuid.UUID) predicate.Subject
- func IDLTE(id uuid.UUID) predicate.Subject
- func IDNEQ(id uuid.UUID) predicate.Subject
- func IDNotIn(ids ...uuid.UUID) predicate.Subject
- func Name(v string) predicate.Subject
- func NameContains(v string) predicate.Subject
- func NameContainsFold(v string) predicate.Subject
- func NameEQ(v string) predicate.Subject
- func NameEqualFold(v string) predicate.Subject
- func NameGT(v string) predicate.Subject
- func NameGTE(v string) predicate.Subject
- func NameHasPrefix(v string) predicate.Subject
- func NameHasSuffix(v string) predicate.Subject
- func NameIn(vs ...string) predicate.Subject
- func NameLT(v string) predicate.Subject
- func NameLTE(v string) predicate.Subject
- func NameNEQ(v string) predicate.Subject
- func NameNotIn(vs ...string) predicate.Subject
- func Not(p predicate.Subject) predicate.Subject
- func Or(predicates ...predicate.Subject) predicate.Subject
- func ValidColumn(column string) bool
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByStatementField(field string, opts ...sql.OrderTermOption) OrderOption
- func BySubjectDigests(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubjectDigestsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the subject type in the database. Label = "subject" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeSubjectDigests holds the string denoting the subject_digests edge name in mutations. EdgeSubjectDigests = "subject_digests" // EdgeStatement holds the string denoting the statement edge name in mutations. EdgeStatement = "statement" // Table holds the table name of the subject in the database. Table = "subjects" // SubjectDigestsTable is the table that holds the subject_digests relation/edge. SubjectDigestsTable = "subject_digests" // SubjectDigestsInverseTable is the table name for the SubjectDigest entity. // It exists in this package in order to avoid circular dependency with the "subjectdigest" package. SubjectDigestsInverseTable = "subject_digests" // SubjectDigestsColumn is the table column denoting the subject_digests relation/edge. SubjectDigestsColumn = "subject_subject_digests" // StatementTable is the table that holds the statement relation/edge. StatementTable = "subjects" // StatementInverseTable is the table name for the Statement entity. // It exists in this package in order to avoid circular dependency with the "statement" package. StatementInverseTable = "statements" // StatementColumn is the table column denoting the statement relation/edge. StatementColumn = "statement_subjects" )
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldName, }
Columns holds all SQL columns for subject fields.
var ForeignKeys = []string{
"statement_subjects",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "subjects" table and are not defined as standalone fields in the schema.
Functions ¶
func HasStatement ¶
HasStatement applies the HasEdge predicate on the "statement" edge.
func HasStatementWith ¶
HasStatementWith applies the HasEdge predicate on the "statement" edge with a given conditions (other predicates).
func HasSubjectDigests ¶
HasSubjectDigests applies the HasEdge predicate on the "subject_digests" edge.
func HasSubjectDigestsWith ¶
func HasSubjectDigestsWith(preds ...predicate.SubjectDigest) predicate.Subject
HasSubjectDigestsWith applies the HasEdge predicate on the "subject_digests" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" 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 Subject queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByStatementField ¶
func ByStatementField(field string, opts ...sql.OrderTermOption) OrderOption
ByStatementField orders the results by statement field.
func BySubjectDigests ¶
func BySubjectDigests(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySubjectDigests orders the results by subject_digests terms.
func BySubjectDigestsCount ¶
func BySubjectDigestsCount(opts ...sql.OrderTermOption) OrderOption
BySubjectDigestsCount orders the results by subject_digests count.