public override IProjection ReplaceMethod(ReplaceMethod method, Expression[] arguments) { return(new SqlFunctionProjection( "replace", NHibernateUtil.String, ProjectionVisitor.CreateProjection(arguments[0]), ProjectionVisitor.CreateProjection(arguments[1]), ProjectionVisitor.CreateProjection(arguments[2]) )); }
public Expression ReplaceMethod(ReplaceMethod method, LiteralExpression[] arguments) { if (LiteralUtil.IsAnyNull(arguments)) { return(new LiteralExpression(null, LiteralType.Null)); } else { string result = LiteralUtil.CoerceString(arguments[0]).Replace( LiteralUtil.CoerceString(arguments[1]), LiteralUtil.CoerceString(arguments[2]) ); return(new LiteralExpression(result, LiteralType.String)); } }
public virtual TResult ReplaceMethod(ReplaceMethod method, Expression[] arguments) { throw new QueryNotSupportException(); }