Add List
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2023-05-18 14:23:23 +02:00
Ursprung b4ce9493d1
Commit eedc949672

Datei anzeigen

@ -26,6 +26,8 @@ import de.steamwar.sql.internal.Table;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.List;
@AllArgsConstructor
@Getter
public class Script {
@ -34,6 +36,7 @@ public class Script {
private static final SelectStatement<Script> select = table.select(Table.PRIMARY);
private static final SelectStatement<Script> selectNameUser = table.select("nameUser");
private static final SelectStatement<Script> list = new SelectStatement<Script>(table, "SELECT Id, User, Name FROM Script WHERE User = ?");
private static final Statement update = table.updateFields(new String[]{"name"}, Table.PRIMARY);
private static final Statement insert = table.insertAll();
@ -55,6 +58,10 @@ public class Script {
return get(id);
}
public static List<Script> list(SteamwarUser user) {
return list.listSelect(user);
}
@Field(keys = Table.PRIMARY, autoincrement = true)
private final int id;
@Field(keys = "nameUser")