Remove visitor.
This commit is contained in:
parent
01f43d462a
commit
e02e08a6ba
17 changed files with 8 additions and 158 deletions
|
|
@ -2,6 +2,10 @@ package jet
|
|||
|
||||
import "errors"
|
||||
|
||||
const (
|
||||
StringConcatOperator = "||"
|
||||
)
|
||||
|
||||
//----------- Logical operators ---------------//
|
||||
|
||||
// NOT returns negation of bool expression result
|
||||
|
|
@ -108,24 +112,6 @@ func (c *caseOperatorImpl) ELSE(els Expression) CaseOperator {
|
|||
return c
|
||||
}
|
||||
|
||||
func (c *caseOperatorImpl) accept(visitor visitor) {
|
||||
visitor.visit(c)
|
||||
|
||||
c.expression.accept(visitor)
|
||||
|
||||
for _, when := range c.when {
|
||||
when.accept(visitor)
|
||||
}
|
||||
|
||||
for _, then := range c.then {
|
||||
then.accept(visitor)
|
||||
}
|
||||
|
||||
if c.els != nil {
|
||||
c.els.accept(visitor)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *caseOperatorImpl) serialize(statement StatementType, out *SqlBuilder, options ...SerializeOption) error {
|
||||
if c == nil {
|
||||
return errors.New("jet: Case Expression is nil. ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue