Documentation ¶
Index ¶
- Constants
- Variables
- func Adult(v bool) predicate.Template
- func AdultEQ(v bool) predicate.Template
- func AdultNEQ(v bool) predicate.Template
- func And(predicates ...predicate.Template) predicate.Template
- func CreatedAt(v time.Time) predicate.Template
- func CreatedAtEQ(v time.Time) predicate.Template
- func CreatedAtGT(v time.Time) predicate.Template
- func CreatedAtGTE(v time.Time) predicate.Template
- func CreatedAtIn(vs ...time.Time) predicate.Template
- func CreatedAtLT(v time.Time) predicate.Template
- func CreatedAtLTE(v time.Time) predicate.Template
- func CreatedAtNEQ(v time.Time) predicate.Template
- func CreatedAtNotIn(vs ...time.Time) predicate.Template
- func HasCreator() predicate.Template
- func HasCreatorWith(preds ...predicate.Admin) predicate.Template
- func HasProject() predicate.Template
- func HasProjectWith(preds ...predicate.Project) predicate.Template
- func HasRun() predicate.Template
- func HasRunWith(preds ...predicate.Run) predicate.Template
- func HasSteps() predicate.Template
- func HasStepsWith(preds ...predicate.Step) predicate.Template
- func ID(id string) predicate.Template
- func IDEQ(id string) predicate.Template
- func IDGT(id string) predicate.Template
- func IDGTE(id string) predicate.Template
- func IDIn(ids ...string) predicate.Template
- func IDLT(id string) predicate.Template
- func IDLTE(id string) predicate.Template
- func IDNEQ(id string) predicate.Template
- func IDNotIn(ids ...string) predicate.Template
- func Name(v string) predicate.Template
- func NameContains(v string) predicate.Template
- func NameContainsFold(v string) predicate.Template
- func NameEQ(v string) predicate.Template
- func NameEqualFold(v string) predicate.Template
- func NameGT(v string) predicate.Template
- func NameGTE(v string) predicate.Template
- func NameHasPrefix(v string) predicate.Template
- func NameHasSuffix(v string) predicate.Template
- func NameIn(vs ...string) predicate.Template
- func NameLT(v string) predicate.Template
- func NameLTE(v string) predicate.Template
- func NameNEQ(v string) predicate.Template
- func NameNotIn(vs ...string) predicate.Template
- func Not(p predicate.Template) predicate.Template
- func Or(predicates ...predicate.Template) predicate.Template
- func ParticipantCount(v int) predicate.Template
- func ParticipantCountEQ(v int) predicate.Template
- func ParticipantCountGT(v int) predicate.Template
- func ParticipantCountGTE(v int) predicate.Template
- func ParticipantCountIn(vs ...int) predicate.Template
- func ParticipantCountLT(v int) predicate.Template
- func ParticipantCountLTE(v int) predicate.Template
- func ParticipantCountNEQ(v int) predicate.Template
- func ParticipantCountNotIn(vs ...int) predicate.Template
- func Sandbox(v bool) predicate.Template
- func SandboxEQ(v bool) predicate.Template
- func SandboxNEQ(v bool) predicate.Template
- func SelectionTypeEQ(v SelectionType) predicate.Template
- func SelectionTypeIn(vs ...SelectionType) predicate.Template
- func SelectionTypeNEQ(v SelectionType) predicate.Template
- func SelectionTypeNotIn(vs ...SelectionType) predicate.Template
- func SelectionTypeValidator(st SelectionType) error
- func UpdatedAt(v time.Time) predicate.Template
- func UpdatedAtEQ(v time.Time) predicate.Template
- func UpdatedAtGT(v time.Time) predicate.Template
- func UpdatedAtGTE(v time.Time) predicate.Template
- func UpdatedAtIn(vs ...time.Time) predicate.Template
- func UpdatedAtLT(v time.Time) predicate.Template
- func UpdatedAtLTE(v time.Time) predicate.Template
- func UpdatedAtNEQ(v time.Time) predicate.Template
- func UpdatedAtNotIn(vs ...time.Time) predicate.Template
- func ValidColumn(column string) bool
- type SelectionType
Constants ¶
const ( // Label holds the string label denoting the template type in the database. Label = "template" // 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" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldSelectionType holds the string denoting the selectiontype field in the database. FieldSelectionType = "selection_type" // FieldParticipantCount holds the string denoting the participantcount field in the database. FieldParticipantCount = "participant_count" // FieldInternalCriteria holds the string denoting the internalcriteria field in the database. FieldInternalCriteria = "internal_criteria" // FieldMturkCriteria holds the string denoting the mturkcriteria field in the database. FieldMturkCriteria = "mturk_criteria" // FieldAdult holds the string denoting the adult field in the database. FieldAdult = "adult" // FieldSandbox holds the string denoting the sandbox field in the database. FieldSandbox = "sandbox" // EdgeSteps holds the string denoting the steps edge name in mutations. EdgeSteps = "steps" // EdgeProject holds the string denoting the project edge name in mutations. EdgeProject = "project" // EdgeCreator holds the string denoting the creator edge name in mutations. EdgeCreator = "creator" // EdgeRun holds the string denoting the run edge name in mutations. EdgeRun = "run" // Table holds the table name of the template in the database. Table = "templates" // StepsTable is the table the holds the steps relation/edge. StepsTable = "steps" // StepsInverseTable is the table name for the Step entity. // It exists in this package in order to avoid circular dependency with the "step" package. StepsInverseTable = "steps" // StepsColumn is the table column denoting the steps relation/edge. StepsColumn = "template_steps" // ProjectTable is the table the holds the project relation/edge. ProjectTable = "templates" // ProjectInverseTable is the table name for the Project entity. // It exists in this package in order to avoid circular dependency with the "project" package. ProjectInverseTable = "projects" // ProjectColumn is the table column denoting the project relation/edge. ProjectColumn = "project_templates" // CreatorTable is the table the holds the creator relation/edge. CreatorTable = "templates" // CreatorInverseTable is the table name for the Admin entity. // It exists in this package in order to avoid circular dependency with the "admin" package. CreatorInverseTable = "admins" // CreatorColumn is the table column denoting the creator relation/edge. CreatorColumn = "admin_templates" // RunTable is the table the holds the run relation/edge. RunTable = "templates" // RunInverseTable is the table name for the Run entity. // It exists in this package in order to avoid circular dependency with the "run" package. RunInverseTable = "runs" // RunColumn is the table column denoting the run relation/edge. RunColumn = "run_template" )
Variables ¶
var ( // 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 // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultParticipantCount holds the default value on creation for the participantCount field. DefaultParticipantCount int // ParticipantCountValidator is a validator for the "participantCount" field. It is called by the builders before save. ParticipantCountValidator func(int) error // DefaultAdult holds the default value on creation for the adult field. DefaultAdult bool // DefaultSandbox holds the default value on creation for the sandbox field. DefaultSandbox bool // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(string) error )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldName, FieldSelectionType, FieldParticipantCount, FieldInternalCriteria, FieldMturkCriteria, FieldAdult, FieldSandbox, }
Columns holds all SQL columns for template fields.
var ForeignKeys = []string{
"admin_templates",
"project_templates",
"run_template",
}
ForeignKeys holds the SQL foreign-keys that are owned by the Template type.
Functions ¶
func Adult ¶
Adult applies equality check predicate on the "adult" field. It's identical to AdultEQ.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasCreator ¶
HasCreator applies the HasEdge predicate on the "creator" edge.
func HasCreatorWith ¶
HasCreatorWith applies the HasEdge predicate on the "creator" edge with a given conditions (other predicates).
func HasProject ¶
HasProject applies the HasEdge predicate on the "project" edge.
func HasProjectWith ¶
HasProjectWith applies the HasEdge predicate on the "project" edge with a given conditions (other predicates).
func HasRunWith ¶
HasRunWith applies the HasEdge predicate on the "run" edge with a given conditions (other predicates).
func HasStepsWith ¶
HasStepsWith applies the HasEdge predicate on the "steps" 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 ParticipantCount ¶
ParticipantCount applies equality check predicate on the "participantCount" field. It's identical to ParticipantCountEQ.
func ParticipantCountEQ ¶
ParticipantCountEQ applies the EQ predicate on the "participantCount" field.
func ParticipantCountGT ¶
ParticipantCountGT applies the GT predicate on the "participantCount" field.
func ParticipantCountGTE ¶
ParticipantCountGTE applies the GTE predicate on the "participantCount" field.
func ParticipantCountIn ¶
ParticipantCountIn applies the In predicate on the "participantCount" field.
func ParticipantCountLT ¶
ParticipantCountLT applies the LT predicate on the "participantCount" field.
func ParticipantCountLTE ¶
ParticipantCountLTE applies the LTE predicate on the "participantCount" field.
func ParticipantCountNEQ ¶
ParticipantCountNEQ applies the NEQ predicate on the "participantCount" field.
func ParticipantCountNotIn ¶
ParticipantCountNotIn applies the NotIn predicate on the "participantCount" field.
func Sandbox ¶
Sandbox applies equality check predicate on the "sandbox" field. It's identical to SandboxEQ.
func SandboxNEQ ¶
SandboxNEQ applies the NEQ predicate on the "sandbox" field.
func SelectionTypeEQ ¶
func SelectionTypeEQ(v SelectionType) predicate.Template
SelectionTypeEQ applies the EQ predicate on the "selectionType" field.
func SelectionTypeIn ¶
func SelectionTypeIn(vs ...SelectionType) predicate.Template
SelectionTypeIn applies the In predicate on the "selectionType" field.
func SelectionTypeNEQ ¶
func SelectionTypeNEQ(v SelectionType) predicate.Template
SelectionTypeNEQ applies the NEQ predicate on the "selectionType" field.
func SelectionTypeNotIn ¶
func SelectionTypeNotIn(vs ...SelectionType) predicate.Template
SelectionTypeNotIn applies the NotIn predicate on the "selectionType" field.
func SelectionTypeValidator ¶
func SelectionTypeValidator(st SelectionType) error
SelectionTypeValidator is a validator for the "selectionType" field enum values. It is called by the builders before save.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type SelectionType ¶
type SelectionType string
SelectionType defines the type for the selectionType enum field.
const ( SelectionTypeINTERNAL_DB SelectionType = "INTERNAL_DB" SelectionTypeMTURK_QUALIFICATIONS SelectionType = "MTURK_QUALIFICATIONS" )
SelectionType values.
func (SelectionType) String ¶
func (st SelectionType) String() string