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


C# IQueryPlanNode类代码示例

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


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

示例1: SimpleSelectNode

 public SimpleSelectNode(IQueryPlanNode child, ObjectName columnName, SqlExpressionType op, SqlExpression expression)
     : base(child)
 {
     ColumnName = columnName;
     OperatorType = op;
     Expression = expression;
 }
开发者ID:prepare,项目名称:deveeldb,代码行数:7,代码来源:SimpleSelectNode.cs

示例2: JoinNode

 public JoinNode(IQueryPlanNode left, IQueryPlanNode right, ObjectName leftColumnName, SqlExpressionType @operator, SqlExpression rightExpression)
     : base(left, right)
 {
     LeftColumnName = leftColumnName;
     Operator = @operator;
     RightExpression = rightExpression;
 }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:7,代码来源:JoinNode.cs

示例3: SimpleSelectNode

 public SimpleSelectNode(IQueryPlanNode child, ObjectName leftVar, Operator op, Expression rightExpression)
     : base(child)
 {
     this.leftVar = leftVar;
     this.op = op;
     this.rightExpression = rightExpression;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:7,代码来源:SimpleSelectNode.cs

示例4: SortNode

        public SortNode(IQueryPlanNode child, ObjectName[] columnNames, bool[] ascending)
            : base(child)
        {
            // How we handle ascending/descending order
            // ----------------------------------------
            // Internally to the database, all columns are naturally ordered in
            // ascending order (start at lowest and end on highest).  When a column
            // is ordered in descending order, a fast way to achieve this is to take
            // the ascending set and reverse it.  This works for single columns,
            // however some thought is required for handling multiple column.  We
            // order columns from RHS to LHS.  If LHS is descending then this will
            // order the RHS incorrectly if we leave as is.  Therefore, we must do
            // some pre-processing that looks ahead on any descending orders and
            // reverses the order of the columns to the right.  This pre-processing
            // is done in the first pass.

            int sz = ascending.Length;
            for (int n = 0; n < sz - 1; ++n) {
                if (!ascending[n]) {    // if descending...
                    // Reverse order of all columns to the right...
                    for (int p = n + 1; p < sz; ++p) {
                        ascending[p] = !ascending[p];
                    }
                }
            }

            ColumnNames = columnNames;
            Ascending = ascending;
        }
开发者ID:prepare,项目名称:deveeldb,代码行数:29,代码来源:SortNode.cs

示例5: NonCorrelatedAnyAllNode

 public NonCorrelatedAnyAllNode(IQueryPlanNode left, IQueryPlanNode right, ObjectName[] leftColumnNames, SqlExpressionType subQueryType, bool isAll)
     : base(left, right)
 {
     LeftColumnNames = leftColumnNames;
     SubQueryType = subQueryType;
     IsAll = isAll;
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:NonCorrelatedAnyAllNode.cs

示例6: JoinNode

 public JoinNode(IQueryPlanNode left, IQueryPlanNode right, ObjectName leftVar, Operator joinOp, Expression rightExpression)
     : base(left, right)
 {
     this.leftVar = leftVar;
     this.joinOp = joinOp;
     this.rightExpression = rightExpression;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:7,代码来源:JoinNode.cs

示例7: CachePointNode

 public CachePointNode(IQueryPlanNode child)
     : base(child)
 {
     lock (GlobLock) {
         id = ((int) DateTime.Now.Ticks << 16) | (GlobId & 0x0FFFF);
         ++GlobId;
     }
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:8,代码来源:CachePointNode.cs

示例8: GroupNode

 /// <summary>
 /// Groups over the given columns from the child.
 /// </summary>
 /// <param name="child"></param>
 /// <param name="columns"></param>
 /// <param name="groupMaxColumn"></param>
 /// <param name="functionList"></param>
 /// <param name="nameList"></param>
 public GroupNode(IQueryPlanNode child, ObjectName[] columns, ObjectName groupMaxColumn, Expression[] functionList, string[] nameList)
     : base(child)
 {
     this.columns = columns;
     this.groupMaxColumn = groupMaxColumn;
     this.functionList = functionList;
     this.nameList = nameList;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:16,代码来源:GroupNode.cs

示例9: GroupNode

 public GroupNode(IQueryPlanNode child, ObjectName[] columnNames, ObjectName groupMaxColumn, SqlExpression[] functions, string[] names)
     : base(child)
 {
     ColumnNames = columnNames;
     GroupMaxColumn = groupMaxColumn;
     Functions = functions;
     Names = names;
 }
开发者ID:prepare,项目名称:deveeldb,代码行数:8,代码来源:GroupNode.cs

示例10: PlanTableSource

 // How this plan is naturally joined to other plans in the source.  A
 // plan either has no dependance, a left or a right dependance, or a left
 // and right dependance.
 public PlanTableSource(IQueryPlanNode plan, ObjectName[] variables, string[] uniqueNames)
 {
     Plan = plan;
     VariableNames = variables;
     UniqueNames = uniqueNames;
     LeftJoinType = JoinType.None;
     RightJoinType = JoinType.None;
     IsUpdated = false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:12,代码来源:PlanTableSource.cs

示例11: DefineView

        public static void DefineView(this IQuery context, ObjectName viewName, IQueryPlanNode queryPlan, bool replaceIfExists)
        {
            // We have to execute the plan to get the TableInfo that represents the
            // result of the view execution.
            var table = queryPlan.Evaluate(context);
            var tableInfo = table.TableInfo.Alias(viewName);

            var viewInfo = new ViewInfo(tableInfo, null, queryPlan);
            context.DefineView(viewInfo, replaceIfExists);
        }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:10,代码来源:QueryExtensions.cs

示例12: ViewInfo

        public ViewInfo(TableInfo tableInfo, SqlQueryExpression queryExpression, IQueryPlanNode queryPlan)
        {
            if (tableInfo == null)
                throw new ArgumentNullException("tableInfo");
            if (queryExpression == null)
                throw new ArgumentNullException("queryExpression");

            TableInfo = tableInfo;
            QueryExpression = queryExpression;
            QueryPlan = queryPlan;
        }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:11,代码来源:ViewInfo.cs

示例13: SerializeQueryPlan

        public static void SerializeQueryPlan(this ISystemContext context, IQueryPlanNode node, BinaryWriter writer)
        {
            var nodeType = node.GetType();

            var serializers = context.ResolveAllServices<IQueryPlanNodeSerializer>();
            foreach (var serializer in serializers) {
                if (serializer.CanSerialize(nodeType)) {
                    serializer.Serialize(node, writer);
                    return;
                }
            }

            throw new InvalidOperationException(string.Format("Could not find any serializer for node type '{0}'.", nodeType));
        }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:14,代码来源:SystemContextExtensions.cs

示例14: TablePlan

        public TablePlan(IQueryPlanNode plan, ObjectName[] columnNames, string[] uniqueNames)
        {
            if (plan == null)
                throw new ArgumentNullException("plan");
            if (columnNames == null)
                throw new ArgumentNullException("columnNames");

            Plan = plan;
            ColumnNames = columnNames;
            UniqueNames = uniqueNames;
            LeftJoinType = JoinType.None;
            RightJoinType = JoinType.None;
            IsUpdated = false;
        }
开发者ID:prepare,项目名称:deveeldb,代码行数:14,代码来源:TablePlan.cs

示例15: UpdateTable

        public static int UpdateTable(this IQuery context, ObjectName tableName, IQueryPlanNode queryPlan,
			IEnumerable<SqlAssignExpression> assignments, int limit)
        {
            var columnNames = assignments.Select(x => x.ReferenceExpression)
                .Cast<SqlReferenceExpression>()
                .Select(x => x.ReferenceName.Name).ToArray();

            if (!context.UserCanUpdateTable(tableName, columnNames))
                throw new MissingPrivilegesException(context.UserName(), tableName, Privileges.Update);

            if (!context.UserCanSelectFromPlan(queryPlan))
                throw new InvalidOperationException();

            var table = context.GetMutableTable(tableName);
            if (table == null)
                throw new ObjectNotFoundException(tableName);

            var updateSet = queryPlan.Evaluate(context);
            return table.Update(context, updateSet, assignments, limit);
        }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:20,代码来源:QueryExtensions.Commands.cs


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