projects
/
mir.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7b7cb06
)
comment out some debug logging that spews out each SQL select, insert, etc..
author
mh
<mh>
Tue, 10 Dec 2002 09:05:07 +0000
(09:05 +0000)
committer
mh
<mh>
Tue, 10 Dec 2002 09:05:07 +0000
(09:05 +0000)
source/mir/storage/Database.java
patch
|
blob
|
history
diff --git
a/source/mir/storage/Database.java
b/source/mir/storage/Database.java
index
f2182ac
..
a571908
100755
(executable)
--- a/
source/mir/storage/Database.java
+++ b/
source/mir/storage/Database.java
@@
-55,7
+55,7
@@
import mir.misc.*;
* Treiber, Host, User und Passwort, ueber den der Zugriff auf die
* Datenbank erfolgt.
*
* Treiber, Host, User und Passwort, ueber den der Zugriff auf die
* Datenbank erfolgt.
*
- * @version $Revision: 1.21.2.
2 $ $Date: 2002/11/26 01:52:55
$
+ * @version $Revision: 1.21.2.
3 $ $Date: 2002/12/10 09:05:07
$
* @author $Author: mh $
*
*/
* @author $Author: mh $
*
*/
@@
-720,7
+720,7
@@
public class Database implements StorageObject {
// insert into db
StringBuffer sqlBuf = new StringBuffer("insert into ").append(theTable).append("(").append(f).append(") values (").append(v).append(")");
String sql = sqlBuf.toString();
// insert into db
StringBuffer sqlBuf = new StringBuffer("insert into ").append(theTable).append("(").append(f).append(") values (").append(v).append(")");
String sql = sqlBuf.toString();
- theLog.printInfo("INSERT: " + sql);
+
//
theLog.printInfo("INSERT: " + sql);
con = getPooledCon();
con.setAutoCommit(false);
pstmt = con.prepareStatement(sql);
con = getPooledCon();
con.setAutoCommit(false);
pstmt = con.prepareStatement(sql);
@@
-837,7
+837,7
@@
public class Database implements StorageObject {
}
}
sql.append(" where id=").append(id);
}
}
sql.append(" where id=").append(id);
- theLog.printInfo("UPDATE: " + sql);
+
//
theLog.printInfo("UPDATE: " + sql);
// execute sql
try {
con = getPooledCon();
// execute sql
try {
con = getPooledCon();
@@
-885,7
+885,7
@@
public class Database implements StorageObject {
Statement stmt = null; Connection con = null;
int res = 0;
String sql="delete from "+theTable+" where "+thePKeyName+"='"+id+"'";
Statement stmt = null; Connection con = null;
int res = 0;
String sql="delete from "+theTable+" where "+thePKeyName+"='"+id+"'";
- theLog.printInfo("DELETE " + sql);
+
//
theLog.printInfo("DELETE " + sql);
try {
con = getPooledCon(); stmt = con.createStatement();
res = stmt.executeUpdate(sql);
try {
con = getPooledCon(); stmt = con.createStatement();
res = stmt.executeUpdate(sql);
@@
-1093,8
+1093,7
@@
public class Database implements StorageObject {
freeConnection(con,stmt);
}
//theLog.printInfo(theTable + " has "+ result +" rows where " + where);
freeConnection(con,stmt);
}
//theLog.printInfo(theTable + " has "+ result +" rows where " + where);
- theLog.printInfo((System.currentTimeMillis() - startTime) + "ms. for: "
- + sql);
+ //theLog.printInfo((System.currentTimeMillis() - startTime) + "ms. for: " + sql);
return result;
}
return result;
}
@@
-1106,8
+1105,7
@@
public class Database implements StorageObject {
try
{
rs = stmt.executeUpdate(sql);
try
{
rs = stmt.executeUpdate(sql);
- theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: "
- + sql);
+ //theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: " + sql);
}
catch (SQLException e)
{
}
catch (SQLException e)
{
@@
-1130,12
+1128,11
@@
public class Database implements StorageObject {
result = pstmt.executeUpdate();
}
catch (Exception e) {
result = pstmt.executeUpdate();
}
catch (Exception e) {
- theLog.printDebugInfo("
settimage :: setImage gescheitert
: "+e.toString());
+ theLog.printDebugInfo("
executeUpdate failed
: "+e.toString());
throw new StorageObjectException("executeUpdate failed: "+e.toString());
}
finally { freeConnection(con,pstmt); }
throw new StorageObjectException("executeUpdate failed: "+e.toString());
}
finally { freeConnection(con,pstmt); }
- theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: "
- + sql);
+ //theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: " + sql);
return result;
}
return result;
}
@@
-1185,7
+1182,7
@@
public class Database implements StorageObject {
try {
con = getPooledCon();
pstmt = con.prepareStatement(sql);
try {
con = getPooledCon();
pstmt = con.prepareStatement(sql);
- theLog.printInfo("METADATA: " + sql);
+
//
theLog.printInfo("METADATA: " + sql);
ResultSet rs = pstmt.executeQuery();
evalMetaData(rs.getMetaData());
rs.close();
ResultSet rs = pstmt.executeQuery();
evalMetaData(rs.getMetaData());
rs.close();