Esempio n. 1
0
 public override IProjection TrimMethod(TrimMethod method, Expression[] arguments)
 {
     return(new SqlFunctionProjection(
                "trim",
                NHibernateUtil.String,
                ProjectionVisitor.CreateProjection(arguments[0])
                ));
 }
Esempio n. 2
0
        public Expression TrimMethod(TrimMethod method, LiteralExpression[] arguments)
        {
            if (LiteralUtil.IsAnyNull(arguments))
            {
                return(new LiteralExpression(null, LiteralType.Null));
            }
            else
            {
                string result = LiteralUtil.CoerceString(arguments[0]).Trim();

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