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


C# Expressions.SqlExpression类代码示例

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


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

示例1: MakeupFunctions

        private static int MakeupFunctions(PreparedQuerySelectColumns columnSet, IList<SqlExpression> aggregateFunctions, out SqlExpression[] defFunList, out string[] defFunNames)
        {
            // Make up the functions list,
            var functionsList = columnSet.FunctionColumns.ToList();
            int fsz = functionsList.Count;
            var completeFunList = new List<object>();
            for (int i = 0; i < fsz; ++i) {
                var scol = functionsList[i];
                completeFunList.Add(scol.Expression);
                completeFunList.Add(scol.InternalName.Name);
            }

            for (int i = 0; i < aggregateFunctions.Count; ++i) {
                completeFunList.Add(aggregateFunctions[i]);
                completeFunList.Add("HAVINGAGG_" + (i + 1));
            }

            int fsz2 = completeFunList.Count / 2;
            defFunList = new SqlExpression[fsz2];
            defFunNames = new string[fsz2];
            for (int i = 0; i < fsz2; ++i) {
                defFunList[i] = (SqlExpression)completeFunList[i * 2];
                defFunNames[i] = (string)completeFunList[(i * 2) + 1];
            }

            return fsz;
        }
开发者ID:prepare,项目名称:deveeldb,代码行数:27,代码来源:QueryPlanner.cs

示例2: WhileLoopStatement

        public WhileLoopStatement(SqlExpression conditionExpression)
        {
            if (conditionExpression == null)
                throw new ArgumentNullException("conditionExpression");

            ConditionExpression = conditionExpression;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:WhileLoopStatement.cs

示例3: Visit

        public override SqlExpression Visit(SqlExpression expression)
        {
            if (expression is QueryReferenceExpression)
                VisitQueryReference((QueryReferenceExpression) expression);

            return base.Visit(expression);
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:QueryReferencesVisitor.cs

示例4: JoinAt

 public void JoinAt(int betweenIndex, JoinType joinType, SqlExpression onExpression)
 {
     var planLeft = tablePlans[betweenIndex];
     var planRight = tablePlans[betweenIndex + 1];
     planLeft.RightJoin(planRight, joinType, onExpression);
     planRight.LeftJoin(planLeft, joinType, onExpression);
 }
开发者ID:prepare,项目名称:deveeldb,代码行数:7,代码来源:QueryTablePlanner.cs

示例5: ToSqlString

        public string ToSqlString(SqlExpression expression)
        {
            rootQuery = expression is SqlQueryExpression;

            Visit(expression);
            return builder.ToString();
        }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:7,代码来源:ExpressionStringBuilder.cs

示例6: 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

示例7: 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

示例8: SetPasswordAction

        public SetPasswordAction(SqlExpression passwordExpression)
        {
            if (passwordExpression == null)
                throw new ArgumentNullException("passwordExpression");

            PasswordExpression = passwordExpression;
        }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:7,代码来源:SetPasswordAction.cs

示例9: InvokeArgument

        public InvokeArgument(string name, SqlExpression value)
        {
            if (value == null)
                throw new ArgumentNullException("value");

            Name = name;
            Value = value;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:8,代码来源:InvokeArgument.cs

示例10: SelectColumn

        /// <summary>
        /// Constructs a new <see cref="SelectColumn"/> for the given
        /// expression and aliased with the given name.
        /// </summary>
        /// <param name="expression">The <see cref="Expression"/> used for select
        /// a column within a <c>SELECT</c> statement.</param>
        /// <param name="alias">The name to alias the resulted expression.</param>
        public SelectColumn(SqlExpression expression, string alias)
        {
            if (expression == null)
                throw new ArgumentNullException("expression");

            Expression = expression;
            Alias = alias;
        }
开发者ID:furesoft,项目名称:deveeldb,代码行数:15,代码来源:SelectColumn.cs

示例11: ExpressionReference

        public ExpressionReference(SqlExpression expression, string @alias)
        {
            if (expression == null)
                throw new ArgumentNullException("expression");

            Alias = alias;
            Expression = expression;
        }
开发者ID:prepare,项目名称:deveeldb,代码行数:8,代码来源:ExpressionReference.cs

示例12: 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

示例13: CheckViolationException

        internal CheckViolationException(ObjectName tableName, string constraintName, SqlExpression expression,
			ConstraintDeferrability deferrability)
            : base(SystemErrorCodes.CheckViolation, FormatMessage(tableName, constraintName, expression, deferrability))
        {
            TableName = tableName;
            ConstraintName = constraintName;
            CheckExpression = expression;
            Deferrability = deferrability;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:9,代码来源:CheckViolationException.cs

示例14: JoinPart

        internal JoinPart(JoinType joinType, SqlQueryExpression subQuery, SqlExpression onExpression)
        {
            if (subQuery == null)
                throw new ArgumentNullException("subQuery");

            OnExpression = onExpression;
            JoinType = joinType;
            SubQuery = subQuery;
        }
开发者ID:furesoft,项目名称:deveeldb,代码行数:9,代码来源:JoinPart.cs

示例15: FunctionTable

        public FunctionTable(ITable table, SqlExpression[] functionList, string[] columnNames, IRequest queryContext)
            : base(queryContext.Context)
        {
            // Make sure we are synchronized over the class.
            lock (typeof(FunctionTable)) {
                uniqueId = uniqueKeySeq;
                ++uniqueKeySeq;
            }

            uniqueId = (uniqueId & 0x0FFFFFFF) | 0x010000000;

            context = queryContext;

            ReferenceTable = table;
            varResolver = table.GetVariableResolver();
            varResolver = varResolver.ForRow(0);

            // Create a DataTableInfo object for this function table.
            funTableInfo = new TableInfo(FunctionTableName);

            expList = new SqlExpression[functionList.Length];
            expInfo = new byte[functionList.Length];

            // Create a new DataColumnInfo for each expression, and work out if the
            // expression is simple or not.
            for (int i = 0; i < functionList.Length; ++i) {
                var expr = functionList[i];
                // Examine the expression and determine if it is simple or not
                if (expr.IsConstant() && !expr.HasAggregate(context)) {
                    // If expression is a constant, solve it
                    var result = expr.Evaluate(context, null);
                    if (result.ExpressionType != SqlExpressionType.Constant)
                        throw new InvalidOperationException();

                    expr = result;
                    expList[i] = expr;
                    expInfo[i] = 1;
                } else {
                    // Otherwise must be dynamic
                    expList[i] = expr;
                    expInfo[i] = 0;
                }

                // Make the column info
                funTableInfo.AddColumn(columnNames[i], expr.ReturnType(context, varResolver));
            }

            // Make sure the table info isn't changed from this point on.
            funTableInfo = funTableInfo.AsReadOnly();

            // routine tables are the size of the referring table.
            rowCount = table.RowCount;

            // Set schemes to 'blind search'.
            SetupIndexes(DefaultIndexTypes.BlindSearch);
        }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:56,代码来源:FunctionTable.cs


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