mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 00:22:08 -06:00
53 lines
1.4 KiB
Go
53 lines
1.4 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package codesourcefile
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the codesourcefile type in the database.
|
|
Label = "code_source_file"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldPath holds the string denoting the path field in the database.
|
|
FieldPath = "path"
|
|
// Table holds the table name of the codesourcefile in the database.
|
|
Table = "code_source_files"
|
|
)
|
|
|
|
// Columns holds all SQL columns for codesourcefile fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldPath,
|
|
}
|
|
|
|
// 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 (
|
|
// PathValidator is a validator for the "path" field. It is called by the builders before save.
|
|
PathValidator func(string) error
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the CodeSourceFile 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()
|
|
}
|
|
|
|
// ByPath orders the results by the path field.
|
|
func ByPath(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldPath, opts...).ToFunc()
|
|
}
|