First workflow implementation
This commit is contained in:
@@ -37,6 +37,8 @@ const (
|
||||
FieldProcessedAt = "processed_at"
|
||||
// FieldUserID holds the string denoting the user_id field in the database.
|
||||
FieldUserID = "user_id"
|
||||
// FieldWorkflowID holds the string denoting the workflow_id field in the database.
|
||||
FieldWorkflowID = "workflow_id"
|
||||
// Table holds the table name of the generalqueue in the database.
|
||||
Table = "generalQueue"
|
||||
)
|
||||
@@ -56,6 +58,7 @@ var Columns = []string{
|
||||
FieldUpdatedAt,
|
||||
FieldProcessedAt,
|
||||
FieldUserID,
|
||||
FieldWorkflowID,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
@@ -152,3 +155,8 @@ func ByProcessedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUserID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByWorkflowID orders the results by the workflow_id field.
|
||||
func ByWorkflowID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWorkflowID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
@@ -94,6 +94,11 @@ func UserID(v int) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldEQ(FieldUserID, v))
|
||||
}
|
||||
|
||||
// WorkflowID applies equality check predicate on the "workflow_id" field. It's identical to WorkflowIDEQ.
|
||||
func WorkflowID(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldEQ(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
func NameEQ(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldEQ(FieldName, v))
|
||||
@@ -524,6 +529,81 @@ func UserIDLTE(v int) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldLTE(FieldUserID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDEQ applies the EQ predicate on the "workflow_id" field.
|
||||
func WorkflowIDEQ(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldEQ(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDNEQ applies the NEQ predicate on the "workflow_id" field.
|
||||
func WorkflowIDNEQ(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldNEQ(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDIn applies the In predicate on the "workflow_id" field.
|
||||
func WorkflowIDIn(vs ...string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldIn(FieldWorkflowID, vs...))
|
||||
}
|
||||
|
||||
// WorkflowIDNotIn applies the NotIn predicate on the "workflow_id" field.
|
||||
func WorkflowIDNotIn(vs ...string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldNotIn(FieldWorkflowID, vs...))
|
||||
}
|
||||
|
||||
// WorkflowIDGT applies the GT predicate on the "workflow_id" field.
|
||||
func WorkflowIDGT(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldGT(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDGTE applies the GTE predicate on the "workflow_id" field.
|
||||
func WorkflowIDGTE(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldGTE(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDLT applies the LT predicate on the "workflow_id" field.
|
||||
func WorkflowIDLT(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldLT(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDLTE applies the LTE predicate on the "workflow_id" field.
|
||||
func WorkflowIDLTE(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldLTE(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDContains applies the Contains predicate on the "workflow_id" field.
|
||||
func WorkflowIDContains(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldContains(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDHasPrefix applies the HasPrefix predicate on the "workflow_id" field.
|
||||
func WorkflowIDHasPrefix(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldHasPrefix(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDHasSuffix applies the HasSuffix predicate on the "workflow_id" field.
|
||||
func WorkflowIDHasSuffix(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldHasSuffix(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDIsNil applies the IsNil predicate on the "workflow_id" field.
|
||||
func WorkflowIDIsNil() predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldIsNull(FieldWorkflowID))
|
||||
}
|
||||
|
||||
// WorkflowIDNotNil applies the NotNil predicate on the "workflow_id" field.
|
||||
func WorkflowIDNotNil() predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldNotNull(FieldWorkflowID))
|
||||
}
|
||||
|
||||
// WorkflowIDEqualFold applies the EqualFold predicate on the "workflow_id" field.
|
||||
func WorkflowIDEqualFold(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldEqualFold(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// WorkflowIDContainsFold applies the ContainsFold predicate on the "workflow_id" field.
|
||||
func WorkflowIDContainsFold(v string) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.FieldContainsFold(FieldWorkflowID, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.GeneralQueue) predicate.GeneralQueue {
|
||||
return predicate.GeneralQueue(sql.AndPredicates(predicates...))
|
||||
|
||||
Reference in New Issue
Block a user