stmtSQL returns the SQL() output for a statement, or its token literal.
(s ast.Statement)
| 1206 | |
| 1207 | // stmtSQL returns the SQL() output for a statement, or its token literal. |
| 1208 | func stmtSQL(s ast.Statement) string { |
| 1209 | if s == nil { |
| 1210 | return "" |
| 1211 | } |
| 1212 | if sq, ok := s.(interface{ SQL() string }); ok { |
| 1213 | return sq.SQL() |
| 1214 | } |
| 1215 | return s.TokenLiteral() |
| 1216 | } |
| 1217 | |
| 1218 | // exprListSQL renders a comma-separated list of expressions. |
| 1219 | func exprListSQL(exprs []ast.Expression) string { |
no test coverage detected