From: James Ahlborn Date: Wed, 16 Apr 2008 18:02:09 +0000 (+0000) Subject: add some documentation on large index support (#1564870) X-Git-Tag: rel_1_1_14~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1069360cde5852c44d8a82704847d97649680bea;p=jackcess.git add some documentation on large index support (#1564870) git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@330 f203690c-595d-4dc9-a70b-905162fa7fd2 --- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 4fee05f..7f14205 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -13,6 +13,11 @@ Access seems to limit data pages to a max of 256 rows. + + Added experimental support for "large" indexes. The current support + is optional. It can be enabled via a varity of means, see the + Database javadoc for more details. + diff --git a/src/java/com/healthmarketscience/jackcess/Database.java b/src/java/com/healthmarketscience/jackcess/Database.java index ebc7809..189c9cc 100644 --- a/src/java/com/healthmarketscience/jackcess/Database.java +++ b/src/java/com/healthmarketscience/jackcess/Database.java @@ -61,6 +61,19 @@ import org.apache.commons.logging.LogFactory; /** * An Access database. + *

+ * There is now experimental, optional support for large indexes (disabled by + * default). This optional support can be enabled via a few different means: + *

    + *
  • Setting the system property {@value #USE_BIG_INDEX_PROPERTY} to + * {@code "true"} will enable "large" index support accross the jvm
  • + *
  • Calling {@link #setUseBigIndex} with {@code true} on a Database + * instance will enable "large" index support for all tables subsequently + * created from that instance
  • + *
  • Calling {@link #getTable(String,boolean)} can selectively + * enable/disable "large" index support on a per-table basis (overriding + * any Database or system property setting)
  • + *
* * @author Tim McCune */ diff --git a/src/java/com/healthmarketscience/jackcess/Index.java b/src/java/com/healthmarketscience/jackcess/Index.java index ec3629d..66f189a 100644 --- a/src/java/com/healthmarketscience/jackcess/Index.java +++ b/src/java/com/healthmarketscience/jackcess/Index.java @@ -320,7 +320,7 @@ public abstract class Index implements Comparable { if(_readOnly) { throw new UnsupportedOperationException( - "FIXME cannot write indexes of this type yet"); + "FIXME cannot write indexes of this type yet, see Database javadoc for info on enabling large index support"); } updateImpl(); } @@ -733,7 +733,7 @@ public abstract class Index implements Comparable { if(dataPage.getCompressedEntrySize() > _maxPageEntrySize) { if(this instanceof SimpleIndex) { throw new UnsupportedOperationException( - "FIXME cannot write large index yet"); + "FIXME cannot write large index yet, see Database javadoc for info on enabling large index support"); } throw new IllegalStateException("data page is too large"); } diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml index a2c6194..d5ee93f 100644 --- a/src/site/fml/faq.fml +++ b/src/site/fml/faq.fml @@ -187,6 +187,20 @@ + + + Why am I getting an UnsupportedOperationException (or + IOException) when updating an indexed table? + + Previously index update support only handled tables with small numbers + of rows. When the index size limit was reached an + UnsupportedOperationException (or possibly an IOException) was thrown. + As of the 1.1.14 release, experimental, optional large index support + has been added. This support is disabled by default but can be + enabled via a few different means. Please see the Database javadocs + for details on enabling large index support. + + Who is Health Market Science?