mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
Merge branch 'master-rob2' into issue-2774/encryption-support-for-in
This commit is contained in:
commit
5170b9f329
23 files changed
+412
-26
No files matched your search
@@ -121,7 +121,7 @@ public interface SpiOrmQueryRequest<T> extends BeanQueryRequest<T>, DocQueryRequ
|
||||
<K> Map<K, T> findMap();
|
||||
|
||||
/**
|
||||
* Execute the findSingleAttributeList query.
|
||||
* Execute the findSingleAttributeCollection query.
|
||||
*/
|
||||
<A extends Collection<?>> A findSingleAttributeCollection(A collection);
|
||||
|
||||
|
||||
+5
@@ -237,6 +237,11 @@ public class DefaultExpressionFactory implements SpiExpressionFactory {
|
||||
return and(le(lowProperty, value), gtOrNull(highProperty, value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Expression inRangeWithProperties(String propertyName, String lowProperty, String highProperty) {
|
||||
return raw(lowProperty + " <= " + propertyName + " and (" + propertyName + " < " + highProperty + " or " + highProperty + " is null)");
|
||||
}
|
||||
|
||||
/**
|
||||
* Between - property between the two given values.
|
||||
*/
|
||||
|
||||
@@ -833,6 +833,11 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
|
||||
return add(expr.inRangeWith(lowProperty, highProperty, value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> inRangeWithProperties(String propertyName, String lowProperty, String highProperty) {
|
||||
return add(expr.inRangeWithProperties(propertyName, lowProperty, highProperty));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> inRange(String propertyName, Object value1, Object value2) {
|
||||
return add(expr.inRange(propertyName, value1, value2));
|
||||
|
||||
@@ -279,6 +279,11 @@ final class JunctionExpression<T> implements SpiJunction<T>, SpiExpression, Expr
|
||||
return exprList.inRangeWith(lowProperty, highProperty, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> inRangeWithProperties(String propertyName, String lowProperty, String highProperty) {
|
||||
return exprList.inRangeWithProperties(propertyName, lowProperty, highProperty);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExpressionList<T> inRange(String propertyName, Object value1, Object value2) {
|
||||
return exprList.inRange(propertyName, value1, value2);
|
||||
|
||||
@@ -106,7 +106,7 @@ public class UuidV1RndIdGenerator implements PlatformIdGenerator {
|
||||
|
||||
delta = current - last;
|
||||
if (delta < -10000 * 20000) {
|
||||
log.log(INFO, "Clock skew of {} ms detected", delta / -10000);
|
||||
log.log(INFO, "Clock skew of {0} ms detected", delta / -10000);
|
||||
// The clock was adjusted back about 2 seconds, or we were generating a lot of ids too fast
|
||||
// if so, we try to set the current as last and also increment the clockSeq.
|
||||
lock.lock();
|
||||
|
||||
@@ -885,6 +885,9 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
public final void preCommit() {
|
||||
internalBatchFlush();
|
||||
firePreCommit();
|
||||
// we must flush the batch queue again, because the callback can
|
||||
// modify current transaction
|
||||
internalBatchFlush();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -61,7 +61,7 @@ final class ScalarTypeCalendar extends ScalarTypeBaseDateTime<Calendar> {
|
||||
|
||||
@Override
|
||||
protected String toJsonNanos(Calendar value) {
|
||||
return String.valueOf(value.getTime());
|
||||
return String.valueOf(value.getTime().getTime());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.sql.Timestamp;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeParseException;
|
||||
|
||||
/**
|
||||
* ScalarType for java.sql.Timestamp.
|
||||
@@ -48,7 +49,7 @@ final class ScalarTypeLocalDateTime extends ScalarTypeBaseDateTime<LocalDateTime
|
||||
|
||||
@Override
|
||||
public LocalDateTime jsonRead(JsonParser parser) throws IOException {
|
||||
return LocalDateTime.parse(parser.getText());
|
||||
return parse(parser.getText());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,7 +64,11 @@ final class ScalarTypeLocalDateTime extends ScalarTypeBaseDateTime<LocalDateTime
|
||||
|
||||
@Override
|
||||
public LocalDateTime parse(String value) {
|
||||
return LocalDateTime.parse(value);
|
||||
try {
|
||||
return LocalDateTime.parse(value);
|
||||
} catch (DateTimeParseException pe) {
|
||||
return super.parse(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user