提交 21a558cf authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 e09e6251
......@@ -965,8 +965,7 @@ mode. Switching on the cluster mode requires admin rights, but any user can
switch it off (this is automatically done when the client detects the other
server is not responding).
Admin rights are required to execute this command.
This command commits an open transaction.
This command is effective immediately, but does not commit an open transaction.
","
SET CLUSTER ''
"
......@@ -1399,8 +1398,12 @@ closed automatically when the last connection to it is closed.
If no option is used, then the database is closed normally.
All connections are closed, open transactions are rolled back.
COMPACT compacts the database (re-creating the database may further reduce the database size).
IMMEDIATELY closes the database files without any cleanup.
SHUTDOWN COMPACT fully compacts the database (re-creating the database may further reduce the database size).
If the database is closed normally (using SHUTDOWN or by closing all connections), then the database is also compacted,
but only for at most the time defined by the system property h2.maxCompactTime (see there).
SHUTDOWN IMMEDIATELY closes the database files without any cleanup and without compacting.
Admin rights are required to execute this command.
","
......@@ -1745,10 +1748,12 @@ REFERENCES [ refTableName ] [ ( refColumnName [,...] ) ]
[ ON UPDATE { CASCADE | SET { DEFAULT | NULL } } ]
","
Defines a referential constraint. If the table name is not specified, then the
same table is referenced. As this database does not support deferred checking,
RESTRICT and NO ACTION will both throw an exception if the constraint is
violated. If the referenced columns are not specified, then the primary key
columns are used. The required indexes are automatically created if required.
same table is referenced. RESTRICT is the default action.
As this database does not support deferred checking,
RESTRICT and NO ACTION will both throw an exception if the constraint is violated.
If the referenced columns are not specified, then the primary key columns are used.
The required indexes are automatically created if required.
Some tables may not be referenced, such as metadata tables.
","
FOREIGN KEY(ID) REFERENCES TEST(ID)
"
......@@ -3439,6 +3444,7 @@ SET(@variableName, value)
Updates a variable with the given value.
The new value is returned.
When used in a query, the value is updated in the order the rows are read.
This can be used to implement running totals / cumulative sums.
","
SELECT X, SET(@I, IFNULL(@I, 0)+X) RUNNING_TOTAL FROM SYSTEM_RANGE(1, 10)
"
......
......@@ -18,12 +18,26 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>JdbcConnectionPool: the default connection timeout is now 30 seconds (it used to be 5 minutes).
<ul><li>Cluster: an open transaction was committed when a cluster node was stopped
(because disabling the cluster executes SET CLUSTER '', which committed the transaction).
Transaction are no longer committed when calling SET CLUSTER. Issue 199.
</li><li>Cluster: non-admin users couldn't connect to the cluster and couldn't disable the cluster. Issue 201.
</li><li>Cluster: NEXTVAL('sequence') was only called on one cluster node,
therefore sequence values could get out of sync.
</li><li>Version 1.2.136 could not be converted to Java 1.4
(because the Retrotranslator doesn't support BigDecimal.precision).
A workaround has been implemented.
</li><li>The error code of IO exceptions in CSV functions was incorrect.
</li><li>The TriggerPassData example now uses a prefix (the database name).
</li><li>The wrong exception was thrown when trying to reference a table that doesn't support references
such as a table in the information schema.
</li><li>Server.shutdownTcpServer can now stop all TCP servers on this JVM.
</li><li>JdbcConnectionPool: the default connection timeout is now 30 seconds (it used to be 5 minutes).
</li><li>LOB storage: LOBs added with "h2.lobInDatabase" enabled couldn't
be read later with this option disabled.
</li></ul>
<h2>Next Version (unreleased)</h2>
<h2>Version 1.2.136 (2010-05-24)</h2>
<ul><li>When using ORDER BY and there are both ascending and descending indexes, the database used
the first index even when the second one could be used for sorting.
</li><li>Conditions of the form columnName IS NULL now use an index. To disable this feature,
......
......@@ -31,7 +31,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
<h2>Priority 1</h2>
<ul><li>Bugfixes
</li><li>Support very large transactions. Reduce memory usage of undo log.
</li><li>Support very large transactions. Reduce memory usage of undo log (TestUndoLogMemory).
</li><li>More tests with MULTI_THREADED=1
</li><li>Optimization: result set caching (like MySQL); option to disable
</li><li>Server side cursors
......@@ -39,8 +39,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
<h2>Priority 2</h2>
<ul><li>Improve test code coverage.
</li><li>Test multi-threaded in-memory db access
</li><li>Option to shutdown all the running servers (on the same VM).
</li><li>Test multi-threaded in-memory db access.
</li><li>Full outer joins.
</li><li>Support nested outer joins (see todo.txt).
</li><li>Clustering: support mixed clustering mode (one embedded, others in server mode).
......@@ -476,14 +475,19 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>ODBC: encrypted databases are not supported because the ;CIPHER= can not be set.
</li><li>Support CLOB and BLOB update, specially conn.createBlob().setBinaryStream(1);
</li><li>Triggers: support user defined execution order. Oracle:
CREATE OR REPLACE TRIGGER TRI_TEST_2 BEFORE INSERT
ON TEST FOR EACH ROW FOLLOWS TRI_TEST_1.
MS SQL Server: sp_settriggerorder.
CREATE OR REPLACE TRIGGER TEST_2 BEFORE INSERT
ON TEST FOR EACH ROW FOLLOWS TEST_1.
SQL specifies that multiple triggers should be fired in time-of-creation order.
PostgreSQL uses name order, which was judged to be more convenient.
Derby: triggers are fired in the order in which they were created.
</li><li>PostgreSQL compatibility: combine "users" and "roles". See:
http://www.postgresql.org/docs/8.1/interactive/user-manag.html
</li><li>Support NULL with a type: @meta CALL CAST(NULL AS INT) should return INT.
See the ValueExpression.java (currently it returns the type of the value;
it could have it's own type/precision/scale optionally, for example when created from CAST,
which is implemented in Function.java).
</li><li>Improve documentation of system properties: only list the property names, default values, and description.
</li><li>Support running totals / cumulative sum using SUM(..) OVER(..).
</li></ul>
<h2>Not Planned</h2>
......
......@@ -552,6 +552,9 @@ To enable it, change the following setting in persistence.xml:
<p>
In old versions of Glassfish, the property name is <code>toplink.platform.class.name</code>.
</p>
<p>
To use H2 within Glassfish, copy the h2*.jar to the directory <code>glassfish/glassfish/lib</code>.
</p>
<h2 id="using_eclipselink">Using EclipseLink</h2>
<p>
......@@ -687,6 +690,27 @@ The CSV file support can be used inside the database using the functions
or it can be used outside the database as a standalone tool.
</p>
<h3>Reading a CSV File from Within a Database</h3>
<p>
A CSV file can be read using the function <code>CSVREAD</code>. Example:
</p>
<pre>
SELECT * FROM CSVREAD('test.csv');
</pre>
<h3>Importing Data from a CSV File</h3>
<p>
A fast way to load or import data (sometimes called 'bulk load') from a CSV file is
to combine table creation with import.
Optionally, the column names and data types can be set when creating the table.
Another option is to use <code>INSERT INTO ... SELECT</code>.
</p>
<pre>
CREATE TABLE TEST AS SELECT * FROM CSVREAD('test.csv');
CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255))
AS SELECT * FROM CSVREAD('test.csv');
</pre>
<h3>Writing a CSV File from Within a Database</h3>
<p>
The built-in function <code>CSVWRITE</code> can be used to create a CSV file from a query.
......@@ -698,14 +722,6 @@ INSERT INTO TEST VALUES(1, 'Hello'), (2, 'World');
CALL CSVWRITE('test.csv', 'SELECT * FROM TEST');
</pre>
<h3>Reading a CSV File from Within a Database</h3>
<p>
A CSV file can be read using the function <code>CSVREAD</code>. Example:
</p>
<pre>
SELECT * FROM CSVREAD('test.csv');
</pre>
<h3>Writing a CSV File from a Java Application</h3>
<p>
The <code>Csv</code> tool can be used in a Java application even when not using a database at all.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -308,9 +308,9 @@ public class ErrorCode {
public static final int UNKNOWN_DATA_TYPE_1 = 50004;
/**
* The error with code <code>50100</code> is thrown when
* calling an unsupported JDBC method. See the stack trace
* for details.
* The error with code <code>50100</code> is thrown when calling an
* unsupported JDBC method or database feature. See the stack trace for
* details.
*/
public static final int FEATURE_NOT_SUPPORTED_1 = 50100;
......
......@@ -645,3 +645,4 @@ determine timestampdiff harmony doap shortdesc wireless iceland sigurdsson
darri chunks bjorn chunked watson regardless usefulinc represented pushd
recorder grajciar recording slovensky uninitialized arriving lubomir unchanged
erik dick calculations lutin cite bom evaluating telegard excel bbs deprecation
importing cumulative fired convenient sums judged anybody vacuum
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论