Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Segment) predicate.Segment
- func Condition(v string) predicate.Segment
- func ConditionContains(v string) predicate.Segment
- func ConditionContainsFold(v string) predicate.Segment
- func ConditionEQ(v string) predicate.Segment
- func ConditionEqualFold(v string) predicate.Segment
- func ConditionGT(v string) predicate.Segment
- func ConditionGTE(v string) predicate.Segment
- func ConditionHasPrefix(v string) predicate.Segment
- func ConditionHasSuffix(v string) predicate.Segment
- func ConditionIn(vs ...string) predicate.Segment
- func ConditionIsNil() predicate.Segment
- func ConditionLT(v string) predicate.Segment
- func ConditionLTE(v string) predicate.Segment
- func ConditionNEQ(v string) predicate.Segment
- func ConditionNotIn(vs ...string) predicate.Segment
- func ConditionNotNil() predicate.Segment
- func CreatedAt(v time.Time) predicate.Segment
- func CreatedAtEQ(v time.Time) predicate.Segment
- func CreatedAtGT(v time.Time) predicate.Segment
- func CreatedAtGTE(v time.Time) predicate.Segment
- func CreatedAtIn(vs ...time.Time) predicate.Segment
- func CreatedAtLT(v time.Time) predicate.Segment
- func CreatedAtLTE(v time.Time) predicate.Segment
- func CreatedAtNEQ(v time.Time) predicate.Segment
- func CreatedAtNotIn(vs ...time.Time) predicate.Segment
- func DiscardedAt(v time.Time) predicate.Segment
- func DiscardedAtEQ(v time.Time) predicate.Segment
- func DiscardedAtGT(v time.Time) predicate.Segment
- func DiscardedAtGTE(v time.Time) predicate.Segment
- func DiscardedAtIn(vs ...time.Time) predicate.Segment
- func DiscardedAtIsNil() predicate.Segment
- func DiscardedAtLT(v time.Time) predicate.Segment
- func DiscardedAtLTE(v time.Time) predicate.Segment
- func DiscardedAtNEQ(v time.Time) predicate.Segment
- func DiscardedAtNotIn(vs ...time.Time) predicate.Segment
- func DiscardedAtNotNil() predicate.Segment
- func HasWorkspace() predicate.Segment
- func HasWorkspaceWith(preds ...predicate.Workspace) predicate.Segment
- func ID(id int64) predicate.Segment
- func IDEQ(id int64) predicate.Segment
- func IDGT(id int64) predicate.Segment
- func IDGTE(id int64) predicate.Segment
- func IDIn(ids ...int64) predicate.Segment
- func IDLT(id int64) predicate.Segment
- func IDLTE(id int64) predicate.Segment
- func IDNEQ(id int64) predicate.Segment
- func IDNotIn(ids ...int64) predicate.Segment
- func Name(v string) predicate.Segment
- func NameContains(v string) predicate.Segment
- func NameContainsFold(v string) predicate.Segment
- func NameEQ(v string) predicate.Segment
- func NameEqualFold(v string) predicate.Segment
- func NameGT(v string) predicate.Segment
- func NameGTE(v string) predicate.Segment
- func NameHasPrefix(v string) predicate.Segment
- func NameHasSuffix(v string) predicate.Segment
- func NameIn(vs ...string) predicate.Segment
- func NameLT(v string) predicate.Segment
- func NameLTE(v string) predicate.Segment
- func NameNEQ(v string) predicate.Segment
- func NameNotIn(vs ...string) predicate.Segment
- func Not(p predicate.Segment) predicate.Segment
- func Or(predicates ...predicate.Segment) predicate.Segment
- func UpdatedAt(v time.Time) predicate.Segment
- func UpdatedAtEQ(v time.Time) predicate.Segment
- func UpdatedAtGT(v time.Time) predicate.Segment
- func UpdatedAtGTE(v time.Time) predicate.Segment
- func UpdatedAtIn(vs ...time.Time) predicate.Segment
- func UpdatedAtLT(v time.Time) predicate.Segment
- func UpdatedAtLTE(v time.Time) predicate.Segment
- func UpdatedAtNEQ(v time.Time) predicate.Segment
- func UpdatedAtNotIn(vs ...time.Time) predicate.Segment
- func ValidColumn(column string) bool
- func WorkspaceID(v int64) predicate.Segment
- func WorkspaceIDEQ(v int64) predicate.Segment
- func WorkspaceIDIn(vs ...int64) predicate.Segment
- func WorkspaceIDNEQ(v int64) predicate.Segment
- func WorkspaceIDNotIn(vs ...int64) predicate.Segment
- type OrderOption
- func ByCondition(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDiscardedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByWorkspaceField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByWorkspaceID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the segment type in the database. Label = "segment" // 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" // FieldWorkspaceID holds the string denoting the workspace_id field in the database. FieldWorkspaceID = "workspace_id" // FieldDiscardedAt holds the string denoting the discarded_at field in the database. FieldDiscardedAt = "discarded_at" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldCondition holds the string denoting the condition field in the database. FieldCondition = "condition" // EdgeWorkspace holds the string denoting the workspace edge name in mutations. EdgeWorkspace = "workspace" // Table holds the table name of the segment in the database. Table = "segments" // WorkspaceTable is the table that holds the workspace relation/edge. WorkspaceTable = "segments" // WorkspaceInverseTable is the table name for the Workspace entity. // It exists in this package in order to avoid circular dependency with the "workspace" package. WorkspaceInverseTable = "workspaces" // WorkspaceColumn is the table column denoting the workspace relation/edge. WorkspaceColumn = "workspace_id" )
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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldWorkspaceID, FieldDiscardedAt, FieldName, FieldCondition, }
Columns holds all SQL columns for segment fields.
Functions ¶
func Condition ¶
Condition applies equality check predicate on the "condition" field. It's identical to ConditionEQ.
func ConditionContains ¶
ConditionContains applies the Contains predicate on the "condition" field.
func ConditionContainsFold ¶
ConditionContainsFold applies the ContainsFold predicate on the "condition" field.
func ConditionEQ ¶
ConditionEQ applies the EQ predicate on the "condition" field.
func ConditionEqualFold ¶
ConditionEqualFold applies the EqualFold predicate on the "condition" field.
func ConditionGT ¶
ConditionGT applies the GT predicate on the "condition" field.
func ConditionGTE ¶
ConditionGTE applies the GTE predicate on the "condition" field.
func ConditionHasPrefix ¶
ConditionHasPrefix applies the HasPrefix predicate on the "condition" field.
func ConditionHasSuffix ¶
ConditionHasSuffix applies the HasSuffix predicate on the "condition" field.
func ConditionIn ¶
ConditionIn applies the In predicate on the "condition" field.
func ConditionIsNil ¶
ConditionIsNil applies the IsNil predicate on the "condition" field.
func ConditionLT ¶
ConditionLT applies the LT predicate on the "condition" field.
func ConditionLTE ¶
ConditionLTE applies the LTE predicate on the "condition" field.
func ConditionNEQ ¶
ConditionNEQ applies the NEQ predicate on the "condition" field.
func ConditionNotIn ¶
ConditionNotIn applies the NotIn predicate on the "condition" field.
func ConditionNotNil ¶
ConditionNotNil applies the NotNil predicate on the "condition" field.
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 DiscardedAt ¶
DiscardedAt applies equality check predicate on the "discarded_at" field. It's identical to DiscardedAtEQ.
func DiscardedAtEQ ¶
DiscardedAtEQ applies the EQ predicate on the "discarded_at" field.
func DiscardedAtGT ¶
DiscardedAtGT applies the GT predicate on the "discarded_at" field.
func DiscardedAtGTE ¶
DiscardedAtGTE applies the GTE predicate on the "discarded_at" field.
func DiscardedAtIn ¶
DiscardedAtIn applies the In predicate on the "discarded_at" field.
func DiscardedAtIsNil ¶
DiscardedAtIsNil applies the IsNil predicate on the "discarded_at" field.
func DiscardedAtLT ¶
DiscardedAtLT applies the LT predicate on the "discarded_at" field.
func DiscardedAtLTE ¶
DiscardedAtLTE applies the LTE predicate on the "discarded_at" field.
func DiscardedAtNEQ ¶
DiscardedAtNEQ applies the NEQ predicate on the "discarded_at" field.
func DiscardedAtNotIn ¶
DiscardedAtNotIn applies the NotIn predicate on the "discarded_at" field.
func DiscardedAtNotNil ¶
DiscardedAtNotNil applies the NotNil predicate on the "discarded_at" field.
func HasWorkspace ¶
HasWorkspace applies the HasEdge predicate on the "workspace" edge.
func HasWorkspaceWith ¶
HasWorkspaceWith applies the HasEdge predicate on the "workspace" 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 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).
func WorkspaceID ¶
WorkspaceID applies equality check predicate on the "workspace_id" field. It's identical to WorkspaceIDEQ.
func WorkspaceIDEQ ¶
WorkspaceIDEQ applies the EQ predicate on the "workspace_id" field.
func WorkspaceIDIn ¶
WorkspaceIDIn applies the In predicate on the "workspace_id" field.
func WorkspaceIDNEQ ¶
WorkspaceIDNEQ applies the NEQ predicate on the "workspace_id" field.
func WorkspaceIDNotIn ¶
WorkspaceIDNotIn applies the NotIn predicate on the "workspace_id" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Segment queries.
func ByCondition ¶
func ByCondition(opts ...sql.OrderTermOption) OrderOption
ByCondition orders the results by the condition field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDiscardedAt ¶
func ByDiscardedAt(opts ...sql.OrderTermOption) OrderOption
ByDiscardedAt orders the results by the discarded_at field.
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 ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByWorkspaceField ¶
func ByWorkspaceField(field string, opts ...sql.OrderTermOption) OrderOption
ByWorkspaceField orders the results by workspace field.
func ByWorkspaceID ¶
func ByWorkspaceID(opts ...sql.OrderTermOption) OrderOption
ByWorkspaceID orders the results by the workspace_id field.