mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-24 23:56:36 +00:00
#500 - Change raw(String, Object[]) expression to varargs raw(String, Object...)
This commit is contained in:
@@ -785,7 +785,7 @@ public interface ExpressionList<T> extends Serializable {
|
||||
* qualified) will still be translated to their physical name.
|
||||
* </p>
|
||||
*/
|
||||
ExpressionList<T> raw(String raw, Object[] values);
|
||||
ExpressionList<T> raw(String raw, Object... values);
|
||||
|
||||
/**
|
||||
* Add raw expression with no parameters.
|
||||
|
||||
@@ -572,7 +572,7 @@ abstract class JunctionExpression<T> implements Junction<T>, SpiExpression, Expr
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> raw(String raw, Object[] values) {
|
||||
public ExpressionList<T> raw(String raw, Object... values) {
|
||||
return exprList.raw(raw, values);
|
||||
}
|
||||
|
||||
|
||||
@@ -696,7 +696,7 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> raw(String raw, Object[] values) {
|
||||
public ExpressionList<T> raw(String raw, Object... values) {
|
||||
add(expr.raw(raw, values));
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TestWhereRawClause extends BaseTestCase {
|
||||
.ne("id", 42)
|
||||
.raw("orderQty < ?", 100)
|
||||
.gt("id", 1)
|
||||
.raw("unitPrice > ? and product.id > ?", new Object[]{2,3})
|
||||
.raw("unitPrice > ? and product.id > ?", 2, 3)
|
||||
.findList();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user