...
1 package exp
2
3 type commonExpr struct {
4 recursive bool
5 name LiteralExpression
6 subQuery Expression
7 }
8
9
10
11 func NewCommonTableExpression(recursive bool, name string, subQuery Expression) CommonTableExpression {
12 return commonExpr{recursive: recursive, name: NewLiteralExpression(name), subQuery: subQuery}
13 }
14
15 func (ce commonExpr) Expression() Expression { return ce }
16
17 func (ce commonExpr) Clone() Expression {
18 return commonExpr{recursive: ce.recursive, name: ce.name, subQuery: ce.subQuery.Clone().(SQLExpression)}
19 }
20
21 func (ce commonExpr) IsRecursive() bool { return ce.recursive }
22 func (ce commonExpr) Name() LiteralExpression { return ce.name }
23 func (ce commonExpr) SubQuery() Expression { return ce.subQuery }
24
View as plain text