MCPcopy
hub / github.com/sqlc-dev/sqlc / convertSetOprType

Method convertSetOprType

internal/engine/dolphin/convert.go:1314–1337  ·  view source on GitHub ↗
(n *pcast.SetOprType)

Source from the content-addressed store, hash-verified

1312}
1313
1314func (c *cc) convertSetOprType(n *pcast.SetOprType) (op ast.SetOperation, all bool) {
1315 if n == nil {
1316 return
1317 }
1318
1319 switch *n {
1320 case pcast.Union:
1321 op = ast.Union
1322 case pcast.UnionAll:
1323 op = ast.Union
1324 all = true
1325 case pcast.Intersect:
1326 op = ast.Intersect
1327 case pcast.IntersectAll:
1328 op = ast.Intersect
1329 all = true
1330 case pcast.Except:
1331 op = ast.Except
1332 case pcast.ExceptAll:
1333 op = ast.Except
1334 all = true
1335 }
1336 return
1337}
1338
1339// convertSetOprSelectList converts a list of SELECT from the Pingcap parser
1340// into a tree. It is called for UNION, INTERSECT or EXCLUDE operation.

Callers 2

convertSelectStmtMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected