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

Function exprSQL

pkg/formatter/render.go:1197–1205  ·  view source on GitHub ↗

exprSQL returns the SQL() output for an expression, or its token literal.

(e ast.Expression)

Source from the content-addressed store, hash-verified

1195
1196// exprSQL returns the SQL() output for an expression, or its token literal.
1197func exprSQL(e ast.Expression) string {
1198 if e == nil {
1199 return ""
1200 }
1201 if s, ok := e.(interface{ SQL() string }); ok {
1202 return s.SQL()
1203 }
1204 return e.TokenLiteral()
1205}
1206
1207// stmtSQL returns the SQL() output for a statement, or its token literal.
1208func stmtSQL(s ast.Statement) string {

Callers 11

FormatExpressionFunction · 0.70
renderInsertFunction · 0.70
renderUpdateFunction · 0.70
renderMergeFunction · 0.70
exprListSQLFunction · 0.70
orderBySQLFunction · 0.70
tableRefSQLFunction · 0.70
joinSQLFunction · 0.70
onConflictSQLFunction · 0.70
columnConstraintSQLFunction · 0.70
tableConstraintSQLFunction · 0.70

Calls 2

TokenLiteralMethod · 0.65
SQLMethod · 0.45

Tested by

no test coverage detected