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)
| 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. |
| 26 | func 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 |
no outgoing calls
no test coverage detected