Merge remote-tracking branch 'origin/master'
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed
Dieser Commit ist enthalten in:
Commit
73a6e80c49
@ -31,7 +31,7 @@ public class SelectStatement<T> extends Statement {
|
|||||||
private final Table<T> table;
|
private final Table<T> table;
|
||||||
|
|
||||||
SelectStatement(Table<T> table, String... kfields) {
|
SelectStatement(Table<T> table, String... kfields) {
|
||||||
this(table, "SELECT " + Arrays.stream(table.fields).map(f -> f.identifier).collect(Collectors.joining(", ")) + " FROM " + table.name + " WHERE " + Arrays.stream(kfields).map(f -> f + Statement.NULL_SAFE_EQUALS + "?").collect(Collectors.joining(" AND ")));
|
this(table, "SELECT " + Arrays.stream(table.fields).map(f -> f.identifier).collect(Collectors.joining(", ")) + " FROM " + table.name + " WHERE " + Arrays.stream(kfields).map(f -> f + " = ?").collect(Collectors.joining(" AND ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SelectStatement(Table<T> table, String sql) {
|
public SelectStatement(Table<T> table, String sql) {
|
||||||
|
@ -75,7 +75,7 @@ public class Table<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Statement updateFields(String[] fields, String... kfields) {
|
public Statement updateFields(String[] fields, String... kfields) {
|
||||||
return new Statement("UPDATE " + name + " SET " + Arrays.stream(fields).map(f -> f + " = ?").collect(Collectors.joining(", ")) + " WHERE " + Arrays.stream(kfields).map(f -> f + Statement.NULL_SAFE_EQUALS + "?").collect(Collectors.joining(" AND ")));
|
return new Statement("UPDATE " + name + " SET " + Arrays.stream(fields).map(f -> f + " = ?").collect(Collectors.joining(", ")) + " WHERE " + Arrays.stream(kfields).map(f -> f + " = ?").collect(Collectors.joining(" AND ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Statement insert(String name) {
|
public Statement insert(String name) {
|
||||||
@ -100,7 +100,7 @@ public class Table<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Statement deleteFields(String... kfields) {
|
public Statement deleteFields(String... kfields) {
|
||||||
return new Statement("DELETE FROM " + name + " WHERE " + Arrays.stream(kfields).map(f -> f + Statement.NULL_SAFE_EQUALS + "?").collect(Collectors.joining(" AND ")));
|
return new Statement("DELETE FROM " + name + " WHERE " + Arrays.stream(kfields).map(f -> f + " = ?").collect(Collectors.joining(" AND ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ensureExistanceInSqlite() {
|
void ensureExistanceInSqlite() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren