MCPcopy Create free account
hub / github.com/cockscomb/cel2sql / validateFieldName

Function validateFieldName

cel2sql.go:829–834  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

827var fieldNameRegexp = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_]{0,127}$`)
828
829func validateFieldName(name string) error {
830 if !fieldNameRegexp.MatchString(name) {
831 return fmt.Errorf("invalid field name \"%s\"", name)
832 }
833 return nil
834}
835
836func extractFieldName(node *exprpb.Expr) (string, error) {
837 if !isStringLiteral(node) {

Callers 1

extractFieldNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected