🛠️ Code cleanup & added many new features #1

Merged
gnmyt merged 121 commits from features/code-cleanup into master 2021-09-02 13:34:00 +00:00
3 changed files with 4 additions and 3 deletions
Showing only changes of commit e58d96b58a - Show all commits

View File

@ -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
*/ */

View File

@ -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;
} }

View File

@ -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) -> {