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,88 @@
// 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 comment
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the comment type in the database.
Label = "comment"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldUniqueInt holds the string denoting the unique_int field in the database.
FieldUniqueInt = "unique_int"
// FieldUniqueFloat holds the string denoting the unique_float field in the database.
FieldUniqueFloat = "unique_float"
// FieldNillableInt holds the string denoting the nillable_int field in the database.
FieldNillableInt = "nillable_int"
// FieldTable holds the string denoting the table field in the database.
FieldTable = "table"
// FieldDir holds the string denoting the dir field in the database.
FieldDir = "dir"
// FieldClient holds the string denoting the client field in the database.
FieldClient = "client"
// Table holds the table name of the comment in the database.
Table = "comments"
)
// Columns holds all SQL columns for comment fields.
var Columns = []string{
FieldID,
FieldUniqueInt,
FieldUniqueFloat,
FieldNillableInt,
FieldTable,
FieldDir,
FieldClient,
}
// 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
}
// OrderOption defines the ordering options for the Comment 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()
}
// ByUniqueInt orders the results by the unique_int field.
func ByUniqueInt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUniqueInt, opts...).ToFunc()
}
// ByUniqueFloat orders the results by the unique_float field.
func ByUniqueFloat(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUniqueFloat, opts...).ToFunc()
}
// ByNillableInt orders the results by the nillable_int field.
func ByNillableInt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNillableInt, opts...).ToFunc()
}
// ByTable orders the results by the table field.
func ByTable(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTable, opts...).ToFunc()
}
// ByClient orders the results by the client field.
func ByClient(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClient, opts...).ToFunc()
}
// comment from another template.

View File

@@ -0,0 +1,591 @@
// 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 comment
import (
"context"
"fmt"
"entgo.io/ent"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/entc/integration/ent/predicate"
schemadir "entgo.io/ent/entc/integration/ent/schema/dir"
)
// Mutation represents an operation that mutates the Comment nodes in the graph.
type Mutation struct {
op ent.Op
typ string
unique_int *int
addunique_int *int
unique_float *float64
addunique_float *float64
nillable_int *int
addnillable_int *int
table *string
dir *schemadir.Dir
client *string
clearedFields map[string]struct{}
predicates []predicate.Comment
}
// NewMutation creates a new Mutation for the Comment entity.
func NewMutation(op ent.Op) *Mutation {
return &Mutation{
op: op,
typ: "Comment",
clearedFields: make(map[string]struct{}),
}
}
// Predicates returns the list of predicates set on the mutation.
func (m *Mutation) Predicates() []predicate.Comment {
return m.predicates
}
// SetUniqueInt sets the "unique_int" field.
func (m *Mutation) SetUniqueInt(i int) {
m.unique_int = &i
m.addunique_int = nil
}
// UniqueInt returns the value of the "unique_int" field in the mutation.
func (m *Mutation) UniqueInt() (r int, exists bool) {
v := m.unique_int
if v == nil {
return
}
return *v, true
}
// AddUniqueInt adds i to the "unique_int" field.
func (m *Mutation) AddUniqueInt(i int) {
if m.addunique_int != nil {
*m.addunique_int += i
} else {
m.addunique_int = &i
}
}
// AddedUniqueInt returns the value that was added to the "unique_int" field in this mutation.
func (m *Mutation) AddedUniqueInt() (r int, exists bool) {
v := m.addunique_int
if v == nil {
return
}
return *v, true
}
// ResetUniqueInt resets all changes to the "unique_int" field.
func (m *Mutation) ResetUniqueInt() {
m.unique_int = nil
m.addunique_int = nil
}
// SetUniqueFloat sets the "unique_float" field.
func (m *Mutation) SetUniqueFloat(f float64) {
m.unique_float = &f
m.addunique_float = nil
}
// UniqueFloat returns the value of the "unique_float" field in the mutation.
func (m *Mutation) UniqueFloat() (r float64, exists bool) {
v := m.unique_float
if v == nil {
return
}
return *v, true
}
// AddUniqueFloat adds f to the "unique_float" field.
func (m *Mutation) AddUniqueFloat(f float64) {
if m.addunique_float != nil {
*m.addunique_float += f
} else {
m.addunique_float = &f
}
}
// AddedUniqueFloat returns the value that was added to the "unique_float" field in this mutation.
func (m *Mutation) AddedUniqueFloat() (r float64, exists bool) {
v := m.addunique_float
if v == nil {
return
}
return *v, true
}
// ResetUniqueFloat resets all changes to the "unique_float" field.
func (m *Mutation) ResetUniqueFloat() {
m.unique_float = nil
m.addunique_float = nil
}
// SetNillableInt sets the "nillable_int" field.
func (m *Mutation) SetNillableInt(i int) {
m.nillable_int = &i
m.addnillable_int = nil
}
// NillableInt returns the value of the "nillable_int" field in the mutation.
func (m *Mutation) NillableInt() (r int, exists bool) {
v := m.nillable_int
if v == nil {
return
}
return *v, true
}
// AddNillableInt adds i to the "nillable_int" field.
func (m *Mutation) AddNillableInt(i int) {
if m.addnillable_int != nil {
*m.addnillable_int += i
} else {
m.addnillable_int = &i
}
}
// AddedNillableInt returns the value that was added to the "nillable_int" field in this mutation.
func (m *Mutation) AddedNillableInt() (r int, exists bool) {
v := m.addnillable_int
if v == nil {
return
}
return *v, true
}
// ClearNillableInt clears the value of the "nillable_int" field.
func (m *Mutation) ClearNillableInt() {
m.nillable_int = nil
m.addnillable_int = nil
m.clearedFields[FieldNillableInt] = struct{}{}
}
// NillableIntCleared returns if the "nillable_int" field was cleared in this mutation.
func (m *Mutation) NillableIntCleared() bool {
_, ok := m.clearedFields[FieldNillableInt]
return ok
}
// ResetNillableInt resets all changes to the "nillable_int" field.
func (m *Mutation) ResetNillableInt() {
m.nillable_int = nil
m.addnillable_int = nil
delete(m.clearedFields, FieldNillableInt)
}
// SetTable sets the "table" field.
func (m *Mutation) SetTable(s string) {
m.table = &s
}
// Table returns the value of the "table" field in the mutation.
func (m *Mutation) Table() (r string, exists bool) {
v := m.table
if v == nil {
return
}
return *v, true
}
// ClearTable clears the value of the "table" field.
func (m *Mutation) ClearTable() {
m.table = nil
m.clearedFields[FieldTable] = struct{}{}
}
// TableCleared returns if the "table" field was cleared in this mutation.
func (m *Mutation) TableCleared() bool {
_, ok := m.clearedFields[FieldTable]
return ok
}
// ResetTable resets all changes to the "table" field.
func (m *Mutation) ResetTable() {
m.table = nil
delete(m.clearedFields, FieldTable)
}
// SetDir sets the "dir" field.
func (m *Mutation) SetDir(s schemadir.Dir) {
m.dir = &s
}
// Dir returns the value of the "dir" field in the mutation.
func (m *Mutation) Dir() (r schemadir.Dir, exists bool) {
v := m.dir
if v == nil {
return
}
return *v, true
}
// ClearDir clears the value of the "dir" field.
func (m *Mutation) ClearDir() {
m.dir = nil
m.clearedFields[FieldDir] = struct{}{}
}
// DirCleared returns if the "dir" field was cleared in this mutation.
func (m *Mutation) DirCleared() bool {
_, ok := m.clearedFields[FieldDir]
return ok
}
// ResetDir resets all changes to the "dir" field.
func (m *Mutation) ResetDir() {
m.dir = nil
delete(m.clearedFields, FieldDir)
}
// SetClient sets the "client" field.
func (m *Mutation) SetClient(s string) {
m.client = &s
}
// GetClient returns the value of the "client" field in the mutation.
func (m *Mutation) GetClient() (r string, exists bool) {
v := m.client
if v == nil {
return
}
return *v, true
}
// ClearClient clears the value of the "client" field.
func (m *Mutation) ClearClient() {
m.client = nil
m.clearedFields[FieldClient] = struct{}{}
}
// ClientCleared returns if the "client" field was cleared in this mutation.
func (m *Mutation) ClientCleared() bool {
_, ok := m.clearedFields[FieldClient]
return ok
}
// ResetClient resets all changes to the "client" field.
func (m *Mutation) ResetClient() {
m.client = nil
delete(m.clearedFields, FieldClient)
}
// Where appends a list predicates to the Mutation builder.
func (m *Mutation) Where(ps ...predicate.Comment) {
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.Comment, 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 (Comment).
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, 6)
if m.unique_int != nil {
fields = append(fields, FieldUniqueInt)
}
if m.unique_float != nil {
fields = append(fields, FieldUniqueFloat)
}
if m.nillable_int != nil {
fields = append(fields, FieldNillableInt)
}
if m.table != nil {
fields = append(fields, FieldTable)
}
if m.dir != nil {
fields = append(fields, FieldDir)
}
if m.client != nil {
fields = append(fields, FieldClient)
}
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 FieldUniqueInt:
return m.UniqueInt()
case FieldUniqueFloat:
return m.UniqueFloat()
case FieldNillableInt:
return m.NillableInt()
case FieldTable:
return m.Table()
case FieldDir:
return m.Dir()
case FieldClient:
return m.GetClient()
}
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 Comment 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 FieldUniqueInt:
v, ok := value.(int)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetUniqueInt(v)
return nil
case FieldUniqueFloat:
v, ok := value.(float64)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetUniqueFloat(v)
return nil
case FieldNillableInt:
v, ok := value.(int)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetNillableInt(v)
return nil
case FieldTable:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetTable(v)
return nil
case FieldDir:
v, ok := value.(schemadir.Dir)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetDir(v)
return nil
case FieldClient:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetClient(v)
return nil
}
return fmt.Errorf("unknown Comment field %s", name)
}
// AddedFields returns all numeric fields that were incremented/decremented during
// this mutation.
func (m *Mutation) AddedFields() []string {
var fields []string
if m.addunique_int != nil {
fields = append(fields, FieldUniqueInt)
}
if m.addunique_float != nil {
fields = append(fields, FieldUniqueFloat)
}
if m.addnillable_int != nil {
fields = append(fields, FieldNillableInt)
}
return fields
}
// 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) {
switch name {
case FieldUniqueInt:
return m.AddedUniqueInt()
case FieldUniqueFloat:
return m.AddedUniqueFloat()
case FieldNillableInt:
return m.AddedNillableInt()
}
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 {
case FieldUniqueInt:
v, ok := value.(int)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.AddUniqueInt(v)
return nil
case FieldUniqueFloat:
v, ok := value.(float64)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.AddUniqueFloat(v)
return nil
case FieldNillableInt:
v, ok := value.(int)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.AddNillableInt(v)
return nil
}
return fmt.Errorf("unknown Comment 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(FieldNillableInt) {
fields = append(fields, FieldNillableInt)
}
if m.FieldCleared(FieldTable) {
fields = append(fields, FieldTable)
}
if m.FieldCleared(FieldDir) {
fields = append(fields, FieldDir)
}
if m.FieldCleared(FieldClient) {
fields = append(fields, FieldClient)
}
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 FieldNillableInt:
m.ClearNillableInt()
return nil
case FieldTable:
m.ClearTable()
return nil
case FieldDir:
m.ClearDir()
return nil
case FieldClient:
m.ClearClient()
return nil
}
return fmt.Errorf("unknown Comment 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 FieldUniqueInt:
m.ResetUniqueInt()
return nil
case FieldUniqueFloat:
m.ResetUniqueFloat()
return nil
case FieldNillableInt:
m.ResetNillableInt()
return nil
case FieldTable:
m.ResetTable()
return nil
case FieldDir:
m.ResetDir()
return nil
case FieldClient:
m.ResetClient()
return nil
}
return fmt.Errorf("unknown Comment 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 Comment 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 Comment edge %s", name)
}

View File

@@ -0,0 +1,382 @@
// 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 comment
import (
"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.Comment {
return predicate.Comment(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.Comment {
return predicate.Comment(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.Comment {
return predicate.Comment(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.Comment {
return predicate.Comment(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.Comment {
return predicate.Comment(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.Comment {
return predicate.Comment(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.Comment {
return predicate.Comment(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.Comment {
return predicate.Comment(sql.FieldLTE(FieldID, id))
}
// UniqueInt applies equality check predicate on the "unique_int" field. It's identical to UniqueIntEQ.
func UniqueInt(v int) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldUniqueInt, v))
}
// UniqueFloat applies equality check predicate on the "unique_float" field. It's identical to UniqueFloatEQ.
func UniqueFloat(v float64) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldUniqueFloat, v))
}
// NillableInt applies equality check predicate on the "nillable_int" field. It's identical to NillableIntEQ.
func NillableInt(v int) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldNillableInt, v))
}
// Client applies equality check predicate on the "client" field. It's identical to ClientEQ.
func Client(v string) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldClient, v))
}
// UniqueIntEQ applies the EQ predicate on the "unique_int" field.
func UniqueIntEQ(v int) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldUniqueInt, v))
}
// UniqueIntNEQ applies the NEQ predicate on the "unique_int" field.
func UniqueIntNEQ(v int) predicate.Comment {
return predicate.Comment(sql.FieldNEQ(FieldUniqueInt, v))
}
// UniqueIntIn applies the In predicate on the "unique_int" field.
func UniqueIntIn(vs ...int) predicate.Comment {
return predicate.Comment(sql.FieldIn(FieldUniqueInt, vs...))
}
// UniqueIntNotIn applies the NotIn predicate on the "unique_int" field.
func UniqueIntNotIn(vs ...int) predicate.Comment {
return predicate.Comment(sql.FieldNotIn(FieldUniqueInt, vs...))
}
// UniqueIntGT applies the GT predicate on the "unique_int" field.
func UniqueIntGT(v int) predicate.Comment {
return predicate.Comment(sql.FieldGT(FieldUniqueInt, v))
}
// UniqueIntGTE applies the GTE predicate on the "unique_int" field.
func UniqueIntGTE(v int) predicate.Comment {
return predicate.Comment(sql.FieldGTE(FieldUniqueInt, v))
}
// UniqueIntLT applies the LT predicate on the "unique_int" field.
func UniqueIntLT(v int) predicate.Comment {
return predicate.Comment(sql.FieldLT(FieldUniqueInt, v))
}
// UniqueIntLTE applies the LTE predicate on the "unique_int" field.
func UniqueIntLTE(v int) predicate.Comment {
return predicate.Comment(sql.FieldLTE(FieldUniqueInt, v))
}
// UniqueFloatEQ applies the EQ predicate on the "unique_float" field.
func UniqueFloatEQ(v float64) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldUniqueFloat, v))
}
// UniqueFloatNEQ applies the NEQ predicate on the "unique_float" field.
func UniqueFloatNEQ(v float64) predicate.Comment {
return predicate.Comment(sql.FieldNEQ(FieldUniqueFloat, v))
}
// UniqueFloatIn applies the In predicate on the "unique_float" field.
func UniqueFloatIn(vs ...float64) predicate.Comment {
return predicate.Comment(sql.FieldIn(FieldUniqueFloat, vs...))
}
// UniqueFloatNotIn applies the NotIn predicate on the "unique_float" field.
func UniqueFloatNotIn(vs ...float64) predicate.Comment {
return predicate.Comment(sql.FieldNotIn(FieldUniqueFloat, vs...))
}
// UniqueFloatGT applies the GT predicate on the "unique_float" field.
func UniqueFloatGT(v float64) predicate.Comment {
return predicate.Comment(sql.FieldGT(FieldUniqueFloat, v))
}
// UniqueFloatGTE applies the GTE predicate on the "unique_float" field.
func UniqueFloatGTE(v float64) predicate.Comment {
return predicate.Comment(sql.FieldGTE(FieldUniqueFloat, v))
}
// UniqueFloatLT applies the LT predicate on the "unique_float" field.
func UniqueFloatLT(v float64) predicate.Comment {
return predicate.Comment(sql.FieldLT(FieldUniqueFloat, v))
}
// UniqueFloatLTE applies the LTE predicate on the "unique_float" field.
func UniqueFloatLTE(v float64) predicate.Comment {
return predicate.Comment(sql.FieldLTE(FieldUniqueFloat, v))
}
// NillableIntEQ applies the EQ predicate on the "nillable_int" field.
func NillableIntEQ(v int) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldNillableInt, v))
}
// NillableIntNEQ applies the NEQ predicate on the "nillable_int" field.
func NillableIntNEQ(v int) predicate.Comment {
return predicate.Comment(sql.FieldNEQ(FieldNillableInt, v))
}
// NillableIntIn applies the In predicate on the "nillable_int" field.
func NillableIntIn(vs ...int) predicate.Comment {
return predicate.Comment(sql.FieldIn(FieldNillableInt, vs...))
}
// NillableIntNotIn applies the NotIn predicate on the "nillable_int" field.
func NillableIntNotIn(vs ...int) predicate.Comment {
return predicate.Comment(sql.FieldNotIn(FieldNillableInt, vs...))
}
// NillableIntGT applies the GT predicate on the "nillable_int" field.
func NillableIntGT(v int) predicate.Comment {
return predicate.Comment(sql.FieldGT(FieldNillableInt, v))
}
// NillableIntGTE applies the GTE predicate on the "nillable_int" field.
func NillableIntGTE(v int) predicate.Comment {
return predicate.Comment(sql.FieldGTE(FieldNillableInt, v))
}
// NillableIntLT applies the LT predicate on the "nillable_int" field.
func NillableIntLT(v int) predicate.Comment {
return predicate.Comment(sql.FieldLT(FieldNillableInt, v))
}
// NillableIntLTE applies the LTE predicate on the "nillable_int" field.
func NillableIntLTE(v int) predicate.Comment {
return predicate.Comment(sql.FieldLTE(FieldNillableInt, v))
}
// NillableIntIsNil applies the IsNil predicate on the "nillable_int" field.
func NillableIntIsNil() predicate.Comment {
return predicate.Comment(sql.FieldIsNull(FieldNillableInt))
}
// NillableIntNotNil applies the NotNil predicate on the "nillable_int" field.
func NillableIntNotNil() predicate.Comment {
return predicate.Comment(sql.FieldNotNull(FieldNillableInt))
}
// TableEQ applies the EQ predicate on the "table" field.
func TableEQ(v string) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldTable, v))
}
// TableNEQ applies the NEQ predicate on the "table" field.
func TableNEQ(v string) predicate.Comment {
return predicate.Comment(sql.FieldNEQ(FieldTable, v))
}
// TableIn applies the In predicate on the "table" field.
func TableIn(vs ...string) predicate.Comment {
return predicate.Comment(sql.FieldIn(FieldTable, vs...))
}
// TableNotIn applies the NotIn predicate on the "table" field.
func TableNotIn(vs ...string) predicate.Comment {
return predicate.Comment(sql.FieldNotIn(FieldTable, vs...))
}
// TableGT applies the GT predicate on the "table" field.
func TableGT(v string) predicate.Comment {
return predicate.Comment(sql.FieldGT(FieldTable, v))
}
// TableGTE applies the GTE predicate on the "table" field.
func TableGTE(v string) predicate.Comment {
return predicate.Comment(sql.FieldGTE(FieldTable, v))
}
// TableLT applies the LT predicate on the "table" field.
func TableLT(v string) predicate.Comment {
return predicate.Comment(sql.FieldLT(FieldTable, v))
}
// TableLTE applies the LTE predicate on the "table" field.
func TableLTE(v string) predicate.Comment {
return predicate.Comment(sql.FieldLTE(FieldTable, v))
}
// TableContains applies the Contains predicate on the "table" field.
func TableContains(v string) predicate.Comment {
return predicate.Comment(sql.FieldContains(FieldTable, v))
}
// TableHasPrefix applies the HasPrefix predicate on the "table" field.
func TableHasPrefix(v string) predicate.Comment {
return predicate.Comment(sql.FieldHasPrefix(FieldTable, v))
}
// TableHasSuffix applies the HasSuffix predicate on the "table" field.
func TableHasSuffix(v string) predicate.Comment {
return predicate.Comment(sql.FieldHasSuffix(FieldTable, v))
}
// TableIsNil applies the IsNil predicate on the "table" field.
func TableIsNil() predicate.Comment {
return predicate.Comment(sql.FieldIsNull(FieldTable))
}
// TableNotNil applies the NotNil predicate on the "table" field.
func TableNotNil() predicate.Comment {
return predicate.Comment(sql.FieldNotNull(FieldTable))
}
// TableEqualFold applies the EqualFold predicate on the "table" field.
func TableEqualFold(v string) predicate.Comment {
return predicate.Comment(sql.FieldEqualFold(FieldTable, v))
}
// TableContainsFold applies the ContainsFold predicate on the "table" field.
func TableContainsFold(v string) predicate.Comment {
return predicate.Comment(sql.FieldContainsFold(FieldTable, v))
}
// DirIsNil applies the IsNil predicate on the "dir" field.
func DirIsNil() predicate.Comment {
return predicate.Comment(sql.FieldIsNull(FieldDir))
}
// DirNotNil applies the NotNil predicate on the "dir" field.
func DirNotNil() predicate.Comment {
return predicate.Comment(sql.FieldNotNull(FieldDir))
}
// ClientEQ applies the EQ predicate on the "client" field.
func ClientEQ(v string) predicate.Comment {
return predicate.Comment(sql.FieldEQ(FieldClient, v))
}
// ClientNEQ applies the NEQ predicate on the "client" field.
func ClientNEQ(v string) predicate.Comment {
return predicate.Comment(sql.FieldNEQ(FieldClient, v))
}
// ClientIn applies the In predicate on the "client" field.
func ClientIn(vs ...string) predicate.Comment {
return predicate.Comment(sql.FieldIn(FieldClient, vs...))
}
// ClientNotIn applies the NotIn predicate on the "client" field.
func ClientNotIn(vs ...string) predicate.Comment {
return predicate.Comment(sql.FieldNotIn(FieldClient, vs...))
}
// ClientGT applies the GT predicate on the "client" field.
func ClientGT(v string) predicate.Comment {
return predicate.Comment(sql.FieldGT(FieldClient, v))
}
// ClientGTE applies the GTE predicate on the "client" field.
func ClientGTE(v string) predicate.Comment {
return predicate.Comment(sql.FieldGTE(FieldClient, v))
}
// ClientLT applies the LT predicate on the "client" field.
func ClientLT(v string) predicate.Comment {
return predicate.Comment(sql.FieldLT(FieldClient, v))
}
// ClientLTE applies the LTE predicate on the "client" field.
func ClientLTE(v string) predicate.Comment {
return predicate.Comment(sql.FieldLTE(FieldClient, v))
}
// ClientContains applies the Contains predicate on the "client" field.
func ClientContains(v string) predicate.Comment {
return predicate.Comment(sql.FieldContains(FieldClient, v))
}
// ClientHasPrefix applies the HasPrefix predicate on the "client" field.
func ClientHasPrefix(v string) predicate.Comment {
return predicate.Comment(sql.FieldHasPrefix(FieldClient, v))
}
// ClientHasSuffix applies the HasSuffix predicate on the "client" field.
func ClientHasSuffix(v string) predicate.Comment {
return predicate.Comment(sql.FieldHasSuffix(FieldClient, v))
}
// ClientIsNil applies the IsNil predicate on the "client" field.
func ClientIsNil() predicate.Comment {
return predicate.Comment(sql.FieldIsNull(FieldClient))
}
// ClientNotNil applies the NotNil predicate on the "client" field.
func ClientNotNil() predicate.Comment {
return predicate.Comment(sql.FieldNotNull(FieldClient))
}
// ClientEqualFold applies the EqualFold predicate on the "client" field.
func ClientEqualFold(v string) predicate.Comment {
return predicate.Comment(sql.FieldEqualFold(FieldClient, v))
}
// ClientContainsFold applies the ContainsFold predicate on the "client" field.
func ClientContainsFold(v string) predicate.Comment {
return predicate.Comment(sql.FieldContainsFold(FieldClient, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Comment) predicate.Comment {
return predicate.Comment(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Comment) predicate.Comment {
return predicate.Comment(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Comment) predicate.Comment {
return predicate.Comment(sql.NotPredicates(p))
}