提交 32fe58b7 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 42e2ac30
...@@ -24,6 +24,8 @@ Advanced ...@@ -24,6 +24,8 @@ Advanced
Linked Tables</a><br /> Linked Tables</a><br />
<a href="#recursive_queries"> <a href="#recursive_queries">
Recursive Queries</a><br /> Recursive Queries</a><br />
<a href="#updatable_views">
Updatable Views</a><br />
<a href="#transaction_isolation"> <a href="#transaction_isolation">
Transaction Isolation</a><br /> Transaction Isolation</a><br />
<a href="#mvcc"> <a href="#mvcc">
...@@ -174,6 +176,22 @@ The statement <a href="grammar.html#create_linked_table" class="notranslate" >CR ...@@ -174,6 +176,22 @@ The statement <a href="grammar.html#create_linked_table" class="notranslate" >CR
supports an optional schema name parameter. supports an optional schema name parameter.
</p> </p>
<h2 id="updatable_views">Updatable Views</h2>
<p>
By default, views are not updatable.
To make a view updatable, use an "instead of" trigger as follows:
</p>
<pre>
CREATE TRIGGER TRIGGER_NAME
INSTEAD OF INSERT, UPDATE, DELETE
ON VIEW_NAME
FOR EACH ROW CALL "com.acme.TriggerClassName";
</pre>
<p>
Update the base table(s) within the trigger as required.
For details, see the sample application <code>org.h2.samples.UpdatableView</code>.
</p>
<h2 id="transaction_isolation">Transaction Isolation</h2> <h2 id="transaction_isolation">Transaction Isolation</h2>
<p> <p>
Transaction isolation is provided for all data manipulation language (DML) statements. Transaction isolation is provided for all data manipulation language (DML) statements.
......
...@@ -18,7 +18,15 @@ Change Log ...@@ -18,7 +18,15 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Reading a resource from the classpath didn't work if there was a leading slash <ul><li>If the database contained many CLOB or BLOB values, then closing a connection was very slow.
Reason: was that when closing a connection, the temporary CLOB and BLOB values for this connection
were removed, but there was no index on this column.
For existing databases with many CLOB and BLOB values, creating the index may take a few seconds.
</li><li>If a CLOB or BLOB was copied into the same table using INSERT INTO X ... SELECT ... FROM X,
and then the original row was deleted, then the copied value was also deleted.
This could also result in an ArrayIndexOutOfBoundsException on checkpoint or when closing the database.
</li><li>Improved performance (up to 10%) due to changed synchronization in the page store.
</li><li>Reading a resource from the classpath didn't work if there was a leading slash
(classpath:/org/...). Now resources can be loaded with or without leading slash. (classpath:/org/...). Now resources can be loaded with or without leading slash.
</li><li>Support INSERT INTO TEST SET ID = 1, NAME = 'World' (MySQL compatibility). </li><li>Support INSERT INTO TEST SET ID = 1, NAME = 'World' (MySQL compatibility).
</li><li>Issue 304: The condition [NOT] IN (SELECT ...) could throw the exception "Unexpected code path" if the subquery contained ORDER BY. </li><li>Issue 304: The condition [NOT] IN (SELECT ...) could throw the exception "Unexpected code path" if the subquery contained ORDER BY.
......
...@@ -46,6 +46,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -46,6 +46,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Compatibility: automatically load functions from a script depending on the mode - see FunctionsMySQL.java, issue 211. </li><li>Compatibility: automatically load functions from a script depending on the mode - see FunctionsMySQL.java, issue 211.
</li><li>Test very large databases and LOBs (up to 256 GB). </li><li>Test very large databases and LOBs (up to 256 GB).
</li><li>Sequence: add features [NO] MINVALUE, MAXVALUE, CYCLE. </li><li>Sequence: add features [NO] MINVALUE, MAXVALUE, CYCLE.
</li><li>Make DDL (Data Definition) operations transactional.
</li><li>Deferred integrity checking (DEFERRABLE INITIALLY DEFERRED). </li><li>Deferred integrity checking (DEFERRABLE INITIALLY DEFERRED).
</li><li>Groovy Stored Procedures: http://groovy.codehaus.org/Groovy+SQL </li><li>Groovy Stored Procedures: http://groovy.codehaus.org/Groovy+SQL
</li><li>Add a migration guide (list differences between databases). </li><li>Add a migration guide (list differences between databases).
...@@ -64,7 +65,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -64,7 +65,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>CHECK: find out what makes CHECK=TRUE slow, move to CHECK2. </li><li>CHECK: find out what makes CHECK=TRUE slow, move to CHECK2.
</li><li>Drop with invalidate views (so that source code is not lost). Check what other databases do exactly. </li><li>Drop with invalidate views (so that source code is not lost). Check what other databases do exactly.
</li><li>Index usage for (ID, NAME)=(1, 'Hi'); document. </li><li>Index usage for (ID, NAME)=(1, 'Hi'); document.
</li><li>Make DDL (Data Definition) operations transactional.
</li><li>RANK() and DENSE_RANK(), Partition using OVER(). </li><li>RANK() and DENSE_RANK(), Partition using OVER().
</li><li>Set a connection read only (Connection.setReadOnly) or using a connection parameter. </li><li>Set a connection read only (Connection.setReadOnly) or using a connection parameter.
</li><li>Access rights: finer grained access control (grant access for specific functions). </li><li>Access rights: finer grained access control (grant access for specific functions).
......
...@@ -734,9 +734,10 @@ build warConsole ...@@ -734,9 +734,10 @@ build warConsole
<h2 id="android">Android</h2> <h2 id="android">Android</h2>
<p> <p>
You can use this database on an Android device (using the Dalvik VM) instead of or in addition to SQLite. You can use this database on an Android device (using the Dalvik VM) instead of or in addition to SQLite.
So far, only very few tests and benchmarks were run, but it seems that performance is very similar to SQLite, So far, only very few tests and benchmarks were run, but it seems that performance is similar to SQLite,
except for opening and closing a database, which is not yet optimized in H2 except for opening and closing a database, which is not yet optimized in H2
(H2 takes about 0.2 seconds, and SQLite about 0.02 seconds). (H2 takes about 0.2 seconds, and SQLite about 0.02 seconds).
Read operations seem to be a bit faster than SQLite, and write operations seem to be slower.
So far, only very few tests have been run, and everything seems to work as expected. So far, only very few tests have been run, and everything seems to work as expected.
Fulltext search was not yet tested, however the native fulltext search should work. Fulltext search was not yet tested, however the native fulltext search should work.
</p> </p>
...@@ -754,7 +755,8 @@ Reasons to use H2 instead of SQLite are: ...@@ -754,7 +755,8 @@ Reasons to use H2 instead of SQLite are:
</li><li>Better data type and SQL support. </li><li>Better data type and SQL support.
</li><li>In-memory databases, read-only databases, linked tables. </li><li>In-memory databases, read-only databases, linked tables.
</li><li>Better compatibility with other databases which simplifies porting applications. </li><li>Better compatibility with other databases which simplifies porting applications.
</li><li>Possibly better performance. </li><li>Possibly better performance (so far for read operations).
</li><li>Server mode (accessing a database on a different machine over TCP/IP).
</li></ul> </li></ul>
<p> <p>
Currently only the JDBC API is supported (it is planned to support the Android database API in future releases). Currently only the JDBC API is supported (it is planned to support the Android database API in future releases).
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论