mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 06:56:10 +00:00
Renommage colonnes
This commit is contained in:
parent
d4d9f8017b
commit
0d81ea6799
3 changed files with 12 additions and 12 deletions
|
|
@ -49,18 +49,18 @@ Future<Item> getItemWithId(String id) async {
|
|||
}
|
||||
|
||||
Future<Item> loadChildrenItems(Item item) async {
|
||||
print("getChildrenItems " + item.Discriminator);
|
||||
if (item.Discriminator.endsWith("Items")) {
|
||||
String discriminator =
|
||||
item.Discriminator.substring(0, item.Discriminator.length - 1);
|
||||
print("getChildrenItems " + item.ItemType);
|
||||
if (item.ItemType.endsWith("Items")) {
|
||||
String itemType =
|
||||
item.ItemType.substring(0, item.ItemType.length - 1);
|
||||
String family = "";
|
||||
if (item is MonsterItems) {
|
||||
family = (item as MonsterItems)?.Family ?? "";
|
||||
}
|
||||
final db = await database;
|
||||
var response = await db
|
||||
.query("Items", where: "Discriminator = ? AND MonsterItem_Family = ?",
|
||||
whereArgs: [discriminator, family],
|
||||
.query("Items", where: "ItemType = ? AND Family = ?",
|
||||
whereArgs: [itemType, family],
|
||||
orderBy: "NormalizedName");
|
||||
if (response.isEmpty) {
|
||||
print("Id not found");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue