summaryrefslogtreecommitdiffstats
path: root/src/com/iciql/Db.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gmail.com>2012-07-14 16:09:52 -0400
committerJames Moger <james.moger@gmail.com>2012-07-14 16:09:52 -0400
commit9e4799babb53626ccfea78bae9a3d58ceef9d258 (patch)
tree4e882540911aee2f6ef50e53cff0c06e5938a0c4 /src/com/iciql/Db.java
parent667d1cdef4b465dcaedb5a9544c47b031ae5505d (diff)
downloadiciql-9e4799babb53626ccfea78bae9a3d58ceef9d258.tar.gz
iciql-9e4799babb53626ccfea78bae9a3d58ceef9d258.zip
Use the upgrade check to skip unnecessary table create statements
Diffstat (limited to 'src/com/iciql/Db.java')
-rw-r--r--src/com/iciql/Db.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/iciql/Db.java b/src/com/iciql/Db.java
index 16cf386..6187aba 100644
--- a/src/com/iciql/Db.java
+++ b/src/com/iciql/Db.java
@@ -279,6 +279,8 @@ public class Db {
}
// remove this model class from the table definition cache
classMap.remove(modelClass);
+ // remove this model class from the upgrade checked cache
+ upgradeChecked.remove(modelClass);
return rc;
}
@@ -395,6 +397,10 @@ public class Db {
}
return def;
}
+
+ <T> boolean hasCreated(Class<T> clazz) {
+ return upgradeChecked.contains(clazz);
+ }
public synchronized void setDbUpgrader(DbUpgrader upgrader) {
if (!upgrader.getClass().isAnnotationPresent(IQVersion.class)) {