• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Expressions.SqlExpression类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: SelectIntoStatement

        public SelectIntoStatement(SqlQueryExpression queryExpression, SqlExpression reference)
        {
            if (queryExpression == null)
                throw new ArgumentNullException("queryExpression");
            if (reference == null)
                throw new ArgumentNullException("reference");

            QueryExpression = queryExpression;
            Reference = reference;
        }
开发者ID:prepare,项目名称:deveeldb,代码行数:10,代码来源:SelectIntoStatement.cs


示例17: SqlAssignExpression

        internal SqlAssignExpression(SqlExpression reference, SqlExpression valueExpression)
        {
            if (reference == null)
                throw new ArgumentNullException("reference");
            if (valueExpression == null)
                throw new ArgumentNullException("valueExpression");

            ValueExpression = valueExpression;
            Reference = reference;
        }
开发者ID:prepare,项目名称:deveeldb,代码行数:10,代码来源:SqlAssignExpression.cs


示例18: CreateUserStatement

        public CreateUserStatement(string userName, SqlExpression password)
        {
            if (password == null)
                throw new ArgumentNullException("password");
            if (String.IsNullOrEmpty(userName))
                throw new ArgumentNullException("userName");

            UserName = userName;
            Password = password;
        }
开发者ID:ArsenShnurkov,项目名称:deveeldb,代码行数:10,代码来源:CreateUserStatement.cs


示例19: SqlColumnAssignment

        public SqlColumnAssignment(string columnName, SqlExpression expression)
        {
            if (expression == null)
                throw new ArgumentNullException("expression");
            if (String.IsNullOrEmpty(columnName))
                throw new ArgumentNullException("columnName");

            ColumnName = columnName;
            Expression = expression;
        }
开发者ID:furesoft,项目名称:deveeldb,代码行数:10,代码来源:SqlColumnAssignment.cs


示例20: VisitBinaryExpression

        public override void VisitBinaryExpression(SqlBinaryExpressionNode expressionNode)
        {
            var left = Build(expressionNode.Left);
            var right = Build(expressionNode.Right);
            var op = expressionNode.Operator;

            var expType = GetBinaryExpressionType(op);

            outputExpression = SqlExpression.Binary(left, expType, right);
        }
开发者ID:prepare,项目名称:deveeldb,代码行数:10,代码来源:ExpressionBuilder.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Expressions.SqlQueryExpression类代码示例发布时间:2022-05-24
下一篇:
C# Sql.Expression类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap