mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-24 10:38:57 +00:00
#356 - ENH: Change to Binder logging such that the value in the bind log is the converted/bound value
This commit is contained in:
@@ -142,11 +142,12 @@ public class Binder {
|
||||
/**
|
||||
* Bind an Object with unknown data type.
|
||||
*/
|
||||
public void bindObject(DataBind dataBind, Object value) throws SQLException {
|
||||
public Object bindObject(DataBind dataBind, Object value) throws SQLException {
|
||||
|
||||
if (value == null) {
|
||||
// null of unknown type
|
||||
bindObject(dataBind, null, Types.OTHER);
|
||||
return null;
|
||||
|
||||
} else {
|
||||
|
||||
@@ -163,6 +164,7 @@ public class Binder {
|
||||
|
||||
int dbType = type.getJdbcType();
|
||||
bindObject(dataBind, value, dbType);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ public class CQueryPredicates {
|
||||
|
||||
for (int i = 0; i < whereExprBindValues.size(); i++) {
|
||||
Object bindValue = whereExprBindValues.get(i);
|
||||
binder.bindObject(dataBind, bindValue);
|
||||
bindValue = binder.bindObject(dataBind, bindValue);
|
||||
if (i > 0 || idValue != null) {
|
||||
bindLog.append(",");
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public class CQueryPredicates {
|
||||
|
||||
for (int i = 0; i < filterManyExprBindValues.size(); i++) {
|
||||
Object bindValue = filterManyExprBindValues.get(i);
|
||||
binder.bindObject(dataBind, bindValue);
|
||||
bindValue = binder.bindObject(dataBind, bindValue);
|
||||
if (i > 0 || idValue != null) {
|
||||
bindLog.append(",");
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public class CQueryPredicates {
|
||||
bindLog.append(" having ");
|
||||
for (int i = 0; i < havingExprBindValues.size(); i++) {
|
||||
Object bindValue = havingExprBindValues.get(i);
|
||||
binder.bindObject(dataBind, bindValue);
|
||||
bindValue = binder.bindObject(dataBind, bindValue);
|
||||
if (i > 0) {
|
||||
bindLog.append(",");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user