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

Method SQL

pkg/sql/ast/sql.go:954–965  ·  view source on GitHub ↗

SQL returns the SQL representation of this set operation as "left UNION|EXCEPT|INTERSECT [ALL] right".

()

Source from the content-addressed store, hash-verified

952// SQL returns the SQL representation of this set operation as
953// "left UNION|EXCEPT|INTERSECT [ALL] right".
954func (s *SetOperation) SQL() string {
955 if s == nil {
956 return ""
957 }
958 left := stmtSQL(s.Left)
959 right := stmtSQL(s.Right)
960 op := s.Operator
961 if s.All {
962 op += " ALL"
963 }
964 return fmt.Sprintf("%s %s %s", left, op, right)
965}
966
967// SQL returns the SQL representation of this VALUES clause as
968// "VALUES (v1, v2), (v3, v4), ...".

Callers 3

TestSetOperation_SQLFunction · 0.95
TestNilSQLFunction · 0.95
TestSetOperationSQLFunction · 0.95

Calls 1

stmtSQLFunction · 0.70

Tested by 3

TestSetOperation_SQLFunction · 0.76
TestNilSQLFunction · 0.76
TestSetOperationSQLFunction · 0.76