============================================================ Helper functions ============================================================ exprSQL dispatches to the SQL() method of any expression
(e Expression)
| 1252 | |
| 1253 | // exprSQL dispatches to the SQL() method of any expression |
| 1254 | func exprSQL(e Expression) string { |
| 1255 | if e == nil { |
| 1256 | return "" |
| 1257 | } |
| 1258 | if s, ok := e.(interface{ SQL() string }); ok { |
| 1259 | return s.SQL() |
| 1260 | } |
| 1261 | return e.TokenLiteral() |
| 1262 | } |
| 1263 | |
| 1264 | // stmtSQL dispatches to the SQL() method of any statement |
| 1265 | func stmtSQL(s Statement) string { |