snapshot of https://github.com/ent/ent.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
Atlas CI Public / lint (push) Failing after 13s
Atlas CI Public / sync (push) Has been skipped

This commit is contained in:
upstream-mirror
2026-09-15 22:12:36 +05:00
commit 4b3ad0b611
2680 changed files with 719472 additions and 0 deletions

View File

@@ -0,0 +1,122 @@
// Copyright 2019-present Facebook Inc. All rights reserved.
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.
// Code generated by ent, DO NOT EDIT.
package exvaluescan
import (
"math/big"
"net/url"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/schema/field"
)
const (
// Label holds the string label denoting the exvaluescan type in the database.
Label = "ex_value_scan"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldBinary holds the string denoting the binary field in the database.
FieldBinary = "binary"
// FieldBinaryBytes holds the string denoting the binary_bytes field in the database.
FieldBinaryBytes = "binary_bytes"
// FieldBinaryOptional holds the string denoting the binary_optional field in the database.
FieldBinaryOptional = "binary_optional"
// FieldText holds the string denoting the text field in the database.
FieldText = "text"
// FieldTextOptional holds the string denoting the text_optional field in the database.
FieldTextOptional = "text_optional"
// FieldBase64 holds the string denoting the base64 field in the database.
FieldBase64 = "base64"
// FieldCustom holds the string denoting the custom field in the database.
FieldCustom = "custom"
// FieldCustomOptional holds the string denoting the custom_optional field in the database.
FieldCustomOptional = "custom_optional"
// Table holds the table name of the exvaluescan in the database.
Table = "ex_value_scans"
)
// Columns holds all SQL columns for exvaluescan fields.
var Columns = []string{
FieldID,
FieldBinary,
FieldBinaryBytes,
FieldBinaryOptional,
FieldText,
FieldTextOptional,
FieldBase64,
FieldCustom,
FieldCustomOptional,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// ValueScanner of all ExValueScan fields.
ValueScanner struct {
Binary field.TypeValueScanner[*url.URL]
BinaryBytes field.TypeValueScanner[*url.URL]
BinaryOptional field.TypeValueScanner[*url.URL]
Text field.TypeValueScanner[*big.Int]
TextOptional field.TypeValueScanner[*big.Int]
Base64 field.TypeValueScanner[string]
Custom field.TypeValueScanner[string]
CustomOptional field.TypeValueScanner[string]
}
)
// OrderOption defines the ordering options for the ExValueScan queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByBinary orders the results by the binary field.
func ByBinary(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBinary, opts...).ToFunc()
}
// ByBinaryOptional orders the results by the binary_optional field.
func ByBinaryOptional(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBinaryOptional, opts...).ToFunc()
}
// ByText orders the results by the text field.
func ByText(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldText, opts...).ToFunc()
}
// ByTextOptional orders the results by the text_optional field.
func ByTextOptional(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTextOptional, opts...).ToFunc()
}
// ByBase64 orders the results by the base64 field.
func ByBase64(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBase64, opts...).ToFunc()
}
// ByCustom orders the results by the custom field.
func ByCustom(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCustom, opts...).ToFunc()
}
// ByCustomOptional orders the results by the custom_optional field.
func ByCustomOptional(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCustomOptional, opts...).ToFunc()
}
// comment from another template.

View File

@@ -0,0 +1,540 @@
// Copyright 2019-present Facebook Inc. All rights reserved.
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.
// Code generated by ent, DO NOT EDIT.
package exvaluescan
import (
"context"
"fmt"
"math/big"
"net/url"
"entgo.io/ent"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/entc/integration/ent/predicate"
)
// Mutation represents an operation that mutates the ExValueScan nodes in the graph.
type Mutation struct {
op ent.Op
typ string
binary **url.URL
binary_bytes **url.URL
binary_optional **url.URL
text **big.Int
text_optional **big.Int
base64 *string
custom *string
custom_optional *string
clearedFields map[string]struct{}
predicates []predicate.ExValueScan
}
// NewMutation creates a new Mutation for the ExValueScan entity.
func NewMutation(op ent.Op) *Mutation {
return &Mutation{
op: op,
typ: "ExValueScan",
clearedFields: make(map[string]struct{}),
}
}
// Predicates returns the list of predicates set on the mutation.
func (m *Mutation) Predicates() []predicate.ExValueScan {
return m.predicates
}
// SetBinary sets the "binary" field.
func (m *Mutation) SetBinary(u *url.URL) {
m.binary = &u
}
// Binary returns the value of the "binary" field in the mutation.
func (m *Mutation) Binary() (r *url.URL, exists bool) {
v := m.binary
if v == nil {
return
}
return *v, true
}
// ResetBinary resets all changes to the "binary" field.
func (m *Mutation) ResetBinary() {
m.binary = nil
}
// SetBinaryBytes sets the "binary_bytes" field.
func (m *Mutation) SetBinaryBytes(u *url.URL) {
m.binary_bytes = &u
}
// BinaryBytes returns the value of the "binary_bytes" field in the mutation.
func (m *Mutation) BinaryBytes() (r *url.URL, exists bool) {
v := m.binary_bytes
if v == nil {
return
}
return *v, true
}
// ResetBinaryBytes resets all changes to the "binary_bytes" field.
func (m *Mutation) ResetBinaryBytes() {
m.binary_bytes = nil
}
// SetBinaryOptional sets the "binary_optional" field.
func (m *Mutation) SetBinaryOptional(u *url.URL) {
m.binary_optional = &u
}
// BinaryOptional returns the value of the "binary_optional" field in the mutation.
func (m *Mutation) BinaryOptional() (r *url.URL, exists bool) {
v := m.binary_optional
if v == nil {
return
}
return *v, true
}
// ClearBinaryOptional clears the value of the "binary_optional" field.
func (m *Mutation) ClearBinaryOptional() {
m.binary_optional = nil
m.clearedFields[FieldBinaryOptional] = struct{}{}
}
// BinaryOptionalCleared returns if the "binary_optional" field was cleared in this mutation.
func (m *Mutation) BinaryOptionalCleared() bool {
_, ok := m.clearedFields[FieldBinaryOptional]
return ok
}
// ResetBinaryOptional resets all changes to the "binary_optional" field.
func (m *Mutation) ResetBinaryOptional() {
m.binary_optional = nil
delete(m.clearedFields, FieldBinaryOptional)
}
// SetText sets the "text" field.
func (m *Mutation) SetText(b *big.Int) {
m.text = &b
}
// Text returns the value of the "text" field in the mutation.
func (m *Mutation) Text() (r *big.Int, exists bool) {
v := m.text
if v == nil {
return
}
return *v, true
}
// ResetText resets all changes to the "text" field.
func (m *Mutation) ResetText() {
m.text = nil
}
// SetTextOptional sets the "text_optional" field.
func (m *Mutation) SetTextOptional(b *big.Int) {
m.text_optional = &b
}
// TextOptional returns the value of the "text_optional" field in the mutation.
func (m *Mutation) TextOptional() (r *big.Int, exists bool) {
v := m.text_optional
if v == nil {
return
}
return *v, true
}
// ClearTextOptional clears the value of the "text_optional" field.
func (m *Mutation) ClearTextOptional() {
m.text_optional = nil
m.clearedFields[FieldTextOptional] = struct{}{}
}
// TextOptionalCleared returns if the "text_optional" field was cleared in this mutation.
func (m *Mutation) TextOptionalCleared() bool {
_, ok := m.clearedFields[FieldTextOptional]
return ok
}
// ResetTextOptional resets all changes to the "text_optional" field.
func (m *Mutation) ResetTextOptional() {
m.text_optional = nil
delete(m.clearedFields, FieldTextOptional)
}
// SetBase64 sets the "base64" field.
func (m *Mutation) SetBase64(s string) {
m.base64 = &s
}
// Base64 returns the value of the "base64" field in the mutation.
func (m *Mutation) Base64() (r string, exists bool) {
v := m.base64
if v == nil {
return
}
return *v, true
}
// ResetBase64 resets all changes to the "base64" field.
func (m *Mutation) ResetBase64() {
m.base64 = nil
}
// SetCustom sets the "custom" field.
func (m *Mutation) SetCustom(s string) {
m.custom = &s
}
// Custom returns the value of the "custom" field in the mutation.
func (m *Mutation) Custom() (r string, exists bool) {
v := m.custom
if v == nil {
return
}
return *v, true
}
// ResetCustom resets all changes to the "custom" field.
func (m *Mutation) ResetCustom() {
m.custom = nil
}
// SetCustomOptional sets the "custom_optional" field.
func (m *Mutation) SetCustomOptional(s string) {
m.custom_optional = &s
}
// CustomOptional returns the value of the "custom_optional" field in the mutation.
func (m *Mutation) CustomOptional() (r string, exists bool) {
v := m.custom_optional
if v == nil {
return
}
return *v, true
}
// ClearCustomOptional clears the value of the "custom_optional" field.
func (m *Mutation) ClearCustomOptional() {
m.custom_optional = nil
m.clearedFields[FieldCustomOptional] = struct{}{}
}
// CustomOptionalCleared returns if the "custom_optional" field was cleared in this mutation.
func (m *Mutation) CustomOptionalCleared() bool {
_, ok := m.clearedFields[FieldCustomOptional]
return ok
}
// ResetCustomOptional resets all changes to the "custom_optional" field.
func (m *Mutation) ResetCustomOptional() {
m.custom_optional = nil
delete(m.clearedFields, FieldCustomOptional)
}
// Where appends a list predicates to the Mutation builder.
func (m *Mutation) Where(ps ...predicate.ExValueScan) {
m.predicates = append(m.predicates, ps...)
}
// WhereP appends storage-level predicates to the Mutation builder. Using this method,
// users can use type-assertion to append predicates that do not depend on any generated package.
func (m *Mutation) WhereP(ps ...func(*sql.Selector)) {
p := make([]predicate.ExValueScan, len(ps))
for i := range ps {
p[i] = ps[i]
}
m.Where(p...)
}
// Op returns the operation name.
func (m *Mutation) Op() ent.Op {
return m.op
}
// SetOp allows setting the mutation operation.
func (m *Mutation) SetOp(op ent.Op) {
m.op = op
}
// Type returns the node type of this mutation (ExValueScan).
func (m *Mutation) Type() string {
return m.typ
}
// Fields returns all fields that were changed during this mutation. Note that in
// order to get all numeric fields that were incremented/decremented, call
// AddedFields().
func (m *Mutation) Fields() []string {
fields := make([]string, 0, 8)
if m.binary != nil {
fields = append(fields, FieldBinary)
}
if m.binary_bytes != nil {
fields = append(fields, FieldBinaryBytes)
}
if m.binary_optional != nil {
fields = append(fields, FieldBinaryOptional)
}
if m.text != nil {
fields = append(fields, FieldText)
}
if m.text_optional != nil {
fields = append(fields, FieldTextOptional)
}
if m.base64 != nil {
fields = append(fields, FieldBase64)
}
if m.custom != nil {
fields = append(fields, FieldCustom)
}
if m.custom_optional != nil {
fields = append(fields, FieldCustomOptional)
}
return fields
}
// Field returns the value of a field with the given name. The second boolean
// return value indicates that this field was not set, or was not defined in the
// schema.
func (m *Mutation) Field(name string) (ent.Value, bool) {
switch name {
case FieldBinary:
return m.Binary()
case FieldBinaryBytes:
return m.BinaryBytes()
case FieldBinaryOptional:
return m.BinaryOptional()
case FieldText:
return m.Text()
case FieldTextOptional:
return m.TextOptional()
case FieldBase64:
return m.Base64()
case FieldCustom:
return m.Custom()
case FieldCustomOptional:
return m.CustomOptional()
}
return nil, false
}
// OldField returns the old value of the field from the database. An error is
// returned if the mutation operation is not UpdateOne, or the query to the
// database failed.
func (m *Mutation) OldField(ctx context.Context, name string) (ent.Value, error) {
return nil, fmt.Errorf("unknown ExValueScan field %s", name)
}
// SetField sets the value of a field with the given name. It returns an error if
// the field is not defined in the schema, or if the type mismatched the field
// type.
func (m *Mutation) SetField(name string, value ent.Value) error {
switch name {
case FieldBinary:
v, ok := value.(*url.URL)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetBinary(v)
return nil
case FieldBinaryBytes:
v, ok := value.(*url.URL)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetBinaryBytes(v)
return nil
case FieldBinaryOptional:
v, ok := value.(*url.URL)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetBinaryOptional(v)
return nil
case FieldText:
v, ok := value.(*big.Int)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetText(v)
return nil
case FieldTextOptional:
v, ok := value.(*big.Int)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetTextOptional(v)
return nil
case FieldBase64:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetBase64(v)
return nil
case FieldCustom:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetCustom(v)
return nil
case FieldCustomOptional:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetCustomOptional(v)
return nil
}
return fmt.Errorf("unknown ExValueScan field %s", name)
}
// AddedFields returns all numeric fields that were incremented/decremented during
// this mutation.
func (m *Mutation) AddedFields() []string {
return nil
}
// AddedField returns the numeric value that was incremented/decremented on a field
// with the given name. The second boolean return value indicates that this field
// was not set, or was not defined in the schema.
func (m *Mutation) AddedField(name string) (ent.Value, bool) {
return nil, false
}
// AddField adds the value to the field with the given name. It returns an error if
// the field is not defined in the schema, or if the type mismatched the field
// type.
func (m *Mutation) AddField(name string, value ent.Value) error {
switch name {
}
return fmt.Errorf("unknown ExValueScan numeric field %s", name)
}
// ClearedFields returns all nullable fields that were cleared during this
// mutation.
func (m *Mutation) ClearedFields() []string {
var fields []string
if m.FieldCleared(FieldBinaryOptional) {
fields = append(fields, FieldBinaryOptional)
}
if m.FieldCleared(FieldTextOptional) {
fields = append(fields, FieldTextOptional)
}
if m.FieldCleared(FieldCustomOptional) {
fields = append(fields, FieldCustomOptional)
}
return fields
}
// FieldCleared returns a boolean indicating if a field with the given name was
// cleared in this mutation.
func (m *Mutation) FieldCleared(name string) bool {
_, ok := m.clearedFields[name]
return ok
}
// ClearField clears the value of the field with the given name. It returns an
// error if the field is not defined in the schema.
func (m *Mutation) ClearField(name string) error {
switch name {
case FieldBinaryOptional:
m.ClearBinaryOptional()
return nil
case FieldTextOptional:
m.ClearTextOptional()
return nil
case FieldCustomOptional:
m.ClearCustomOptional()
return nil
}
return fmt.Errorf("unknown ExValueScan nullable field %s", name)
}
// ResetField resets all changes in the mutation for the field with the given name.
// It returns an error if the field is not defined in the schema.
func (m *Mutation) ResetField(name string) error {
switch name {
case FieldBinary:
m.ResetBinary()
return nil
case FieldBinaryBytes:
m.ResetBinaryBytes()
return nil
case FieldBinaryOptional:
m.ResetBinaryOptional()
return nil
case FieldText:
m.ResetText()
return nil
case FieldTextOptional:
m.ResetTextOptional()
return nil
case FieldBase64:
m.ResetBase64()
return nil
case FieldCustom:
m.ResetCustom()
return nil
case FieldCustomOptional:
m.ResetCustomOptional()
return nil
}
return fmt.Errorf("unknown ExValueScan field %s", name)
}
// AddedEdges returns all edge names that were set/added in this mutation.
func (m *Mutation) AddedEdges() []string {
edges := make([]string, 0, 0)
return edges
}
// AddedIDs returns all IDs (to other nodes) that were added for the given edge
// name in this mutation.
func (m *Mutation) AddedIDs(name string) []ent.Value {
return nil
}
// RemovedEdges returns all edge names that were removed in this mutation.
func (m *Mutation) RemovedEdges() []string {
edges := make([]string, 0, 0)
return edges
}
// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with
// the given name in this mutation.
func (m *Mutation) RemovedIDs(name string) []ent.Value {
return nil
}
// ClearedEdges returns all edge names that were cleared in this mutation.
func (m *Mutation) ClearedEdges() []string {
edges := make([]string, 0, 0)
return edges
}
// EdgeCleared returns a boolean which indicates if the edge with the given name
// was cleared in this mutation.
func (m *Mutation) EdgeCleared(name string) bool {
return false
}
// ClearEdge clears the value of the edge with the given name. It returns an error
// if that edge is not defined in the schema.
func (m *Mutation) ClearEdge(name string) error {
return fmt.Errorf("unknown ExValueScan unique edge %s", name)
}
// ResetEdge resets all changes to the edge with the given name in this mutation.
// It returns an error if the edge is not defined in the schema.
func (m *Mutation) ResetEdge(name string) error {
return fmt.Errorf("unknown ExValueScan edge %s", name)
}

View File

@@ -0,0 +1,946 @@
// Copyright 2019-present Facebook Inc. All rights reserved.
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.
// Code generated by ent, DO NOT EDIT.
package exvaluescan
import (
"fmt"
"math/big"
"net/url"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/entc/integration/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldLTE(FieldID, id))
}
// Binary applies equality check predicate on the "binary" field. It's identical to BinaryEQ.
func Binary(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldBinary, vc), err)
}
// BinaryOptional applies equality check predicate on the "binary_optional" field. It's identical to BinaryOptionalEQ.
func BinaryOptional(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldBinaryOptional, vc), err)
}
// Text applies equality check predicate on the "text" field. It's identical to TextEQ.
func Text(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldText, vc), err)
}
// TextOptional applies equality check predicate on the "text_optional" field. It's identical to TextOptionalEQ.
func TextOptional(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldTextOptional, vc), err)
}
// Base64 applies equality check predicate on the "base64" field. It's identical to Base64EQ.
func Base64(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldBase64, vc), err)
}
// Custom applies equality check predicate on the "custom" field. It's identical to CustomEQ.
func Custom(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldCustom, vc), err)
}
// CustomOptional applies equality check predicate on the "custom_optional" field. It's identical to CustomOptionalEQ.
func CustomOptional(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldCustomOptional, vc), err)
}
// BinaryEQ applies the EQ predicate on the "binary" field.
func BinaryEQ(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldBinary, vc), err)
}
// BinaryNEQ applies the NEQ predicate on the "binary" field.
func BinaryNEQ(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
return predicate.ExValueScanOrErr(sql.FieldNEQ(FieldBinary, vc), err)
}
// BinaryIn applies the In predicate on the "binary" field.
func BinaryIn(vs ...*url.URL) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.Binary.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldIn(FieldBinary, v...), err)
}
// BinaryNotIn applies the NotIn predicate on the "binary" field.
func BinaryNotIn(vs ...*url.URL) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.Binary.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldNotIn(FieldBinary, v...), err)
}
// BinaryGT applies the GT predicate on the "binary" field.
func BinaryGT(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGT(FieldBinary, vc), err)
}
// BinaryGTE applies the GTE predicate on the "binary" field.
func BinaryGTE(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGTE(FieldBinary, vc), err)
}
// BinaryLT applies the LT predicate on the "binary" field.
func BinaryLT(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLT(FieldBinary, vc), err)
}
// BinaryLTE applies the LTE predicate on the "binary" field.
func BinaryLTE(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLTE(FieldBinary, vc), err)
}
// BinaryContains applies the Contains predicate on the "binary" field.
func BinaryContains(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContains(FieldBinary, vcs), err)
}
// BinaryHasPrefix applies the HasPrefix predicate on the "binary" field.
func BinaryHasPrefix(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasPrefix(FieldBinary, vcs), err)
}
// BinaryHasSuffix applies the HasSuffix predicate on the "binary" field.
func BinaryHasSuffix(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasSuffix(FieldBinary, vcs), err)
}
// BinaryEqualFold applies the EqualFold predicate on the "binary" field.
func BinaryEqualFold(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldEqualFold(FieldBinary, vcs), err)
}
// BinaryContainsFold applies the ContainsFold predicate on the "binary" field.
func BinaryContainsFold(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.Binary.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContainsFold(FieldBinary, vcs), err)
}
// BinaryOptionalEQ applies the EQ predicate on the "binary_optional" field.
func BinaryOptionalEQ(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldBinaryOptional, vc), err)
}
// BinaryOptionalNEQ applies the NEQ predicate on the "binary_optional" field.
func BinaryOptionalNEQ(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldNEQ(FieldBinaryOptional, vc), err)
}
// BinaryOptionalIn applies the In predicate on the "binary_optional" field.
func BinaryOptionalIn(vs ...*url.URL) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.BinaryOptional.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldIn(FieldBinaryOptional, v...), err)
}
// BinaryOptionalNotIn applies the NotIn predicate on the "binary_optional" field.
func BinaryOptionalNotIn(vs ...*url.URL) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.BinaryOptional.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldNotIn(FieldBinaryOptional, v...), err)
}
// BinaryOptionalGT applies the GT predicate on the "binary_optional" field.
func BinaryOptionalGT(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGT(FieldBinaryOptional, vc), err)
}
// BinaryOptionalGTE applies the GTE predicate on the "binary_optional" field.
func BinaryOptionalGTE(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGTE(FieldBinaryOptional, vc), err)
}
// BinaryOptionalLT applies the LT predicate on the "binary_optional" field.
func BinaryOptionalLT(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLT(FieldBinaryOptional, vc), err)
}
// BinaryOptionalLTE applies the LTE predicate on the "binary_optional" field.
func BinaryOptionalLTE(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLTE(FieldBinaryOptional, vc), err)
}
// BinaryOptionalContains applies the Contains predicate on the "binary_optional" field.
func BinaryOptionalContains(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContains(FieldBinaryOptional, vcs), err)
}
// BinaryOptionalHasPrefix applies the HasPrefix predicate on the "binary_optional" field.
func BinaryOptionalHasPrefix(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasPrefix(FieldBinaryOptional, vcs), err)
}
// BinaryOptionalHasSuffix applies the HasSuffix predicate on the "binary_optional" field.
func BinaryOptionalHasSuffix(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasSuffix(FieldBinaryOptional, vcs), err)
}
// BinaryOptionalIsNil applies the IsNil predicate on the "binary_optional" field.
func BinaryOptionalIsNil() predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldIsNull(FieldBinaryOptional))
}
// BinaryOptionalNotNil applies the NotNil predicate on the "binary_optional" field.
func BinaryOptionalNotNil() predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldNotNull(FieldBinaryOptional))
}
// BinaryOptionalEqualFold applies the EqualFold predicate on the "binary_optional" field.
func BinaryOptionalEqualFold(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldEqualFold(FieldBinaryOptional, vcs), err)
}
// BinaryOptionalContainsFold applies the ContainsFold predicate on the "binary_optional" field.
func BinaryOptionalContainsFold(v *url.URL) predicate.ExValueScan {
vc, err := ValueScanner.BinaryOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("binary_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContainsFold(FieldBinaryOptional, vcs), err)
}
// TextEQ applies the EQ predicate on the "text" field.
func TextEQ(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldText, vc), err)
}
// TextNEQ applies the NEQ predicate on the "text" field.
func TextNEQ(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
return predicate.ExValueScanOrErr(sql.FieldNEQ(FieldText, vc), err)
}
// TextIn applies the In predicate on the "text" field.
func TextIn(vs ...*big.Int) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.Text.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldIn(FieldText, v...), err)
}
// TextNotIn applies the NotIn predicate on the "text" field.
func TextNotIn(vs ...*big.Int) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.Text.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldNotIn(FieldText, v...), err)
}
// TextGT applies the GT predicate on the "text" field.
func TextGT(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGT(FieldText, vc), err)
}
// TextGTE applies the GTE predicate on the "text" field.
func TextGTE(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGTE(FieldText, vc), err)
}
// TextLT applies the LT predicate on the "text" field.
func TextLT(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLT(FieldText, vc), err)
}
// TextLTE applies the LTE predicate on the "text" field.
func TextLTE(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLTE(FieldText, vc), err)
}
// TextContains applies the Contains predicate on the "text" field.
func TextContains(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContains(FieldText, vcs), err)
}
// TextHasPrefix applies the HasPrefix predicate on the "text" field.
func TextHasPrefix(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasPrefix(FieldText, vcs), err)
}
// TextHasSuffix applies the HasSuffix predicate on the "text" field.
func TextHasSuffix(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasSuffix(FieldText, vcs), err)
}
// TextEqualFold applies the EqualFold predicate on the "text" field.
func TextEqualFold(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldEqualFold(FieldText, vcs), err)
}
// TextContainsFold applies the ContainsFold predicate on the "text" field.
func TextContainsFold(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.Text.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContainsFold(FieldText, vcs), err)
}
// TextOptionalEQ applies the EQ predicate on the "text_optional" field.
func TextOptionalEQ(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldTextOptional, vc), err)
}
// TextOptionalNEQ applies the NEQ predicate on the "text_optional" field.
func TextOptionalNEQ(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldNEQ(FieldTextOptional, vc), err)
}
// TextOptionalIn applies the In predicate on the "text_optional" field.
func TextOptionalIn(vs ...*big.Int) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.TextOptional.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldIn(FieldTextOptional, v...), err)
}
// TextOptionalNotIn applies the NotIn predicate on the "text_optional" field.
func TextOptionalNotIn(vs ...*big.Int) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.TextOptional.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldNotIn(FieldTextOptional, v...), err)
}
// TextOptionalGT applies the GT predicate on the "text_optional" field.
func TextOptionalGT(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGT(FieldTextOptional, vc), err)
}
// TextOptionalGTE applies the GTE predicate on the "text_optional" field.
func TextOptionalGTE(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGTE(FieldTextOptional, vc), err)
}
// TextOptionalLT applies the LT predicate on the "text_optional" field.
func TextOptionalLT(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLT(FieldTextOptional, vc), err)
}
// TextOptionalLTE applies the LTE predicate on the "text_optional" field.
func TextOptionalLTE(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLTE(FieldTextOptional, vc), err)
}
// TextOptionalContains applies the Contains predicate on the "text_optional" field.
func TextOptionalContains(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContains(FieldTextOptional, vcs), err)
}
// TextOptionalHasPrefix applies the HasPrefix predicate on the "text_optional" field.
func TextOptionalHasPrefix(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasPrefix(FieldTextOptional, vcs), err)
}
// TextOptionalHasSuffix applies the HasSuffix predicate on the "text_optional" field.
func TextOptionalHasSuffix(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasSuffix(FieldTextOptional, vcs), err)
}
// TextOptionalIsNil applies the IsNil predicate on the "text_optional" field.
func TextOptionalIsNil() predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldIsNull(FieldTextOptional))
}
// TextOptionalNotNil applies the NotNil predicate on the "text_optional" field.
func TextOptionalNotNil() predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldNotNull(FieldTextOptional))
}
// TextOptionalEqualFold applies the EqualFold predicate on the "text_optional" field.
func TextOptionalEqualFold(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldEqualFold(FieldTextOptional, vcs), err)
}
// TextOptionalContainsFold applies the ContainsFold predicate on the "text_optional" field.
func TextOptionalContainsFold(v *big.Int) predicate.ExValueScan {
vc, err := ValueScanner.TextOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("text_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContainsFold(FieldTextOptional, vcs), err)
}
// Base64EQ applies the EQ predicate on the "base64" field.
func Base64EQ(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldBase64, vc), err)
}
// Base64NEQ applies the NEQ predicate on the "base64" field.
func Base64NEQ(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
return predicate.ExValueScanOrErr(sql.FieldNEQ(FieldBase64, vc), err)
}
// Base64In applies the In predicate on the "base64" field.
func Base64In(vs ...string) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.Base64.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldIn(FieldBase64, v...), err)
}
// Base64NotIn applies the NotIn predicate on the "base64" field.
func Base64NotIn(vs ...string) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.Base64.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldNotIn(FieldBase64, v...), err)
}
// Base64GT applies the GT predicate on the "base64" field.
func Base64GT(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGT(FieldBase64, vc), err)
}
// Base64GTE applies the GTE predicate on the "base64" field.
func Base64GTE(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGTE(FieldBase64, vc), err)
}
// Base64LT applies the LT predicate on the "base64" field.
func Base64LT(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLT(FieldBase64, vc), err)
}
// Base64LTE applies the LTE predicate on the "base64" field.
func Base64LTE(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLTE(FieldBase64, vc), err)
}
// Base64Contains applies the Contains predicate on the "base64" field.
func Base64Contains(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("base64 value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContains(FieldBase64, vcs), err)
}
// Base64HasPrefix applies the HasPrefix predicate on the "base64" field.
func Base64HasPrefix(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("base64 value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasPrefix(FieldBase64, vcs), err)
}
// Base64HasSuffix applies the HasSuffix predicate on the "base64" field.
func Base64HasSuffix(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("base64 value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasSuffix(FieldBase64, vcs), err)
}
// Base64EqualFold applies the EqualFold predicate on the "base64" field.
func Base64EqualFold(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("base64 value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldEqualFold(FieldBase64, vcs), err)
}
// Base64ContainsFold applies the ContainsFold predicate on the "base64" field.
func Base64ContainsFold(v string) predicate.ExValueScan {
vc, err := ValueScanner.Base64.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("base64 value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContainsFold(FieldBase64, vcs), err)
}
// CustomEQ applies the EQ predicate on the "custom" field.
func CustomEQ(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldCustom, vc), err)
}
// CustomNEQ applies the NEQ predicate on the "custom" field.
func CustomNEQ(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
return predicate.ExValueScanOrErr(sql.FieldNEQ(FieldCustom, vc), err)
}
// CustomIn applies the In predicate on the "custom" field.
func CustomIn(vs ...string) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.Custom.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldIn(FieldCustom, v...), err)
}
// CustomNotIn applies the NotIn predicate on the "custom" field.
func CustomNotIn(vs ...string) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.Custom.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldNotIn(FieldCustom, v...), err)
}
// CustomGT applies the GT predicate on the "custom" field.
func CustomGT(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGT(FieldCustom, vc), err)
}
// CustomGTE applies the GTE predicate on the "custom" field.
func CustomGTE(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGTE(FieldCustom, vc), err)
}
// CustomLT applies the LT predicate on the "custom" field.
func CustomLT(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLT(FieldCustom, vc), err)
}
// CustomLTE applies the LTE predicate on the "custom" field.
func CustomLTE(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLTE(FieldCustom, vc), err)
}
// CustomContains applies the Contains predicate on the "custom" field.
func CustomContains(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContains(FieldCustom, vcs), err)
}
// CustomHasPrefix applies the HasPrefix predicate on the "custom" field.
func CustomHasPrefix(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasPrefix(FieldCustom, vcs), err)
}
// CustomHasSuffix applies the HasSuffix predicate on the "custom" field.
func CustomHasSuffix(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasSuffix(FieldCustom, vcs), err)
}
// CustomEqualFold applies the EqualFold predicate on the "custom" field.
func CustomEqualFold(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldEqualFold(FieldCustom, vcs), err)
}
// CustomContainsFold applies the ContainsFold predicate on the "custom" field.
func CustomContainsFold(v string) predicate.ExValueScan {
vc, err := ValueScanner.Custom.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContainsFold(FieldCustom, vcs), err)
}
// CustomOptionalEQ applies the EQ predicate on the "custom_optional" field.
func CustomOptionalEQ(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldEQ(FieldCustomOptional, vc), err)
}
// CustomOptionalNEQ applies the NEQ predicate on the "custom_optional" field.
func CustomOptionalNEQ(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldNEQ(FieldCustomOptional, vc), err)
}
// CustomOptionalIn applies the In predicate on the "custom_optional" field.
func CustomOptionalIn(vs ...string) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.CustomOptional.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldIn(FieldCustomOptional, v...), err)
}
// CustomOptionalNotIn applies the NotIn predicate on the "custom_optional" field.
func CustomOptionalNotIn(vs ...string) predicate.ExValueScan {
var (
err error
v = make([]any, len(vs))
)
for i := range v {
if v[i], err = ValueScanner.CustomOptional.Value(vs[i]); err != nil {
break
}
}
return predicate.ExValueScanOrErr(sql.FieldNotIn(FieldCustomOptional, v...), err)
}
// CustomOptionalGT applies the GT predicate on the "custom_optional" field.
func CustomOptionalGT(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGT(FieldCustomOptional, vc), err)
}
// CustomOptionalGTE applies the GTE predicate on the "custom_optional" field.
func CustomOptionalGTE(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldGTE(FieldCustomOptional, vc), err)
}
// CustomOptionalLT applies the LT predicate on the "custom_optional" field.
func CustomOptionalLT(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLT(FieldCustomOptional, vc), err)
}
// CustomOptionalLTE applies the LTE predicate on the "custom_optional" field.
func CustomOptionalLTE(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
return predicate.ExValueScanOrErr(sql.FieldLTE(FieldCustomOptional, vc), err)
}
// CustomOptionalContains applies the Contains predicate on the "custom_optional" field.
func CustomOptionalContains(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContains(FieldCustomOptional, vcs), err)
}
// CustomOptionalHasPrefix applies the HasPrefix predicate on the "custom_optional" field.
func CustomOptionalHasPrefix(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasPrefix(FieldCustomOptional, vcs), err)
}
// CustomOptionalHasSuffix applies the HasSuffix predicate on the "custom_optional" field.
func CustomOptionalHasSuffix(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldHasSuffix(FieldCustomOptional, vcs), err)
}
// CustomOptionalIsNil applies the IsNil predicate on the "custom_optional" field.
func CustomOptionalIsNil() predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldIsNull(FieldCustomOptional))
}
// CustomOptionalNotNil applies the NotNil predicate on the "custom_optional" field.
func CustomOptionalNotNil() predicate.ExValueScan {
return predicate.ExValueScan(sql.FieldNotNull(FieldCustomOptional))
}
// CustomOptionalEqualFold applies the EqualFold predicate on the "custom_optional" field.
func CustomOptionalEqualFold(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldEqualFold(FieldCustomOptional, vcs), err)
}
// CustomOptionalContainsFold applies the ContainsFold predicate on the "custom_optional" field.
func CustomOptionalContainsFold(v string) predicate.ExValueScan {
vc, err := ValueScanner.CustomOptional.Value(v)
vcs, ok := vc.(string)
if err == nil && !ok {
err = fmt.Errorf("custom_optional value is not a string: %T", vc)
}
return predicate.ExValueScanOrErr(sql.FieldContainsFold(FieldCustomOptional, vcs), err)
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.ExValueScan) predicate.ExValueScan {
return predicate.ExValueScan(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.ExValueScan) predicate.ExValueScan {
return predicate.ExValueScan(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.ExValueScan) predicate.ExValueScan {
return predicate.ExValueScan(sql.NotPredicates(p))
}