// Code generated by ent, DO NOT EDIT. package blocks import ( "thesis/ent/predicate" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" ) // ID filters vertices based on their ID field. func ID(id int) predicate.Blocks { return predicate.Blocks(sql.FieldEQ(FieldID, id)) } // IDEQ applies the EQ predicate on the ID field. func IDEQ(id int) predicate.Blocks { return predicate.Blocks(sql.FieldEQ(FieldID, id)) } // IDNEQ applies the NEQ predicate on the ID field. func IDNEQ(id int) predicate.Blocks { return predicate.Blocks(sql.FieldNEQ(FieldID, id)) } // IDIn applies the In predicate on the ID field. func IDIn(ids ...int) predicate.Blocks { return predicate.Blocks(sql.FieldIn(FieldID, ids...)) } // IDNotIn applies the NotIn predicate on the ID field. func IDNotIn(ids ...int) predicate.Blocks { return predicate.Blocks(sql.FieldNotIn(FieldID, ids...)) } // IDGT applies the GT predicate on the ID field. func IDGT(id int) predicate.Blocks { return predicate.Blocks(sql.FieldGT(FieldID, id)) } // IDGTE applies the GTE predicate on the ID field. func IDGTE(id int) predicate.Blocks { return predicate.Blocks(sql.FieldGTE(FieldID, id)) } // IDLT applies the LT predicate on the ID field. func IDLT(id int) predicate.Blocks { return predicate.Blocks(sql.FieldLT(FieldID, id)) } // IDLTE applies the LTE predicate on the ID field. func IDLTE(id int) predicate.Blocks { return predicate.Blocks(sql.FieldLTE(FieldID, id)) } // Hash applies equality check predicate on the "hash" field. It's identical to HashEQ. func Hash(v string) predicate.Blocks { return predicate.Blocks(sql.FieldEQ(FieldHash, v)) } // Length applies equality check predicate on the "length" field. It's identical to LengthEQ. func Length(v int) predicate.Blocks { return predicate.Blocks(sql.FieldEQ(FieldLength, v)) } // PreviousHash applies equality check predicate on the "previousHash" field. It's identical to PreviousHashEQ. func PreviousHash(v string) predicate.Blocks { return predicate.Blocks(sql.FieldEQ(FieldPreviousHash, v)) } // HashEQ applies the EQ predicate on the "hash" field. func HashEQ(v string) predicate.Blocks { return predicate.Blocks(sql.FieldEQ(FieldHash, v)) } // HashNEQ applies the NEQ predicate on the "hash" field. func HashNEQ(v string) predicate.Blocks { return predicate.Blocks(sql.FieldNEQ(FieldHash, v)) } // HashIn applies the In predicate on the "hash" field. func HashIn(vs ...string) predicate.Blocks { return predicate.Blocks(sql.FieldIn(FieldHash, vs...)) } // HashNotIn applies the NotIn predicate on the "hash" field. func HashNotIn(vs ...string) predicate.Blocks { return predicate.Blocks(sql.FieldNotIn(FieldHash, vs...)) } // HashGT applies the GT predicate on the "hash" field. func HashGT(v string) predicate.Blocks { return predicate.Blocks(sql.FieldGT(FieldHash, v)) } // HashGTE applies the GTE predicate on the "hash" field. func HashGTE(v string) predicate.Blocks { return predicate.Blocks(sql.FieldGTE(FieldHash, v)) } // HashLT applies the LT predicate on the "hash" field. func HashLT(v string) predicate.Blocks { return predicate.Blocks(sql.FieldLT(FieldHash, v)) } // HashLTE applies the LTE predicate on the "hash" field. func HashLTE(v string) predicate.Blocks { return predicate.Blocks(sql.FieldLTE(FieldHash, v)) } // HashContains applies the Contains predicate on the "hash" field. func HashContains(v string) predicate.Blocks { return predicate.Blocks(sql.FieldContains(FieldHash, v)) } // HashHasPrefix applies the HasPrefix predicate on the "hash" field. func HashHasPrefix(v string) predicate.Blocks { return predicate.Blocks(sql.FieldHasPrefix(FieldHash, v)) } // HashHasSuffix applies the HasSuffix predicate on the "hash" field. func HashHasSuffix(v string) predicate.Blocks { return predicate.Blocks(sql.FieldHasSuffix(FieldHash, v)) } // HashEqualFold applies the EqualFold predicate on the "hash" field. func HashEqualFold(v string) predicate.Blocks { return predicate.Blocks(sql.FieldEqualFold(FieldHash, v)) } // HashContainsFold applies the ContainsFold predicate on the "hash" field. func HashContainsFold(v string) predicate.Blocks { return predicate.Blocks(sql.FieldContainsFold(FieldHash, v)) } // LengthEQ applies the EQ predicate on the "length" field. func LengthEQ(v int) predicate.Blocks { return predicate.Blocks(sql.FieldEQ(FieldLength, v)) } // LengthNEQ applies the NEQ predicate on the "length" field. func LengthNEQ(v int) predicate.Blocks { return predicate.Blocks(sql.FieldNEQ(FieldLength, v)) } // LengthIn applies the In predicate on the "length" field. func LengthIn(vs ...int) predicate.Blocks { return predicate.Blocks(sql.FieldIn(FieldLength, vs...)) } // LengthNotIn applies the NotIn predicate on the "length" field. func LengthNotIn(vs ...int) predicate.Blocks { return predicate.Blocks(sql.FieldNotIn(FieldLength, vs...)) } // LengthGT applies the GT predicate on the "length" field. func LengthGT(v int) predicate.Blocks { return predicate.Blocks(sql.FieldGT(FieldLength, v)) } // LengthGTE applies the GTE predicate on the "length" field. func LengthGTE(v int) predicate.Blocks { return predicate.Blocks(sql.FieldGTE(FieldLength, v)) } // LengthLT applies the LT predicate on the "length" field. func LengthLT(v int) predicate.Blocks { return predicate.Blocks(sql.FieldLT(FieldLength, v)) } // LengthLTE applies the LTE predicate on the "length" field. func LengthLTE(v int) predicate.Blocks { return predicate.Blocks(sql.FieldLTE(FieldLength, v)) } // PreviousHashEQ applies the EQ predicate on the "previousHash" field. func PreviousHashEQ(v string) predicate.Blocks { return predicate.Blocks(sql.FieldEQ(FieldPreviousHash, v)) } // PreviousHashNEQ applies the NEQ predicate on the "previousHash" field. func PreviousHashNEQ(v string) predicate.Blocks { return predicate.Blocks(sql.FieldNEQ(FieldPreviousHash, v)) } // PreviousHashIn applies the In predicate on the "previousHash" field. func PreviousHashIn(vs ...string) predicate.Blocks { return predicate.Blocks(sql.FieldIn(FieldPreviousHash, vs...)) } // PreviousHashNotIn applies the NotIn predicate on the "previousHash" field. func PreviousHashNotIn(vs ...string) predicate.Blocks { return predicate.Blocks(sql.FieldNotIn(FieldPreviousHash, vs...)) } // PreviousHashGT applies the GT predicate on the "previousHash" field. func PreviousHashGT(v string) predicate.Blocks { return predicate.Blocks(sql.FieldGT(FieldPreviousHash, v)) } // PreviousHashGTE applies the GTE predicate on the "previousHash" field. func PreviousHashGTE(v string) predicate.Blocks { return predicate.Blocks(sql.FieldGTE(FieldPreviousHash, v)) } // PreviousHashLT applies the LT predicate on the "previousHash" field. func PreviousHashLT(v string) predicate.Blocks { return predicate.Blocks(sql.FieldLT(FieldPreviousHash, v)) } // PreviousHashLTE applies the LTE predicate on the "previousHash" field. func PreviousHashLTE(v string) predicate.Blocks { return predicate.Blocks(sql.FieldLTE(FieldPreviousHash, v)) } // PreviousHashContains applies the Contains predicate on the "previousHash" field. func PreviousHashContains(v string) predicate.Blocks { return predicate.Blocks(sql.FieldContains(FieldPreviousHash, v)) } // PreviousHashHasPrefix applies the HasPrefix predicate on the "previousHash" field. func PreviousHashHasPrefix(v string) predicate.Blocks { return predicate.Blocks(sql.FieldHasPrefix(FieldPreviousHash, v)) } // PreviousHashHasSuffix applies the HasSuffix predicate on the "previousHash" field. func PreviousHashHasSuffix(v string) predicate.Blocks { return predicate.Blocks(sql.FieldHasSuffix(FieldPreviousHash, v)) } // PreviousHashEqualFold applies the EqualFold predicate on the "previousHash" field. func PreviousHashEqualFold(v string) predicate.Blocks { return predicate.Blocks(sql.FieldEqualFold(FieldPreviousHash, v)) } // PreviousHashContainsFold applies the ContainsFold predicate on the "previousHash" field. func PreviousHashContainsFold(v string) predicate.Blocks { return predicate.Blocks(sql.FieldContainsFold(FieldPreviousHash, v)) } // HasCaster applies the HasEdge predicate on the "Caster" edge. func HasCaster() predicate.Blocks { return predicate.Blocks(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, CasterTable, CasterColumn), ) sqlgraph.HasNeighbors(s, step) }) } // HasCasterWith applies the HasEdge predicate on the "Caster" edge with a given conditions (other predicates). func HasCasterWith(preds ...predicate.Validators) predicate.Blocks { return predicate.Blocks(func(s *sql.Selector) { step := newCasterStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) } }) }) } // HasMinedTxs applies the HasEdge predicate on the "MinedTxs" edge. func HasMinedTxs() predicate.Blocks { return predicate.Blocks(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, MinedTxsTable, MinedTxsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) }) } // HasMinedTxsWith applies the HasEdge predicate on the "MinedTxs" edge with a given conditions (other predicates). func HasMinedTxsWith(preds ...predicate.Transactions) predicate.Blocks { return predicate.Blocks(func(s *sql.Selector) { step := newMinedTxsStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) } }) }) } // And groups predicates with the AND operator between them. func And(predicates ...predicate.Blocks) predicate.Blocks { return predicate.Blocks(sql.AndPredicates(predicates...)) } // Or groups predicates with the OR operator between them. func Or(predicates ...predicate.Blocks) predicate.Blocks { return predicate.Blocks(sql.OrPredicates(predicates...)) } // Not applies the not operator on the given predicate. func Not(p predicate.Blocks) predicate.Blocks { return predicate.Blocks(sql.NotPredicates(p)) }