void Visitor_DoMakeWalker::Visit_Expr_Rel_Embed(const ZRef<RelationalAlgebra::Expr_Rel_Embed>& iExpr) { if (ZRef<Walker> op0 = this->Do(iExpr->GetOp0())) { if (ZRef<Walker> op1 = this->Do(iExpr->GetOp1())) this->pSetResult(new Walker_Embed(op0, iExpr->GetColName(), op1)); } }
void Visitor_DoMakeWalker::Visit_Expr_Rel_Product(const ZRef<RelationalAlgebra::Expr_Rel_Product>& iExpr) { if (ZRef<Walker> op0 = this->Do(iExpr->GetOp0())) { if (ZRef<Walker> op1 = this->Do(iExpr->GetOp1())) this->pSetResult(new Walker_Product(op0, op1)); } }
void ZVisitor_Expr_Bool_ToStrim::Visit_Expr_Bool_Or(const ZRef<ZExpr_Bool_Or>& iRep) { this->pStrimW() << "("; this->pToStrim(iRep->GetOp0()); this->pStrimW() << " | "; this->pToStrim(iRep->GetOp1()); this->pStrimW() << ")"; }
void Visitor_DoMakeWalker::Visit_Expr_Rel_Union(const ZRef<RelationalAlgebra::Expr_Rel_Union>& iExpr) { if (ZRef<Walker> op0 = this->Do(iExpr->GetOp0())) { if (ZRef<Walker> op1 = this->Do(iExpr->GetOp1())) this->pSetResult(new Walker_Union(op0, op1)); else this->pSetResult(op0); } else if (ZRef<Walker> op1 = this->Do(iExpr->GetOp1())) this->pSetResult(op1); }
void Transform_ConsolidateRenames::Visit_Expr_Rel_Rename(const ZRef<Expr_Rel_Rename>& iExpr) { string8 newName = iExpr->GetNew(); if (ZQ<string8> theQ = sQGetErase(fRename, newName)) newName = *theQ; const string8 oldName = iExpr->GetOld(); sInsertMust(fRename, oldName, newName); ZRef<Expr_Rel> newOp0 = this->Do(iExpr->GetOp0()); if (ZQ<string8> theQ = sQGet(fRename, oldName)) { if (*theQ == newName) { if (newName != oldName) newOp0 = sRename(newOp0, newName, oldName); } } this->pSetResult(newOp0); }
void Visitor_Expr_Bool_Do_Eval::Visit_Expr_Bool_Or(const ZRef<Expr_Bool_Or>& iRep) { this->pSetResult(this->Do(iRep->GetOp0()) || this->Do(iRep->GetOp1())); }
void ZVisitor_Expr_Bool_Do_Eval::Visit_Expr_Bool_And(const ZRef<ZExpr_Bool_And>& iRep) { this->pSetResult(this->Do(iRep->GetOp0()) && this->Do(iRep->GetOp1())); }
void Visitor_DoMakeWalker::Visit_Expr_Rel_Restrict(const ZRef<RelationalAlgebra::Expr_Rel_Restrict>& iExpr) { if (ZRef<Walker> op0 = this->Do(iExpr->GetOp0())) this->pSetResult(new Walker_Restrict(op0, iExpr->GetExpr_Bool())); }
void Visitor_DoMakeWalker::Visit_Expr_Rel_Rename(const ZRef<RelationalAlgebra::Expr_Rel_Rename>& iExpr) { if (ZRef<Walker> op0 = this->Do(iExpr->GetOp0())) this->pSetResult(new Walker_Rename(op0, iExpr->GetNew(), iExpr->GetOld())); }
void Visitor_DoMakeWalker::Visit_Expr_Rel_Calc(const ZRef<RelationalAlgebra::Expr_Rel_Calc>& iExpr) { if (ZRef<Walker> op0 = this->Do(iExpr->GetOp0())) this->pSetResult(new Walker_Calc(op0, iExpr->GetColName(), iExpr->GetCallable())); }
void ZVisitor_Expr_Bool_ToStrim::Visit_Expr_Bool_Not(const ZRef<ZExpr_Bool_Not>& iRep) { this->pStrimW() << "~("; this->pToStrim(iRep->GetOp0()); this->pStrimW() << ")"; }