MCPcopy Index your code
hub / github.com/chainloop-dev/chainloop / ValidColumn

Function ValidColumn

app/controlplane/pkg/data/ent/user/user.go:64–71  ·  view source on GitHub ↗

ValidColumn reports if the column name is valid (part of the table columns).

(column string)

Source from the content-addressed store, hash-verified

62
63// ValidColumn reports if the column name is valid (part of the table columns).
64func ValidColumn(column string) bool {
65 for i := range Columns {
66 if column == Columns[i] {
67 return true
68 }
69 }
70 return false
71}
72
73var (
74 // EmailValidator is a validator for the "email" field. It is called by the builders before save.

Callers 2

prepareQueryMethod · 0.92
sqlSaveMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected