🛠️ Code cleanup & added many new features #1
@ -40,6 +40,7 @@ public class TableFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a storage medium from the list
|
* Gets a storage medium from the list
|
||||||
|
*
|
||||||
* @param storageClass The class of the storage medium you want to get
|
* @param storageClass The class of the storage medium you want to get
|
||||||
* @return the storage medium
|
* @return the storage medium
|
||||||
*/
|
*/
|
||||||
|
@ -135,9 +135,7 @@ public class DataBaseSelection {
|
|||||||
messageBuilder.append((added.get()) ? ", " : "").append(v);
|
messageBuilder.append((added.get()) ? ", " : "").append(v);
|
||||||
added.set(true);
|
added.set(true);
|
||||||
});
|
});
|
||||||
StackTraceElement[] st = Thread.currentThread().getStackTrace();
|
LOG.debug("Statement: " + messageBuilder);
|
||||||
StackTraceElement stack = st[st.length - 1];
|
|
||||||
LOG.debug("DEBUG <" + stack.getFileName() + ":" + stack.getLineNumber() + "> Statement: " + messageBuilder);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,11 +167,13 @@ public class UpdateManager {
|
|||||||
sb.append("UPDATE ").append(tableName);
|
sb.append("UPDATE ").append(tableName);
|
||||||
if (!setList.isEmpty()) sb.append(" SET ");
|
if (!setList.isEmpty()) sb.append(" SET ");
|
||||||
AtomicBoolean used = new AtomicBoolean(false);
|
AtomicBoolean used = new AtomicBoolean(false);
|
||||||
|
|
||||||
setList.forEach((str, obj) -> {
|
setList.forEach((str, obj) -> {
|
||||||
if (used.get()) sb.append(", ");
|
if (used.get()) sb.append(", ");
|
||||||
sb.append(str).append(" = ?");
|
sb.append(str).append(" = ?");
|
||||||
used.set(true);
|
used.set(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!whereList.isEmpty()) sb.append(" WHERE ");
|
if (!whereList.isEmpty()) sb.append(" WHERE ");
|
||||||
AtomicBoolean used2 = new AtomicBoolean(false);
|
AtomicBoolean used2 = new AtomicBoolean(false);
|
||||||
whereList.forEach((str, obj) -> {
|
whereList.forEach((str, obj) -> {
|
||||||
|
Reference in New Issue
Block a user