MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / SQL

Method SQL

pkg/sql/ast/sql.go:223–228  ·  view source on GitHub ↗

SQL returns the SQL representation of this CAST expression in the form "CAST(expr AS type)".

()

Source from the content-addressed store, hash-verified

221// SQL returns the SQL representation of this CAST expression in the form
222// "CAST(expr AS type)".
223func (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.

Callers

nothing calls this directly

Calls 1

exprSQLFunction · 0.70

Tested by

no test coverage detected