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

Method SQL

pkg/sql/ast/sql.go:507–516  ·  view source on GitHub ↗

SQL returns the SQL representation of this GROUPING SETS expression as "GROUPING SETS((a, b), (a), ())".

()

Source from the content-addressed store, hash-verified

505// SQL returns the SQL representation of this GROUPING SETS expression as
506// "GROUPING SETS((a, b), (a), ())".
507func (g *GroupingSetsExpression) SQL() string {
508 if g == nil {
509 return ""
510 }
511 sets := make([]string, len(g.Sets))
512 for i, set := range g.Sets {
513 sets[i] = "(" + exprListSQL(set) + ")"
514 }
515 return "GROUPING SETS(" + strings.Join(sets, ", ") + ")"
516}
517
518// ============================================================
519// Statements

Callers 2

TestNilSQLFunction · 0.95

Calls 1

exprListSQLFunction · 0.70

Tested by 2

TestNilSQLFunction · 0.76