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

Function stmtSQL

pkg/formatter/render.go:1208–1216  ·  view source on GitHub ↗

stmtSQL returns the SQL() output for a statement, or its token literal.

(s ast.Statement)

Source from the content-addressed store, hash-verified

1206
1207// stmtSQL returns the SQL() output for a statement, or its token literal.
1208func 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.
1219func exprListSQL(exprs []ast.Expression) string {

Callers 2

FormatStatementFunction · 0.70
tableRefSQLFunction · 0.70

Calls 2

TokenLiteralMethod · 0.65
SQLMethod · 0.45

Tested by

no test coverage detected