exprSQL returns the SQL() output for an expression, or its token literal.
(e ast.Expression)
| 1195 | |
| 1196 | // exprSQL returns the SQL() output for an expression, or its token literal. |
| 1197 | func exprSQL(e ast.Expression) string { |
| 1198 | if e == nil { |
| 1199 | return "" |
| 1200 | } |
| 1201 | if s, ok := e.(interface{ SQL() string }); ok { |
| 1202 | return s.SQL() |
| 1203 | } |
| 1204 | return e.TokenLiteral() |
| 1205 | } |
| 1206 | |
| 1207 | // stmtSQL returns the SQL() output for a statement, or its token literal. |
| 1208 | func stmtSQL(s ast.Statement) string { |
no test coverage detected