当前位置: 首页>>代码示例>>C#>>正文


C# VarVec类代码示例

本文整理汇总了C#中VarVec的典型用法代码示例。如果您正苦于以下问题:C# VarVec类的具体用法?C# VarVec怎么用?C# VarVec使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


VarVec类属于命名空间,在下文中一共展示了VarVec类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Table

        internal Table(Command command, TableMD tableMetadata, int tableId)
        {
            m_tableMetadata = tableMetadata;
            m_columns = Command.CreateVarList();
            m_keys = command.CreateVarVec();
            m_nonnullableColumns = command.CreateVarVec();
            m_tableId = tableId;

            var columnVarMap = new Dictionary<string, ColumnVar>();
            foreach (var c in tableMetadata.Columns)
            {
                var v = command.CreateColumnVar(this, c);
                columnVarMap[c.Name] = v;
                if (!c.IsNullable)
                {
                    m_nonnullableColumns.Set(v);
                }
            }

            foreach (var c in tableMetadata.Keys)
            {
                var v = columnVarMap[c.Name];
                m_keys.Set(v);
            }

            m_referencedColumns = command.CreateVarVec(m_columns);
        }
开发者ID:jimmy00784,项目名称:entityframework,代码行数:27,代码来源:Table.cs

示例2: HasKeyReferences

        /// <summary>
        ///     Determines whether any var from a given list of keys is referenced by any of defining node's right relatives,
        ///     with the exception of the relatives brunching at the given targetJoinNode.
        /// </summary>
        /// <param name="keys"> A list of vars to check for </param>
        /// <param name="definingNode"> The node considered to be the defining node </param>
        /// <param name="targetJoinNode"> The relatives branching at this node are skipped </param>
        /// <returns> False, only it can determine that not a single var from a given list of keys is referenced by any of defining node's right relatives, with the exception of the relatives brunching at the given targetJoinNode. </returns>
        internal bool HasKeyReferences(VarVec keys, Node definingNode, Node targetJoinNode)
        {
            var currentChild = definingNode;
            Node parent;
            var continueUp = true;

            while (continueUp & m_nodeToParentMap.TryGetValue(currentChild, out parent))
            {
                if (parent != targetJoinNode)
                {
                    // Check the parent
                    if (HasVarReferencesShallow(parent, keys, m_nodeToSiblingNumber[currentChild], out continueUp))
                    {
                        return true;
                    }

                    //Check all the siblings to the right
                    for (var i = m_nodeToSiblingNumber[currentChild] + 1; i < parent.Children.Count; i++)
                    {
                        if (parent.Children[i].GetNodeInfo(m_command).ExternalReferences.Overlaps(keys))
                        {
                            return true;
                        }
                    }
                }
                currentChild = parent;
            }
            return false;
        }
开发者ID:hallco978,项目名称:entityframework,代码行数:37,代码来源:VarRefManager.cs

示例3: SetOp

 internal SetOp(OpType opType, VarVec outputs, VarMap left, VarMap right)
     : this(opType)
 {
     m_varMap = new VarMap[2];
     m_varMap[0] = left;
     m_varMap[1] = right;
     m_outputVars = outputs;
 }
开发者ID:WangWilliam,项目名称:EntityFramework5,代码行数:8,代码来源:SetOp.cs

示例4: GetHashValue

 // <summary>
 // Compute the hash value for a Vec
 // </summary>
 internal static int GetHashValue(VarVec vec)
 {
     var hashValue = 0;
     foreach (var v in vec)
     {
         hashValue ^= v.GetHashCode();
     }
     return hashValue;
 }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:12,代码来源:NodeInfo.cs

示例5: NestBaseOp

 internal NestBaseOp(
     OpType opType, List<SortKey> prefixSortKeys,
     VarVec outputVars,
     List<CollectionInfo> collectionInfoList)
     : base(opType)
 {
     m_outputs = outputVars;
     m_collectionInfoList = collectionInfoList;
     m_prefixSortKeys = prefixSortKeys;
 }
开发者ID:jimmy00784,项目名称:entityframework,代码行数:10,代码来源:NestBaseOp.cs

示例6: ExtendedNodeInfo

 internal ExtendedNodeInfo(Command cmd)
     : base(cmd)
 {
     m_localDefinitions = cmd.CreateVarVec();
     m_definitions = cmd.CreateVarVec();
     m_nonNullableDefinitions = cmd.CreateVarVec();
     m_nonNullableVisibleDefinitions = cmd.CreateVarVec();
     m_keys = new KeyVec(cmd);
     m_minRows = RowCount.Zero;
     m_maxRows = RowCount.Unbounded;
 }
开发者ID:hallco978,项目名称:entityframework,代码行数:11,代码来源:ExtendedNodeInfo.cs

示例7: CollectionInfo

 internal CollectionInfo(
     Var collectionVar, ColumnMap columnMap, VarList flattenedElementVars, VarVec keys, List<SortKey> sortKeys,
     object discriminatorValue)
 {
     m_collectionVar = collectionVar;
     m_columnMap = columnMap;
     m_flattenedElementVars = flattenedElementVars;
     m_keys = keys;
     m_sortKeys = sortKeys;
     m_discriminatorValue = discriminatorValue;
 }
开发者ID:jimmy00784,项目名称:entityframework,代码行数:11,代码来源:CollectionInfo.cs

示例8: CreateVarVec

 private static VarVec CreateVarVec(params int[] bits)
 {
     var command = new Mock<Command>();
     var vec = new VarVec(command.Object);
     bits.Each(b =>
                   {
                       var v = CreateVar(b);
                       vec.Set(v);
                       command.Setup(m => m.GetVar(b)).Returns(v);
                   });
     return vec;
 }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:12,代码来源:VarVecTests.cs

示例9: GetPushdownPredicate

        /// <summary>
        ///     Split up a predicate into 2 parts - the pushdown and the non-pushdown predicate.
        ///     If the filter node has no external references *and* the "columns" parameter is null,
        ///     then the entire predicate can be pushed down
        ///     We then compute the set of valid column references - if the "columns" parameter
        ///     is non-null, this set is used. Otherwise, we get the definitions of the
        ///     input relop node of the filterOp, and use that.
        ///     We use this list of valid column references to identify which parts of the filter
        ///     predicate can be pushed down - only those parts of the predicate that do not
        ///     reference anything beyond these columns are considered for pushdown. The rest are
        ///     stuffed into the nonPushdownPredicate output parameter
        /// </summary>
        /// <param name="command"> Command object </param>
        /// <param name="filterNode"> the FilterOp subtree </param>
        /// <param name="columns"> (Optional) List of columns to consider for "pushdown" </param>
        /// <param name="nonPushdownPredicateNode"> (output) Part of the predicate that cannot be pushed down </param>
        /// <returns> part of the predicate that can be pushed down </returns>
        private static Node GetPushdownPredicate(Command command, Node filterNode, VarVec columns, out Node nonPushdownPredicateNode)
        {
            var pushdownPredicateNode = filterNode.Child1;
            nonPushdownPredicateNode = null;
            var filterNodeInfo = command.GetExtendedNodeInfo(filterNode);
            if (columns == null
                && filterNodeInfo.ExternalReferences.IsEmpty)
            {
                return pushdownPredicateNode;
            }

            if (columns == null)
            {
                var inputNodeInfo = command.GetExtendedNodeInfo(filterNode.Child0);
                columns = inputNodeInfo.Definitions;
            }

            var predicate = new Predicate(command, pushdownPredicateNode);
            Predicate nonPushdownPredicate;
            predicate = predicate.GetSingleTablePredicates(columns, out nonPushdownPredicate);
            pushdownPredicateNode = predicate.BuildAndTree();
            nonPushdownPredicateNode = nonPushdownPredicate.BuildAndTree();
            return pushdownPredicateNode;
        }
开发者ID:jwanagel,项目名称:jjwtest,代码行数:41,代码来源:FilterOpRules.cs

示例10: HasVarReferences

 /// <summary>
 ///     Does the list of outputs of the given SetOp contain a var
 ///     from the given VarVec defined by the SetOp's child with the given index
 /// </summary>
 private static bool HasVarReferences(SetOp op, VarVec vars, int index)
 {
     foreach (var var in op.VarMap[index].Values)
     {
         if (vars.IsSet(var))
         {
             return true;
         }
     }
     return false;
 }
开发者ID:hallco978,项目名称:entityframework,代码行数:15,代码来源:VarRefManager.cs

示例11: CreateGroupByIntoOp

 /// <summary>
 /// Creates a new GroupByIntoOp
 /// </summary>
 /// <param name="gbyKeys">A VarSet that specifies the Key variables produced by the GroupByOp</param>
 /// <param name="outputs">A VarSet that specifies the vars from the input that represent the real grouping input</param>
 /// <param name="inputs">A VarSet that specifies all (Key and Aggregate) variables produced by the GroupByOp</param>
 /// <returns>A new GroupByOp with the specified key and output VarSets</returns>
 internal GroupByIntoOp CreateGroupByIntoOp(VarVec gbyKeys, VarVec inputs, VarVec outputs)
 {
     return new GroupByIntoOp(gbyKeys, inputs, outputs);
 }
开发者ID:uQr,项目名称:referencesource,代码行数:11,代码来源:Command.cs

示例12: CreateSingleStreamNestOp

 /// <summary>
 /// Create a singleStreamNestOp
 /// </summary>
 /// <param name="keys">keys for the nest operation</param>
 /// <param name="prefixSortKeys">list of prefix sort keys</param>
 /// <param name="postfixSortKeys">list of postfix sort keys</param>
 /// <param name="outputVars">List of outputVars</param>
 /// <param name="collectionInfoList">CollectionInfo for each collection </param>
 /// <param name="discriminatorVar">Var describing the discriminator</param>
 /// <returns></returns>
 internal SingleStreamNestOp CreateSingleStreamNestOp(VarVec keys,
     List<SortKey> prefixSortKeys, List<SortKey> postfixSortKeys,
     VarVec outputVars,
     List<CollectionInfo> collectionInfoList, Var discriminatorVar)
 {
     return new SingleStreamNestOp(keys, prefixSortKeys, postfixSortKeys, outputVars, collectionInfoList, discriminatorVar);
 }
开发者ID:uQr,项目名称:referencesource,代码行数:17,代码来源:Command.cs

示例13: CreateDistinctOp

 /// <summary>
 /// Creates a new DistinctOp
 /// <param name="keyVars">list of key vars</param>
 /// </summary>
 /// <returns>A new DistinctOp</returns>
 internal DistinctOp CreateDistinctOp(VarVec keyVars)
 {
     return new DistinctOp(keyVars);
 }
开发者ID:uQr,项目名称:referencesource,代码行数:9,代码来源:Command.cs

示例14: KeyVec

 internal KeyVec(Command itree)
 {
     m_keys = itree.CreateVarVec();
     m_noKeys = true;
 }
开发者ID:WangWilliam,项目名称:EntityFramework5,代码行数:5,代码来源:KeyVec.cs

示例15: FlattenVarSet

 /// <summary>
 ///     Probe the current VarSet for "structured" Vars - replace these with the
 ///     corresponding sets of flattened Vars
 /// </summary>
 /// <param name="varSet"> current set of vars </param>
 /// <returns> an "expanded" varset </returns>
 private VarVec FlattenVarSet(VarVec varSet)
 {
     var newVarSet = m_command.CreateVarVec(FlattenVars(varSet));
     return newVarSet;
 }
开发者ID:christiandpena,项目名称:entityframework,代码行数:11,代码来源:NominalTypeEliminator.cs


注:本文中的VarVec类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。