Example #1
0
 public override IProjection LengthMethod(LengthMethod method, Expression[] arguments)
 {
     return(new SqlFunctionProjection(
                "length",
                NHibernateUtil.Int32,
                ProjectionVisitor.CreateProjection(arguments[0])
                ));
 }
Example #2
0
        public Expression LengthMethod(LengthMethod method, LiteralExpression[] arguments)
        {
            if (LiteralUtil.IsAnyNull(arguments))
            {
                return(new LiteralExpression(null, LiteralType.Null));
            }
            else
            {
                int result = LiteralUtil.CoerceString(arguments[0]).Length;

                return(new LiteralExpression(result, LiteralType.Int));
            }
        }
 public virtual TResult LengthMethod(LengthMethod method, Expression[] arguments)
 {
     throw new QueryNotSupportException();
 }