mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
* Council of the Absolute - Fixed IllegalStateException (fixes #297) .
This commit is contained in:
parent
271e4b61ba
commit
655dcea56d
1 changed files with 7 additions and 4 deletions
|
|
@ -32,6 +32,7 @@ import com.j256.ormlite.dao.DaoManager;
|
||||||
import com.j256.ormlite.jdbc.JdbcConnectionSource;
|
import com.j256.ormlite.jdbc.JdbcConnectionSource;
|
||||||
import com.j256.ormlite.stmt.QueryBuilder;
|
import com.j256.ormlite.stmt.QueryBuilder;
|
||||||
import com.j256.ormlite.stmt.SelectArg;
|
import com.j256.ormlite.stmt.SelectArg;
|
||||||
|
import com.j256.ormlite.stmt.Where;
|
||||||
import com.j256.ormlite.support.ConnectionSource;
|
import com.j256.ormlite.support.ConnectionSource;
|
||||||
import com.j256.ormlite.table.TableUtils;
|
import com.j256.ormlite.table.TableUtils;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
@ -163,10 +164,12 @@ public enum CardRepository {
|
||||||
try {
|
try {
|
||||||
QueryBuilder<CardInfo, Object> qb = cardDao.queryBuilder();
|
QueryBuilder<CardInfo, Object> qb = cardDao.queryBuilder();
|
||||||
qb.distinct().selectColumns("name");
|
qb.distinct().selectColumns("name");
|
||||||
qb.where()
|
Where where = qb.where();
|
||||||
.not().like("types", '%' + CardType.CREATURE.name() + '%')
|
where.and(where.not().like("types", '%' + CardType.CREATURE.name() +'%'),where.not().like("types", '%' + CardType.LAND.name() + '%'));
|
||||||
.and()
|
// qb.where()
|
||||||
.not().like("types", '%' + CardType.LAND.name() + '%');
|
// .not().like("types", '%' + CardType.CREATURE.name() + '%')
|
||||||
|
// .and()
|
||||||
|
// .not().like("types", '%' + CardType.LAND.name() + '%');
|
||||||
List<CardInfo> results = cardDao.query(qb.prepare());
|
List<CardInfo> results = cardDao.query(qb.prepare());
|
||||||
for (CardInfo card : results) {
|
for (CardInfo card : results) {
|
||||||
int result = card.getName().indexOf(" // ");
|
int result = card.getName().indexOf(" // ");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue