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


C# Ast.HqlExpression类代码示例

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


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

示例1: AddOrderByClause

        public void AddOrderByClause(HqlExpression orderBy, HqlDirectionStatement direction)
        {
            var orderByRoot = Root.NodesPreOrder.Where(n => n is HqlOrderBy).FirstOrDefault();

            if (orderByRoot == null)
            {
                orderByRoot = TreeBuilder.OrderBy();
                Root.As<HqlQuery>().AddChild(orderByRoot);
            }

            orderByRoot.AddChild(orderBy);
            orderByRoot.AddChild(direction);
        }
开发者ID:Mrding,项目名称:Ribbon,代码行数:13,代码来源:IntermediateHqlTree.cs

示例2: ConvertBooleanToCase

		public static HqlExpression ConvertBooleanToCase(HqlExpression node)
		{
			if (node is HqlBooleanExpression)
			{
				var builder = new HqlTreeBuilder();

				return builder.Case(
					new[] {builder.When(node, builder.True())},
					builder.False());
			}

			return node;
		}
开发者ID:snbbgyth,项目名称:WorkFlowEngine,代码行数:13,代码来源:SelectClauseVisitor.cs

示例3: BuildHql

        public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject,
            ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor)
        {
            // There is a problem with NHibernate when an identifier matches an entity's name. The resulting
            // SQL may be null in that situation. The searchTable's name is split in 2 identifiers to mitigate the problem.
            string searchTable = (string)((ConstantExpression)arguments[2]).Value;
            var searchTableFullName = searchTable.Split('.');
            if (searchTableFullName.Length != 2)
                throw new FrameworkException("FullTextSearch table name '" + searchTable + "' must have format 'schema.table'.");

            string searchColumns = (string)((ConstantExpression)arguments[3]).Value;

            var parameters = new HqlExpression[]
            {
                visitor.Visit(arguments[0]).AsExpression(),
                visitor.Visit(arguments[1]).AsExpression(),
                treeBuilder.Ident(searchTableFullName[0]),
                treeBuilder.Ident(searchTableFullName[1]),
                treeBuilder.Ident(searchColumns),
            };

            return treeBuilder.BooleanMethodCall("FullTextSearch", parameters);
        }
开发者ID:kmeze,项目名称:Rhetos,代码行数:23,代码来源:FullTextSearchNHibernateExtension.cs

示例4: Indices

		public HqlTreeNode Indices(HqlExpression dictionary)
		{
			return new HqlIndices(_factory, dictionary);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例5: Coalesce

		public HqlTreeNode Coalesce(HqlExpression lhs, HqlExpression rhs)
		{
			return new HqlCoalesce(_factory, lhs, rhs);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例6: LeftFetchJoin

		public HqlLeftFetchJoin LeftFetchJoin(HqlExpression expression, HqlAlias @alias)
		{
			return new HqlLeftFetchJoin(_factory, expression, @alias);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例7: IsNotNull

		public HqlIsNotNull IsNotNull(HqlExpression lhs)
		{
			return new HqlIsNotNull(_factory, lhs);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例8: Join

		public HqlJoin Join(HqlExpression expression, HqlAlias @alias)
		{
			return new HqlJoin(_factory, expression, @alias);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例9: Min

		public HqlMin Min(HqlExpression expression)
		{
			return new HqlMin(_factory, expression);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例10: Select

		public HqlSelect Select(HqlExpression expression)
		{
			return new HqlSelect(_factory, expression);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例11: Take

		public HqlTake Take(HqlExpression parameter)
		{
			return new HqlTake(_factory, parameter);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例12: Skip

		public HqlSkip Skip(HqlExpression parameter)
		{
			return new HqlSkip(_factory, parameter);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例13: Where

		public HqlWhere Where(HqlExpression expression)
		{
			return new HqlWhere(_factory, expression);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例14: Dot

		public HqlDot Dot(HqlExpression lhs, HqlExpression rhs)
		{
			return new HqlDot(_factory, lhs, rhs);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs

示例15: Divide

		public HqlDivide Divide(HqlExpression lhs, HqlExpression rhs)
		{
			return new HqlDivide(_factory, lhs, rhs);
		}
开发者ID:rytmis,项目名称:nhibernate-core,代码行数:4,代码来源:HqlTreeBuilder.cs


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