當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。