This commit is contained in:
@@ -89,10 +89,6 @@ public abstract class FindAllQuery<T extends PersistentRecord>
|
||||
_builder.newQuery(new SelectClause<T>(_type, _marsh.getPrimaryKeyFields(), _clauses));
|
||||
PreparedStatement stmt = _builder.prepare(conn);
|
||||
try {
|
||||
if (PersistenceContext.DEBUG) {
|
||||
log.info("KEY QUERY: " + stmt);
|
||||
}
|
||||
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
Key<T> key = _marsh.makePrimaryKey(rs);
|
||||
@@ -145,10 +141,6 @@ public abstract class FindAllQuery<T extends PersistentRecord>
|
||||
|
||||
// and execute it
|
||||
try {
|
||||
if (PersistenceContext.DEBUG) {
|
||||
log.info("VALUE QUERY: " + stmt);
|
||||
}
|
||||
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
int cnt = 0, dups = 0;
|
||||
while (rs.next()) {
|
||||
@@ -201,10 +193,6 @@ public abstract class FindAllQuery<T extends PersistentRecord>
|
||||
List<T> result = new ArrayList<T>();
|
||||
PreparedStatement stmt = _builder.prepare(conn);
|
||||
try {
|
||||
if (PersistenceContext.DEBUG) {
|
||||
log.info("QUERY: " + stmt);
|
||||
}
|
||||
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
result.add(_marsh.createObject(rs));
|
||||
|
||||
@@ -68,10 +68,6 @@ public class FindOneQuery<T extends PersistentRecord>
|
||||
{
|
||||
PreparedStatement stmt = _builder.prepare(conn);
|
||||
try {
|
||||
if (PersistenceContext.DEBUG) {
|
||||
log.info("KEY QUERY: " + stmt);
|
||||
}
|
||||
|
||||
T result = null;
|
||||
ResultSet rs = stmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
|
||||
@@ -33,6 +33,8 @@ import com.samskivert.jdbc.depot.annotation.FullTextIndex;
|
||||
import com.samskivert.jdbc.depot.annotation.GeneratedValue;
|
||||
import com.samskivert.jdbc.depot.clause.QueryClause;
|
||||
|
||||
import static com.samskivert.jdbc.depot.Log.log;
|
||||
|
||||
/**
|
||||
* At the heart of Depot's SQL generation, this object constructs two {@link ExpressionVisitor}
|
||||
* objects and executes them, one after another; the first one constructs SQL as it recurses, the
|
||||
@@ -88,6 +90,11 @@ public abstract class SQLBuilder
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to find SQL parameters", e);
|
||||
}
|
||||
|
||||
if (PersistenceContext.DEBUG) {
|
||||
log.info("SQL: " + stmt.toString());
|
||||
}
|
||||
|
||||
return stmt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user