(with *ast.SQLWith)
| 532 | } |
| 533 | |
| 534 | func (t *translator) sqlWith(with *ast.SQLWith) map[string]*ast.SQLCTE { |
| 535 | if with.Recursive { |
| 536 | t.error(with, errors.New("recursive WITH queries not currently supported")) |
| 537 | } |
| 538 | old := t.scope.ctes |
| 539 | t.scope.ctes = maps.Clone(t.scope.ctes) |
| 540 | for k, c := range with.CTEs { |
| 541 | // XXX Materialized option not currently supported. |
| 542 | name := strings.ToLower(c.Name.Name) |
| 543 | if _, ok := t.scope.ctes[name]; ok { |
| 544 | t.error(c.Name, errors.New("duplicate WITH clause name")) |
| 545 | } |
| 546 | t.scope.ctes[name] = &with.CTEs[k] |
| 547 | } |
| 548 | return old |
| 549 | } |
| 550 | |
| 551 | func (t *translator) sqlCrossJoin(join *ast.SQLCrossJoin, seq sem.Seq) (sem.Seq, relScope) { |
| 552 | if len(seq) > 0 { |
no test coverage detected