MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / identifierName

Function identifierName

pkg/transform/set.go:26–31  ·  view source on GitHub ↗

identifierName extracts the column name string from an Expression that is expected to be an *ast.Identifier. Returns empty string for other types.

(expr ast.Expression)

Source from the content-addressed store, hash-verified

24// identifierName extracts the column name string from an Expression that is
25// expected to be an *ast.Identifier. Returns empty string for other types.
26func identifierName(expr ast.Expression) string {
27 if id, ok := expr.(*ast.Identifier); ok {
28 return id.Name
29 }
30 return ""
31}
32
33// parseValueExpr parses a SQL value expression string using the
34// "SELECT * FROM _t WHERE _col = <valueSQL>" trick, returning the right-hand

Callers 2

AddSetClauseFunction · 0.70
RemoveSetClauseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected