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

Function exprSQL

pkg/sql/ast/sql.go:1254–1262  ·  view source on GitHub ↗

============================================================ Helper functions ============================================================ exprSQL dispatches to the SQL() method of any expression

(e Expression)

Source from the content-addressed store, hash-verified

1252
1253// exprSQL dispatches to the SQL() method of any expression
1254func 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
1265func stmtSQL(s Statement) string {

Callers 15

SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70
SQLMethod · 0.70

Calls 2

TokenLiteralMethod · 0.65
SQLMethod · 0.45

Tested by 1

TestExpressionSQLFunction · 0.56