internal Command(MetadataWorkspace metadataWorkspace) { this.m_parameterMap = new Dictionary <string, ParameterVar>(); this.m_vars = new List <Var>(); this.m_tables = new List <Table>(); this.m_metadataWorkspace = metadataWorkspace; if (!Command.TryGetPrimitiveType(PrimitiveTypeKind.Boolean, out this.m_boolType)) { throw new ProviderIncompatibleException(Strings.Cqt_General_NoProviderBooleanType); } if (!Command.TryGetPrimitiveType(PrimitiveTypeKind.Int32, out this.m_intType)) { throw new ProviderIncompatibleException(Strings.Cqt_General_NoProviderIntegerType); } if (!Command.TryGetPrimitiveType(PrimitiveTypeKind.String, out this.m_stringType)) { throw new ProviderIncompatibleException(Strings.Cqt_General_NoProviderStringType); } this.m_trueOp = new ConstantPredicateOp(this.m_boolType, true); this.m_falseOp = new ConstantPredicateOp(this.m_boolType, false); this.m_nodeInfoVisitor = new NodeInfoVisitor(this); this.m_keyPullupVisitor = new KeyPullup(this); this.m_freeVarVecEnumerators = new Stack <VarVec.VarVecEnumerator>(); this.m_freeVarVecs = new Stack <VarVec>(); this.m_referencedRelProperties = new HashSet <RelProperty>(); }
public override NodeInfo Visit(FilterOp op, Node n) { ExtendedNodeInfo extendedNodeInfo1 = this.InitExtendedNodeInfo(n); ExtendedNodeInfo extendedNodeInfo2 = this.GetExtendedNodeInfo(n.Child0); NodeInfo nodeInfo = this.GetNodeInfo(n.Child1); extendedNodeInfo1.Definitions.Or(extendedNodeInfo2.Definitions); extendedNodeInfo1.ExternalReferences.Or(extendedNodeInfo2.ExternalReferences); extendedNodeInfo1.ExternalReferences.Or(nodeInfo.ExternalReferences); extendedNodeInfo1.ExternalReferences.Minus(extendedNodeInfo2.Definitions); extendedNodeInfo1.Keys.InitFrom(extendedNodeInfo2.Keys); extendedNodeInfo1.NonNullableDefinitions.InitFrom(extendedNodeInfo2.NonNullableDefinitions); extendedNodeInfo1.NonNullableVisibleDefinitions.InitFrom(extendedNodeInfo2.NonNullableDefinitions); extendedNodeInfo1.MinRows = RowCount.Zero; ConstantPredicateOp op1 = n.Child1.Op as ConstantPredicateOp; extendedNodeInfo1.MaxRows = op1 == null || !op1.IsFalse ? extendedNodeInfo2.MaxRows : RowCount.Zero; return((NodeInfo)extendedNodeInfo1); }
// <summary> // Copies a ConstantPredicateOp // </summary> // <param name="op"> The Op to Copy </param> // <param name="n"> The Node that references the Op </param> // <returns> A copy of the original Node that references a copy of the original Op </returns> public override Node Visit(ConstantPredicateOp op, Node n) { return(m_destCmd.CreateNode(m_destCmd.CreateConstantPredicateOp(op.Value))); }
public virtual void Visit(ConstantPredicateOp op, Node n) { this.VisitConstantOp((ConstantBaseOp)op, n); }
/// <summary> /// Visitor pattern method for ConstantPredicateOp /// </summary> /// <param name="op"> The ConstantPredicateOp being visited </param> /// <param name="n"> The Node that references the Op </param> public virtual void Visit(ConstantPredicateOp op, Node n) { VisitConstantOp(op, n); }
// <summary> // ConstantPredicateOp // </summary> public virtual TResultType Visit(ConstantPredicateOp op, Node n) { return(VisitConstantOp(op, n)); }
public virtual TResultType Visit(ConstantPredicateOp op, Node n) { return(this.VisitConstantOp((ConstantBaseOp)op, n)); }