MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / ValidColumn

Function ValidColumn

pkg/database/ent/machine/machine.go:87–94  ·  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

85
86// ValidColumn reports if the column name is valid (part of the table columns).
87func ValidColumn(column string) bool {
88 for i := range Columns {
89 if column == Columns[i] {
90 return true
91 }
92 }
93 return false
94}
95
96var (
97 // DefaultCreatedAt holds the default value on creation for the "created_at" field.

Callers 2

sqlSaveMethod · 0.92
prepareQueryMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…