Files
upstream-ent/examples/viewcomposite/ent/petusername/petusername.go
upstream-mirror 4b3ad0b611
Some checks failed
Atlas CI Public / lint (push) Failing after 13s
Atlas CI Public / sync (push) Has been skipped
snapshot of https://github.com/ent/ent.git (master, 2026-09-15; blobs > 131072B omitted)
2026-09-15 22:12:36 +05:00

40 lines
980 B
Go

// Code generated by ent, DO NOT EDIT.
package petusername
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the petusername type in the database.
Label = "pet_user_name"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// Table holds the table name of the petusername in the database.
Table = "pet_user_names"
)
// Columns holds all SQL columns for petusername fields.
var Columns = []string{
FieldName,
}
// 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 PetUserName queries.
type OrderOption func(*sql.Selector)
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}