SQL returns the SQL representation of this CAST expression in the form "CAST(expr AS type)".
()
| 221 | // SQL returns the SQL representation of this CAST expression in the form |
| 222 | // "CAST(expr AS type)". |
| 223 | func (c *CastExpression) SQL() string { |
| 224 | if c == nil { |
| 225 | return "" |
| 226 | } |
| 227 | return fmt.Sprintf("CAST(%s AS %s)", exprSQL(c.Expr), c.Type) |
| 228 | } |
| 229 | |
| 230 | // SQL returns the SQL representation of this CASE expression including all |
| 231 | // WHEN/THEN clauses and an optional ELSE clause. |