* Performance: optimized cards database to increase tests and boosters generation;

This commit is contained in:
Oleg Agafonov 2021-08-12 23:59:08 +04:00
parent dc4bde0646
commit 49308bcd4f
3 changed files with 8 additions and 75 deletions

View file

@ -1,71 +1,2 @@
NAME:RB Aggro
1 [SOM:242] Mountain
1 [INV:344] Mountain
1 [INV:345] Mountain
1 [ZEN:242a] Mountain
1 [SHM:294] Mountain
1 [ZEN:242a] Mountain
1 [SHM:295] Mountain
1 [SHM:296] Mountain
1 [ZEN:242a] Mountain
1 [ISD:261] Mountain
1 [ISD:260] Mountain
1 [AVR:240] Mountain
4 [TMP:343] Mountain
1 [RAV:301] Mountain
1 [RAV:300] Mountain
1 [RAV:302] Mountain
1 [M10:244] Mountain
1 [M10:245] Mountain
1 [M10:242] Mountain
1 [M10:243] Mountain
1 [PGRU:4] Mountain
1 [MRD:299] Mountain
1 [SOM:245] Mountain
1 [SOM:244] Mountain
1 [SOM:243] Mountain
1 [CHK:301] Mountain
1 [LRW:294] Mountain
1 [CHK:302] Mountain
1 [LRW:295] Mountain
1 [ALA:242] Mountain
1 [RAV:299] Mountain
1 [LRW:296] Mountain
1 [ALA:243] Mountain
1 [CHK:300] Mountain
1 [LRW:297] Mountain
1 [ALA:244] Mountain
1 [ALA:245] Mountain
1 [M11:245] Mountain
1 [ZEN:242] Mountain
1 [ZEN:243] Mountain
1 [M11:243] Mountain
1 [ZEN:244] Mountain
1 [M11:244] Mountain
1 [M11:242] Mountain
1 [USG:346] Mountain
1 [ZEN:245] Mountain
1 [USG:344] Mountain
1 [USG:345] Mountain
1 [USG:343] Mountain
1 [MRD:300] Mountain
1 [MBS:152] Mountain
1 [MRD:301] Mountain
1 [MRD:302] Mountain
1 [ROE:241] Mountain
1 [CHK:299] Mountain
1 [M12:245] Mountain
1 [M12:244] Mountain
1 [10E:378] Mountain
1 [M12:243] Mountain
1 [ROE:244] Mountain
1 [10E:379] Mountain
1 [M12:242] Mountain
1 [10E:376] Mountain
1 [ROE:242] Mountain
1 [ROE:243] Mountain
1 [TSP:295] Mountain
1 [TSP:294] Mountain
1 [ISD:259] Mountain
LAYOUT MAIN:(2,1)(CMC,true,5)|()([PGRU:4],[SHM:296],[AVR:240],[SHM:295],[SHM:294],[TSP:295],[TSP:294],[10E:379],[SOM:245],[ZEN:242a],[ZEN:245],[10E:378],[SOM:244],[SOM:243],[ZEN:244],[SOM:242],[ZEN:243],[ZEN:242],[ALA:243],[ALA:242],[M12:245],[CHK:299],[M12:243],[M12:244],[CHK:300],[CHK:301],[M12:242],[CHK:302],[10E:376],[M11:243],[M11:242],[M11:245],[M11:244],[MBS:152],[ALA:244],[ALA:245],[ZEN:242a],[ZEN:242a],[RAV:301],[RAV:300],[RAV:299],[USG:345],[USG:346],[M10:242],[RAV:302],[USG:343],[USG:344],[ISD:259],[ROE:244],[ISD:261],[ISD:260],[ROE:241],[ROE:242],[ROE:243],[MRD:301],[MRD:300],[MRD:299],[M10:244],[M10:243],[M10:245],[LRW:294],[TMP:343],[LRW:295],[LRW:296],[LRW:297],[TMP:343],[MRD:302],[TMP:343],[TMP:343],[INV:345],[INV:344])
LAYOUT SIDEBOARD:(0,0)(COLOR_IDENTITY,true,5)|
71 [SOM:242] Mountain

View file

@ -19,6 +19,8 @@ import java.util.*;
import java.util.stream.Collectors;
/**
* Auto-generated table on each release, so no need SQL-updates on structure changes.
*
* @author North
*/
@DatabaseTable(tableName = "card")
@ -41,9 +43,9 @@ public class CardInfo {
@DatabaseField(indexName = "lower_name_index")
protected String lower_name;
@DatabaseField(indexName = "setCode_cardNumber_index")
protected String cardNumber;
@DatabaseField(indexName = "setCode_cardNumber_index")
protected String setCode;
@DatabaseField(indexName = "setCode_cardNumber_index")
protected String cardNumber;
@DatabaseField(indexName = "className_index")
protected String className;
@DatabaseField

View file

@ -126,14 +126,14 @@ public class PermanentCard extends PermanentImpl {
}
this.subtype.copyFrom(card.getSubtype());
this.supertype.clear();
supertype.addAll(card.getSuperType());
this.supertype.addAll(card.getSuperType());
this.expansionSetCode = card.getExpansionSetCode();
this.rarity = card.getRarity();
this.cardNumber = card.getCardNumber();
this.usesVariousArt = card.getUsesVariousArt();
transformable = card.isTransformable();
if (transformable) {
this.transformable = card.isTransformable();
if (this.transformable) {
this.nightCard = card.isNightCard();
if (!this.nightCard) {
this.secondSideCard = card.getSecondCardFace();