提交 ca717c37 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation: add 'notranslate' tags

上级 78fbd315
...@@ -137,8 +137,8 @@ CREATE LINKED TABLE LINK('org.postgresql.Driver', 'jdbc:postgresql:test', 'sa', ...@@ -137,8 +137,8 @@ CREATE LINKED TABLE LINK('org.postgresql.Driver', 'jdbc:postgresql:test', 'sa',
<p> <p>
You can then access the table in the usual way. You can then access the table in the usual way.
Whenever the linked table is accessed, the database issues specific queries over JDBC. Whenever the linked table is accessed, the database issues specific queries over JDBC.
Using the example above, if you issue the query <code>SELECT * FROM LINK WHERE ID=1</code>, Using the example above, if you issue the query <code class="notranslate">SELECT * FROM LINK WHERE ID=1</code>,
then the following query is run against the PostgreSQL database: <code>SELECT * FROM TEST WHERE ID=?</code>. then the following query is run against the PostgreSQL database: <code class="notranslate">SELECT * FROM TEST WHERE ID=?</code>.
The same happens for insert and update statements. Only simple statements are executed against the The same happens for insert and update statements. Only simple statements are executed against the
target database, that means no joins. Prepared statements are used where possible. target database, that means no joins. Prepared statements are used where possible.
</p> </p>
...@@ -169,16 +169,16 @@ This database supports the following transaction isolation levels: ...@@ -169,16 +169,16 @@ This database supports the following transaction isolation levels:
This is the default level. This is the default level.
Read locks are released immediately. Read locks are released immediately.
Higher concurrency is possible when using this level.<br /> Higher concurrency is possible when using this level.<br />
To enable, execute the SQL statement 'SET LOCK_MODE 3'<br /> To enable, execute the SQL statement <code class="notranslate">SET LOCK_MODE 3</code><br />
or append ;LOCK_MODE=3 to the database URL: jdbc:h2:~/test;LOCK_MODE=3 or append <code class="notranslate">;LOCK_MODE=3</code> to the database URL: <code class="notranslate">jdbc:h2:~/test;LOCK_MODE=3</code>
</li><li> </li><li>
<b>Serializable</b><br /> <b>Serializable</b><br />
To enable, execute the SQL statement 'SET LOCK_MODE 1'<br /> To enable, execute the SQL statement <code class="notranslate">SET LOCK_MODE 1</code><br />
or append ;LOCK_MODE=1 to the database URL: jdbc:h2:~/test;LOCK_MODE=1 or append <code class="notranslate">;LOCK_MODE=1</code> to the database URL: <code class="notranslate">jdbc:h2:~/test;LOCK_MODE=1</code>
</li><li><b>Read Uncommitted</b><br /> </li><li><b>Read Uncommitted</b><br />
This level means that transaction isolation is disabled.<br /> This level means that transaction isolation is disabled.<br />
To enable, execute the SQL statement 'SET LOCK_MODE 0'<br /> To enable, execute the SQL statement <code class="notranslate">SET LOCK_MODE 0</code><br />
or append ;LOCK_MODE=0 to the database URL: jdbc:h2:~/test;LOCK_MODE=0 or append <code class="notranslate">;LOCK_MODE=0</code> to the database URL: <code class="notranslate">jdbc:h2:~/test;LOCK_MODE=0</code>
</li> </li>
</ul> </ul>
<p> <p>
...@@ -304,7 +304,7 @@ java org.h2.tools.Server ...@@ -304,7 +304,7 @@ java org.h2.tools.Server
</li><li>Use the CreateCluster tool to initialize clustering. </li><li>Use the CreateCluster tool to initialize clustering.
This will automatically create a new, empty database if it does not exist. This will automatically create a new, empty database if it does not exist.
Run the tool on the command line: Run the tool on the command line:
<pre> <pre class="notranslate">
java org.h2.tools.CreateCluster java org.h2.tools.CreateCluster
-urlSource jdbc:h2:tcp://localhost:9101/~/test -urlSource jdbc:h2:tcp://localhost:9101/~/test
-urlTarget jdbc:h2:tcp://localhost:9102/~/test -urlTarget jdbc:h2:tcp://localhost:9102/~/test
...@@ -342,15 +342,15 @@ The two phase commit protocol is supported. 2-phase-commit works as follows: ...@@ -342,15 +342,15 @@ The two phase commit protocol is supported. 2-phase-commit works as follows:
<li>Autocommit needs to be switched off <li>Autocommit needs to be switched off
</li><li>A transaction is started, for example by inserting a row </li><li>A transaction is started, for example by inserting a row
</li><li>The transaction is marked 'prepared' by executing the SQL statement </li><li>The transaction is marked 'prepared' by executing the SQL statement
<code>PREPARE COMMIT transactionName</code> <code class="notranslate">PREPARE COMMIT transactionName</code>
</li><li>The transaction can now be committed or rolled back </li><li>The transaction can now be committed or rolled back
</li><li>If a problem occurs before the transaction was successfully committed or rolled back </li><li>If a problem occurs before the transaction was successfully committed or rolled back
(for example because a network problem occurred), the transaction is in the state 'in-doubt' (for example because a network problem occurred), the transaction is in the state 'in-doubt'
</li><li>When re-connecting to the database, the in-doubt transactions can be listed </li><li>When re-connecting to the database, the in-doubt transactions can be listed
with <code>SELECT * FROM INFORMATION_SCHEMA.IN_DOUBT</code> with <code class="notranslate">SELECT * FROM INFORMATION_SCHEMA.IN_DOUBT</code>
</li><li>Each transaction in this list must now be committed or rolled back by executing </li><li>Each transaction in this list must now be committed or rolled back by executing
<code>COMMIT TRANSACTION transactionName</code> or <code class="notranslate">COMMIT TRANSACTION transactionName</code> or
<code>ROLLBACK TRANSACTION transactionName</code> <code class="notranslate">ROLLBACK TRANSACTION transactionName</code>
</li><li>The database needs to be closed and re-opened to apply the changes </li><li>The database needs to be closed and re-opened to apply the changes
</li></ul> </li></ul>
...@@ -445,7 +445,7 @@ as experimental. It should not be used for production applications. ...@@ -445,7 +445,7 @@ as experimental. It should not be used for production applications.
</p> </p>
<p> <p>
To use the PostgreSQL ODBC driver on 64 bit versions of Windows, To use the PostgreSQL ODBC driver on 64 bit versions of Windows,
first run <code>c:/windows/syswow64/odbcad32.exe</code>. first run <code class="notranslate">c:/windows/syswow64/odbcad32.exe</code>.
At this point you set up your DSN just like you would on any other system. At this point you set up your DSN just like you would on any other system.
See also: See also:
<a href="http://archives.postgresql.org/pgsql-odbc/2005-09/msg00125.php">Re: ODBC Driver on Windows 64 bit</a> <a href="http://archives.postgresql.org/pgsql-odbc/2005-09/msg00125.php">Re: ODBC Driver on Windows 64 bit</a>
...@@ -485,13 +485,13 @@ server.stop(); ...@@ -485,13 +485,13 @@ server.stop();
</pre> </pre>
<p> <p>
By default, only connections from localhost are allowed. To allow remote connections, use By default, only connections from localhost are allowed. To allow remote connections, use
<code>-pgAllowOthers</code> when starting the server. <code class="notranslate">-pgAllowOthers</code> when starting the server.
</p> </p>
<h3>ODBC Configuration</h3> <h3>ODBC Configuration</h3>
<p> <p>
After installing the driver, a new Data Source must be added. In Windows, After installing the driver, a new Data Source must be added. In Windows,
run <code>odbcad32.exe</code> to open the Data Source Administrator. Then click on 'Add...' run <code class="notranslate">odbcad32.exe</code> to open the Data Source Administrator. Then click on 'Add...'
and select the PostgreSQL Unicode driver. Then click 'Finish'. and select the PostgreSQL Unicode driver. Then click 'Finish'.
You will be able to change the connection properties: You will be able to change the connection properties:
</p> </p>
...@@ -560,12 +560,12 @@ An implementation of the ADO.NET interface is available in the open source proje ...@@ -560,12 +560,12 @@ An implementation of the ADO.NET interface is available in the open source proje
</li><li>Install <a href="http://www.ikvm.net">IKVM.NET</a>. </li><li>Install <a href="http://www.ikvm.net">IKVM.NET</a>.
</li><li>Copy the h2*.jar file to ikvm/bin </li><li>Copy the h2*.jar file to ikvm/bin
</li><li>Run the H2 Console using: </li><li>Run the H2 Console using:
<code>ikvm -jar h2*.jar</code> <code class="notranslate">ikvm -jar h2*.jar</code>
</li><li>Convert the H2 Console to an .exe file using: </li><li>Convert the H2 Console to an .exe file using:
<code>ikvmc -target:winexe h2*.jar</code>. <code class="notranslate">ikvmc -target:winexe h2*.jar</code>.
You may ignore the warnings. You may ignore the warnings.
</li><li>Create a .dll file using (change the version accordingly): </li><li>Create a .dll file using (change the version accordingly):
<code>ikvmc.exe -target:library -version:1.0.69.0 h2*.jar</code> <code class="notranslate">ikvmc.exe -target:library -version:1.0.69.0 h2*.jar</code>
</li></ul> </li></ul>
<p> <p>
If you want your C# application use H2, you need to add the h2.dll and the If you want your C# application use H2, you need to add the h2.dll and the
...@@ -726,7 +726,7 @@ java -cp h2*.jar org.h2.tools.Recover ...@@ -726,7 +726,7 @@ java -cp h2*.jar org.h2.tools.Recover
For each database in the current directory, a text file will be created. For each database in the current directory, a text file will be created.
This file contains raw insert statements (for the data) and data definition (DDL) statements to recreate This file contains raw insert statements (for the data) and data definition (DDL) statements to recreate
the schema of the database. This file can be executed using the RunScript tool or a the schema of the database. This file can be executed using the RunScript tool or a
<code>RUNSCRIPT FROM</code> SQL statement. The script includes at least one <code class="notranslate">RUNSCRIPT FROM</code> SQL statement. The script includes at least one
CREATE USER statement. If you run the script against a database that was created with the same CREATE USER statement. If you run the script against a database that was created with the same
user, or if there are conflicting users, running the script will fail. Consider running the script user, or if there are conflicting users, running the script will fail. Consider running the script
against a database that was created with a user name that is not in the script. against a database that was created with a user name that is not in the script.
...@@ -796,7 +796,7 @@ to the user if it cannot open a database, and not try again in a (fast) loop. ...@@ -796,7 +796,7 @@ to the user if it cannot open a database, and not try again in a (fast) loop.
<h3>File Locking Method 'Socket'</h3> <h3>File Locking Method 'Socket'</h3>
<p> <p>
There is a second locking mechanism implemented, but disabled by default. There is a second locking mechanism implemented, but disabled by default.
To use it, append <code>;FILE_LOCK=SOCKET</code> to the database URL. To use it, append <code class="notranslate">;FILE_LOCK=SOCKET</code> to the database URL.
The algorithm is: The algorithm is:
</p> </p>
<ul> <ul>
...@@ -1055,17 +1055,17 @@ custom certificates are supported as well. ...@@ -1055,17 +1055,17 @@ custom certificates are supported as well.
<p> <p>
Remote SSL/TLS connections are supported using the Java Secure Socket Extension Remote SSL/TLS connections are supported using the Java Secure Socket Extension
(SSLServerSocket / SSLSocket). By default, anonymous SSL is enabled. (SSLServerSocket / SSLSocket). By default, anonymous SSL is enabled.
The default cipher suite is <code>SSL_DH_anon_WITH_RC4_128_MD5</code>. The default cipher suite is <code class="notranslate">SSL_DH_anon_WITH_RC4_128_MD5</code>.
</p> </p>
<p> <p>
To use your own keystore, set the system properties <code>javax.net.ssl.keyStore</code> and To use your own keystore, set the system properties <code class="notranslate">javax.net.ssl.keyStore</code> and
<code>javax.net.ssl.keyStorePassword</code> before starting the H2 server and client. <code class="notranslate">javax.net.ssl.keyStorePassword</code> before starting the H2 server and client.
See also <a href="http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores"> See also <a href="http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores">
Customizing the Default Key and Trust Stores, Store Types, and Store Passwords</a> Customizing the Default Key and Trust Stores, Store Types, and Store Passwords</a>
for more information. for more information.
</p> </p>
<p> <p>
To disable anonymous SSL, set the system property <code>h2.enableAnonymousSSL</code> to false. To disable anonymous SSL, set the system property <code class="notranslate">h2.enableAnonymousSSL</code> to false.
</p> </p>
<br /> <br />
...@@ -1154,7 +1154,7 @@ is selected using a file name prefix. The following file systems are included: ...@@ -1154,7 +1154,7 @@ is selected using a file name prefix. The following file systems are included:
</li></ul> </li></ul>
<p> <p>
As an example, to use the the <b>nio</b> file system, use the following database URL: As an example, to use the the <b>nio</b> file system, use the following database URL:
<code>jdbc:h2:nio:~/test</code>. <code class="notranslate">jdbc:h2:nio:~/test</code>.
</p> </p>
<p> <p>
To register a new file system, extend the classes org.h2.store.fs.FileSystem and FileObject, To register a new file system, extend the classes org.h2.store.fs.FileSystem and FileObject,
...@@ -1175,7 +1175,7 @@ This database has the following known limitations: ...@@ -1175,7 +1175,7 @@ This database has the following known limitations:
the limit is 4 GB for the data. This is the limitation of the file system. The database does provide a the limit is 4 GB for the data. This is the limitation of the file system. The database does provide a
workaround for this problem, it is to use the file name prefix 'split:'. In that case files are split into workaround for this problem, it is to use the file name prefix 'split:'. In that case files are split into
files of 1 GB by default. An example database URL is: files of 1 GB by default. An example database URL is:
<code>jdbc:h2:split:~/test</code>. <code class="notranslate">jdbc:h2:split:~/test</code>.
</li><li>The maximum number of rows per table is 2'147'483'648. </li><li>The maximum number of rows per table is 2'147'483'648.
</li><li>Main memory requirements: The larger the database, the more main memory is required. </li><li>Main memory requirements: The larger the database, the more main memory is required.
With the default storage mechanism, the minimum main memory required for a 12 GB database is around 240 MB. With the default storage mechanism, the minimum main memory required for a 12 GB database is around 240 MB.
......
...@@ -71,16 +71,16 @@ Ensure that Java binary directory is included in the PATH environment variable, ...@@ -71,16 +71,16 @@ Ensure that Java binary directory is included in the PATH environment variable,
the environment variable JAVA_HOME points to your Java installation. the environment variable JAVA_HOME points to your Java installation.
On the command line, go to the directory h2 and execute the following command: On the command line, go to the directory h2 and execute the following command:
</p> </p>
<pre> <pre class="notranslate">
build -? build -?
</pre> </pre>
<p> <p>
For Linux and OS X, use <code>./build.sh</code> instead of <code>build</code>. For Linux and OS X, use <code class="notranslate">./build.sh</code> instead of <code class="notranslate">build</code>.
</p> </p>
<p> <p>
You will get a list of targets. If you want to build the jar file, execute (Windows): You will get a list of targets. If you want to build the jar file, execute (Windows):
</p> </p>
<pre> <pre class="notranslate">
build jar build jar
</pre> </pre>
...@@ -89,7 +89,7 @@ build jar ...@@ -89,7 +89,7 @@ build jar
By default the source code uses Java 1.5 features, however Java 1.6 is supported as well. By default the source code uses Java 1.5 features, however Java 1.6 is supported as well.
To switch the source code to the install version of Java, run: To switch the source code to the install version of Java, run:
</p> </p>
<pre> <pre class="notranslate">
build switchSource build switchSource
</pre> </pre>
...@@ -106,7 +106,7 @@ The build system can generate smaller jar files as well. The following targets a ...@@ -106,7 +106,7 @@ The build system can generate smaller jar files as well. The following targets a
<p> <p>
To create the h2client.jar file, go to the directory h2 and execute the following command: To create the h2client.jar file, go to the directory h2 and execute the following command:
</p> </p>
<pre> <pre class="notranslate">
build jarClient build jarClient
</pre> </pre>
...@@ -117,7 +117,7 @@ build jarClient ...@@ -117,7 +117,7 @@ build jarClient
You can include the database in your Maven 2 project as a dependency. You can include the database in your Maven 2 project as a dependency.
Example: Example:
</p> </p>
<pre> <pre class="notranslate">
&lt;dependency&gt; &lt;dependency&gt;
&lt;groupId&gt;com.h2database&lt;/groupId&gt; &lt;groupId&gt;com.h2database&lt;/groupId&gt;
&lt;artifactId&gt;h2&lt;/artifactId&gt; &lt;artifactId&gt;h2&lt;/artifactId&gt;
...@@ -134,13 +134,13 @@ they are available there. ...@@ -134,13 +134,13 @@ they are available there.
<p> <p>
To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command: To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command:
</p> </p>
<pre> <pre class="notranslate">
build mavenInstallLocal build mavenInstallLocal
</pre> </pre>
<p> <p>
Afterwards, you can include the database in your Maven 2 project as a dependency: Afterwards, you can include the database in your Maven 2 project as a dependency:
</p> </p>
<pre> <pre class="notranslate">
&lt;dependency&gt; &lt;dependency&gt;
&lt;groupId&gt;com.h2database&lt;/groupId&gt; &lt;groupId&gt;com.h2database&lt;/groupId&gt;
&lt;artifactId&gt;h2&lt;/artifactId&gt; &lt;artifactId&gt;h2&lt;/artifactId&gt;
...@@ -162,7 +162,7 @@ The translation of this software is split into the following parts: ...@@ -162,7 +162,7 @@ The translation of this software is split into the following parts:
To translate the H2 Console, start it and select Preferences / Translate. To translate the H2 Console, start it and select Preferences / Translate.
The conversion between UTF-8 and Java encoding (using the \u syntax), as well as the HTML entities (&amp;#..;) The conversion between UTF-8 and Java encoding (using the \u syntax), as well as the HTML entities (&amp;#..;)
is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, is automated by running the tool PropertiesToUTF8. The web site translation is automated as well,
using <code>build docs</code>. using <code class="notranslate">build docs</code>.
</p> </p>
<br /> <br />
...@@ -173,20 +173,20 @@ If you like to provide patches, please consider the following guidelines to simp ...@@ -173,20 +173,20 @@ If you like to provide patches, please consider the following guidelines to simp
<ul><li>Only use Java 1.5 features (do not use Java 1.6) (see Environment). <ul><li>Only use Java 1.5 features (do not use Java 1.6) (see Environment).
</li><li>Follow the coding style used in the project, and use Checkstyle (see above) to verify. </li><li>Follow the coding style used in the project, and use Checkstyle (see above) to verify.
For example, do not use tabs (use spaces instead). For example, do not use tabs (use spaces instead).
The checkstyle configuration is in <code>src/installer/checkstyle.xml</code>. The checkstyle configuration is in <code class="notranslate">src/installer/checkstyle.xml</code>.
</li><li>Please provide test cases and integrate them into the test suite. </li><li>Please provide test cases and integrate them into the test suite.
For Java level tests, see <code>src/test/org/h2/test/TestAll.java</code>. For Java level tests, see <code class="notranslate">src/test/org/h2/test/TestAll.java</code>.
For SQL level tests, see <code>src/test/org/h2/test/test.in.txt</code> or <code>testSimple.in.txt</code>. For SQL level tests, see <code class="notranslate">src/test/org/h2/test/test.in.txt</code> or <code class="notranslate">testSimple.in.txt</code>.
</li><li>The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above). </li><li>The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above).
or use the build target 'coverage'. or use the build target 'coverage'.
</li><li>Verify that you did not break other features: run the test cases by executing <code>build test</code>. </li><li>Verify that you did not break other features: run the test cases by executing <code class="notranslate">build test</code>.
</li><li>Provide end user documentation if required (<code>src/docsrc/html/*</code>). </li><li>Provide end user documentation if required (<code class="notranslate">src/docsrc/html/*</code>).
</li><li>Document grammar changes in <code>src/main/org/h2/res/help.csv</code> </li><li>Document grammar changes in <code class="notranslate">src/main/org/h2/res/help.csv</code>
</li><li>Provide a change log entry (<code>src/docsrc/html/changelog.html</code>). </li><li>Provide a change log entry (<code class="notranslate">src/docsrc/html/changelog.html</code>).
</li><li>Verify the spelling using <code>build spellcheck</code>. If required </li><li>Verify the spelling using <code class="notranslate">build spellcheck</code>. If required
add the new words to <code>src/tools/org/h2/build/doc/dictionary.txt</code>. add the new words to <code class="notranslate">src/tools/org/h2/build/doc/dictionary.txt</code>.
</li><li>Run the src/installer/buildRelease to find and fix formatting errors. </li><li>Run the src/installer/buildRelease to find and fix formatting errors.
</li><li>Verify the formatting using <code>build docs</code> and <code>build javadoc</code>. </li><li>Verify the formatting using <code class="notranslate">build docs</code> and <code class="notranslate">build javadoc</code>.
</li><li>Submit patches as .patch files (compressed if big). To create a patch using Eclipse, use Team / Create Patch. </li><li>Submit patches as .patch files (compressed if big). To create a patch using Eclipse, use Team / Create Patch.
</li></ul> </li></ul>
<p> <p>
...@@ -195,18 +195,18 @@ For legal reasons, patches need to be public in the form of an email to the ...@@ -195,18 +195,18 @@ For legal reasons, patches need to be public in the form of an email to the
of an <a href="http://code.google.com/p/h2database/issues/list">issue report or attachment</a>. of an <a href="http://code.google.com/p/h2database/issues/list">issue report or attachment</a>.
Significant contributions need to include the following statement: Significant contributions need to include the following statement:
</p> </p>
<pre> <p>
"I wrote the code, it's mine, and I'm contributing it to H2 for distribution "I wrote the code, it's mine, and I'm contributing it to H2 for distribution
multiple-licensed under the H2 License, version 1.0, and under the multiple-licensed under the H2 License, version 1.0, and under the
Eclipse Public License, version 1.0 (http://h2database.com/html/license.html)." Eclipse Public License, version 1.0 (http://h2database.com/html/license.html)."
</pre> </p>
<br /> <br />
<h2 id="automated">Automated Build</h2> <h2 id="automated">Automated Build</h2>
<p> <p>
This build process is automated and runs regularly. This build process is automated and runs regularly.
The build process includes running the tests and code coverage, using the command line The build process includes running the tests and code coverage, using the command line
<code>./build.sh clean jar coverage -Dh2.ftpPassword=... uploadBuild</code>. <code class="notranslate">./build.sh clean jar coverage -Dh2.ftpPassword=... uploadBuild</code>.
The last results are available here: The last results are available here:
</p> </p>
<ul><li><a href="http://h2database.com/html/testOutput.html">Test Output</a> <ul><li><a href="http://h2database.com/html/testOutput.html">Test Output</a>
......
...@@ -21,7 +21,7 @@ Change Log ...@@ -21,7 +21,7 @@ Change Log
<ul><li>Issue 124: Hibernate schema validation failed for decimal/numeric columns. <ul><li>Issue 124: Hibernate schema validation failed for decimal/numeric columns.
This problem is fixed in the Hibernate dialect that is included with H2 This problem is fixed in the Hibernate dialect that is included with H2
(src/tools/org/hibernate/dialect/H2Dialect.java.txt), but not in Hibernate yet. (src/tools/org/hibernate/dialect/H2Dialect.java.txt), but not in Hibernate yet.
</li><li>Issue 125: Renaming primary keys was not persistent. Fixed. </li><li>Issue 125: Renaming primary keys was not persistent. Fixed.
Unfortunately, databases created by this version can not be opened with older versions because of this change. Unfortunately, databases created by this version can not be opened with older versions because of this change.
</li><li>PostgreSQL compatibility: function LASTVAL() as an alias for IDENTITY(). </li><li>PostgreSQL compatibility: function LASTVAL() as an alias for IDENTITY().
</li><li>Linked tables now support default values when inserting, updating or merging. </li><li>Linked tables now support default values when inserting, updating or merging.
......
...@@ -16,22 +16,21 @@ Data Types ...@@ -16,22 +16,21 @@ Data Types
<!-- } --> <!-- } -->
<h1>Data Types</h1> <h1>Data Types</h1>
<p class="notranslate">
<c:forEach var="item" items="dataTypes"> <c:forEach var="item" items="dataTypes">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}">${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<c:forEach var="item" items="dataTypes"> <c:forEach var="item" items="dataTypes">
<br /> <br />
<h3 id="${item.link}">${item.topic}</h3> <h3 id="${item.link}" class="notranslate">${item.topic}</h3>
<pre> <pre class="notranslate">
${item.syntax} ${item.syntax}
</pre> </pre>
<p> <p>${item.text}</p>
${item.text} <b>Example:</b>
</p> <p class="notranslate">${item.example}</p>
<b>Example:</b><br />
${item.example}
<br />
</c:forEach> </c:forEach>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......
...@@ -52,7 +52,7 @@ Here is the list of known and confirmed issues: ...@@ -52,7 +52,7 @@ Here is the list of known and confirmed issues:
run into this issue. In Tomcat >= 6.0 this behavior can be disabled by setting the run into this issue. In Tomcat >= 6.0 this behavior can be disabled by setting the
system property org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES system property org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES
to false, however Tomcat may then run out of memory. A known workaround is to to false, however Tomcat may then run out of memory. A known workaround is to
put the h2.jar file in a shared <code>lib</code> directory (common/lib). put the h2.jar file in a shared <code class="notranslate">lib</code> directory (common/lib).
</li><li>Some problems have been found with right outer join. Internally, it is converted </li><li>Some problems have been found with right outer join. Internally, it is converted
to left outer join, which does not always produce the same results as other databases to left outer join, which does not always produce the same results as other databases
when used in combination with other joins. when used in combination with other joins.
...@@ -92,11 +92,11 @@ By default, a new database is automatically created if it does not yet exist. ...@@ -92,11 +92,11 @@ By default, a new database is automatically created if it does not yet exist.
<br /> <br />
<h3 id="connect">How to Connect to a Database?</h3> <h3 id="connect">How to Connect to a Database?</h3>
<p> <p>
The database driver is <code>org.h2.Driver</code>, The database driver is <code class="notranslate">org.h2.Driver</code>,
and the database URL starts with <code>jdbc:h2:</code>. and the database URL starts with <code class="notranslate">jdbc:h2:</code>.
To connect to a database using JDBC, use the following code: To connect to a database using JDBC, use the following code:
</p> </p>
<pre> <pre class="notranslate">
Class.forName("org.h2.Driver"); Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", ""); Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
</pre> </pre>
...@@ -104,14 +104,14 @@ Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", ""); ...@@ -104,14 +104,14 @@ Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
<br /> <br />
<h3 id="database_files">Where are the Database Files Stored?</h3> <h3 id="database_files">Where are the Database Files Stored?</h3>
<p> <p>
When using database URLs like jdbc:h2:~/test, the database is stored in the user directory. When using database URLs like <code class="notranslate">jdbc:h2:~/test</code>, the database is stored in the user directory.
For Windows, this is usually "C:\Documents and Settings\&lt;userName&gt;". For Windows, this is usually C:\Documents and Settings\&lt;userName&gt;".
If the base directory is not set (as in jdbc:h2:test), the database files are stored in the directory where the application is started If the base directory is not set (as in <code class="notranslate">jdbc:h2:test</code>), the database files are stored in the directory where the application is started
(the current working directory). When using the H2 Console application from the start menu, this is "&lt;Installation Directory&gt;/bin". (the current working directory). When using the H2 Console application from the start menu, this is "&lt;Installation Directory&gt;/bin".
The base directory can be set in the database URL. A fixed or relative path can be used. When using the URL The base directory can be set in the database URL. A fixed or relative path can be used. When using the URL
jdbc:h2:file:data/sample, the database is stored in the directory "data" (relative to the current working directory). jdbc:h2:file:data/sample, the database is stored in the directory "data" (relative to the current working directory).
The directory is created automatically if it does not yet exist. It is also possible to use the fully qualified directory name (and for Windows, drive name). The directory is created automatically if it does not yet exist. It is also possible to use the fully qualified directory name (and for Windows, drive name).
Example: jdbc:h2:file:C:/data/test Example: <code class="notranslate">jdbc:h2:file:C:/data/test</code>
</p> </p>
<br /> <br />
......
...@@ -75,6 +75,15 @@ Initial Developer: H2 Group ...@@ -75,6 +75,15 @@ Initial Developer: H2 Group
<a href="faq.html"> FAQ </a><br /> <a href="faq.html"> FAQ </a><br />
<a href="license.html"> License </a><br /> <a href="license.html"> License </a><br />
<br /> <br />
<div id = "google_translate_element"></div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</div> </div>
</div> </div>
</td> </td>
......
...@@ -18,42 +18,49 @@ Functions ...@@ -18,42 +18,49 @@ Functions
<h1>Functions</h1> <h1>Functions</h1>
<h2>Aggregate Functions</h2> <h2>Aggregate Functions</h2>
<p class="notranslate">
<c:forEach var="item" items="functionsAggregate"> <c:forEach var="item" items="functionsAggregate">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}" >${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<h2>Numeric Functions</h2> <h2>Numeric Functions</h2>
<p class="notranslate">
<c:forEach var="item" items="functionsNumeric"> <c:forEach var="item" items="functionsNumeric">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}">${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<h2>String Functions</h2> <h2>String Functions</h2>
<p class="notranslate">
<c:forEach var="item" items="functionsString"> <c:forEach var="item" items="functionsString">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}">${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<h2>Time and Date Functions</h2> <h2>Time and Date Functions</h2>
<p class="notranslate">
<c:forEach var="item" items="functionsTimeDate"> <c:forEach var="item" items="functionsTimeDate">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}">${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<h2>System Functions</h2> <h2>System Functions</h2>
<p class="notranslate">
<c:forEach var="item" items="functionsSystem"> <c:forEach var="item" items="functionsSystem">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}">${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<c:forEach var="item" items="functionsAll"> <c:forEach var="item" items="functionsAll">
<br /> <br />
<h3 id="${item.link}">${item.topic}</h3> <h3 id="${item.link}" class="notranslate">${item.topic}</h3>
<pre> <pre class="notranslate">
${item.syntax} ${item.syntax}
</pre> </pre>
<p> <p>${item.text}</p>
${item.text} <b>Example:</b>
</p> <p class="notranslate">${item.example}</p>
<b>Example:</b><br />
${item.example}
<br />
</c:forEach> </c:forEach>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......
...@@ -17,73 +17,84 @@ SQL Grammar ...@@ -17,73 +17,84 @@ SQL Grammar
<h1>SQL Grammar</h1> <h1>SQL Grammar</h1>
<h2>Commands (Data Manipulation)</h2> <h2>Commands (Data Manipulation)</h2>
<p class="notranslate">
<c:forEach var="item" items="commandsDML"> <c:forEach var="item" items="commandsDML">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}">${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<h2>Commands (Data Definition)</h2> <h2>Commands (Data Definition)</h2>
<p class="notranslate">
<c:forEach var="item" items="commandsDDL"> <c:forEach var="item" items="commandsDDL">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}">${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<h2>Commands (Other)</h2> <h2>Commands (Other)</h2>
<p class="notranslate">
<c:forEach var="item" items="commandsOther"> <c:forEach var="item" items="commandsOther">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}">${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<h2>Other Grammar</h2> <h2>Other Grammar</h2>
<p class="notranslate">
<c:forEach var="item" items="otherGrammar"> <c:forEach var="item" items="otherGrammar">
<a href="#${item.link}">${item.topic}</a><br /> <a href="#${item.link}" >${item.topic}</a><br />
</c:forEach> </c:forEach>
</p>
<h2>System Tables</h2> <h2>System Tables</h2>
<p class="notranslate">
<a href="#information_schema">Information Schema</a><br /> <a href="#information_schema">Information Schema</a><br />
<a href="#range_table">Range Table</a><br /> <a href="#range_table">Range Table</a><br />
</p>
<c:forEach var="item" items="commands"> <c:forEach var="item" items="commands">
<br /> <br />
<h3 id="${item.link}">${item.topic}</h3> <h3 id="${item.link}" class="notranslate">${item.topic}</h3>
<pre> <pre class="notranslate">
${item.syntax} ${item.syntax}
</pre> </pre>
<p> <p>${item.text}</p>
${item.text} <b>Example:</b>
</p> <p class="notranslate">${item.example}</p>
<b>Example:</b><br />
${item.example}
<br />
</c:forEach> </c:forEach>
<c:forEach var="item" items="otherGrammar"> <c:forEach var="item" items="otherGrammar">
<br /> <br />
<h3 id="${item.link}">${item.topic}</h3> <h3 id="${item.link}" class="notranslate">${item.topic}</h3>
<pre> <pre class="notranslate">
${item.syntax} ${item.syntax}
</pre> </pre>
<p> <p>${item.text}</p>
${item.text} <b>Example:</b>
</p> <p class="notranslate">${item.example}</p>
<b>Example:</b><br />
${item.example}
<br />
</c:forEach> </c:forEach>
<br /> <br />
<h3 id="information_schema">Information Schema</h3> <h3 id="information_schema" class="notranslate">Information Schema</h3>
<p> <p>
The system tables in the schema 'INFORMATION_SCHEMA' contain the meta data The system tables in the schema 'INFORMATION_SCHEMA' contain the meta data
of all tables in the database as well as the current settings. of all tables in the database as well as the current settings.
</p> </p>
<table><tr><th>Table</th><th>Columns</th></tr> <table><tr><th>Table</th><th>Columns</th></tr>
<c:forEach var="item" items="informationSchema"> <c:forEach var="item" items="informationSchema">
<tr><td>${item.topic}</td><td>${item.syntax}</td></tr> <tr class="notranslate">
<td>${item.topic}</td>
<td>${item.syntax}</td>
</tr>
</c:forEach> </c:forEach>
</table> </table>
<br /> <br />
<h3 id="range_table">Range Table</h3> <h3 id="range_table" class="notranslate">Range Table</h3>
<p> <p>
The range table is a dynamic system table that contains all values from a start to an end value. The range table is a dynamic system table that contains all values from a start to an end value.
The table contains one column called X. Both the start and end values are included in the result. The table contains one column called X. Both the start and end values are included in the result.
The table is used as follows: The table is used as follows:
</p> </p>
<pre> <pre class="notranslate">
SELECT X FROM SYSTEM_RANGE(1, 10); SELECT X FROM SYSTEM_RANGE(1, 10);
</pre> </pre>
......
...@@ -25,7 +25,7 @@ JaQu replaces SQL, JDBC, and persistence frameworks such as Hibernate. ...@@ -25,7 +25,7 @@ JaQu replaces SQL, JDBC, and persistence frameworks such as Hibernate.
JaQu is something like LINQ for Java (LINQ stands for "language integrated query" and is a JaQu is something like LINQ for Java (LINQ stands for "language integrated query" and is a
Microsoft .NET technology). The following JaQu code: Microsoft .NET technology). The following JaQu code:
</p> </p>
<pre> <pre class="notranslate">
Product p = new Product(); Product p = new Product();
List&lt;Product&gt; soldOutProducts = List&lt;Product&gt; soldOutProducts =
db.from(p).where(p.unitsInStock).is(0).select(); db.from(p).where(p.unitsInStock).is(0).select();
...@@ -33,7 +33,7 @@ List&lt;Product&gt; soldOutProducts = ...@@ -33,7 +33,7 @@ List&lt;Product&gt; soldOutProducts =
<p> <p>
stands for the SQL statement: stands for the SQL statement:
</p> </p>
<pre> <pre class="notranslate">
SELECT * FROM PRODUCTS P SELECT * FROM PRODUCTS P
WHERE P.UNITS_IN_STOCK = 0 WHERE P.UNITS_IN_STOCK = 0
</pre> </pre>
...@@ -77,7 +77,7 @@ JaQu is not part of the h2 jar file, however the source code is included in H2, ...@@ -77,7 +77,7 @@ JaQu is not part of the h2 jar file, however the source code is included in H2,
<h2>Building the JaQu library</h2> <h2>Building the JaQu library</h2>
<p> <p>
To create the JaQu jar file, run: <code>build jarJaqu</code>. This will create the file <code>bin/h2jaqu.jar</code>. To create the JaQu jar file, run: <code class="notranslate">build jarJaqu</code>. This will create the file <code class="notranslate">bin/h2jaqu.jar</code>.
</p> </p>
<h2>Requirements</h2> <h2>Requirements</h2>
...@@ -88,7 +88,7 @@ work with any database that supports the JDBC API. ...@@ -88,7 +88,7 @@ work with any database that supports the JDBC API.
</p> </p>
<h2>Example Code</h2> <h2>Example Code</h2>
<pre> <pre class="notranslate">
package org.h2.test.jaqu; package org.h2.test.jaqu;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
...@@ -229,7 +229,7 @@ To define table indices, or if you want to map a class to a table with a differe ...@@ -229,7 +229,7 @@ To define table indices, or if you want to map a class to a table with a differe
or a field to a column with another name, create a function called 'define' in the data class. or a field to a column with another name, create a function called 'define' in the data class.
Example: Example:
</p> </p>
<pre> <pre class="notranslate">
public class Product implements Table { public class Product implements Table {
public Integer productId; public Integer productId;
...@@ -262,7 +262,7 @@ To do that, the condition class is de-compiled to a SQL condition. ...@@ -262,7 +262,7 @@ To do that, the condition class is de-compiled to a SQL condition.
A proof of concept decompiler is included (but it doesn't work yet). A proof of concept decompiler is included (but it doesn't work yet).
The planned syntax is: The planned syntax is:
</p> </p>
<pre> <pre class="notranslate">
long count = db.from(co). long count = db.from(co).
where(new Filter() { public boolean where() { where(new Filter() { public boolean where() {
return co.id == x return co.id == x
...@@ -287,7 +287,7 @@ Some ideas for what to implement are: ...@@ -287,7 +287,7 @@ Some ideas for what to implement are:
</li></ul> </li></ul>
<h2>Related Projects</h2> <h2>Related Projects</h2>
<p> <p class="notranslate">
<a href="http://code.google.com/p/dreamsource-orm">Dreamsource ORM</a><br /> <a href="http://code.google.com/p/dreamsource-orm">Dreamsource ORM</a><br />
<a href="http://incubator.apache.org/empire-db/empiredb/empiredb.htm">Empire-db</a><br /> <a href="http://incubator.apache.org/empire-db/empiredb/empiredb.htm">Empire-db</a><br />
<a href="http://www.jequel.de">JEQUEL: Java Embedded QUEry Language</a><br /> <a href="http://www.jequel.de">JEQUEL: Java Embedded QUEry Language</a><br />
......
...@@ -79,7 +79,7 @@ Welcome to H2, the Java SQL database. The main features of H2 are: ...@@ -79,7 +79,7 @@ Welcome to H2, the Java SQL database. The main features of H2 are:
<tr><td colspan="3" style="border: 0px; padding: 5px 0px 15px 0px;"> <tr><td colspan="3" style="border: 0px; padding: 5px 0px 15px 0px;">
<h3>Features</h3> <h3>Features</h3>
<table style="width: 425px;"><tr> <table style="width: 425px;"><tr class="notranslate">
<th></th> <th></th>
<th>H2</th> <th>H2</th>
<th><a href="http://db.apache.org/derby">Derby</a></th> <th><a href="http://db.apache.org/derby">Derby</a></th>
......
...@@ -107,7 +107,7 @@ HSQLDB is fast when using simple operations. ...@@ -107,7 +107,7 @@ HSQLDB is fast when using simple operations.
HSQLDB is very slow in the last test (BenchC: Transactions), probably because is has a bad query optimizer. HSQLDB is very slow in the last test (BenchC: Transactions), probably because is has a bad query optimizer.
One query where HSQLDB is slow is a two-table join: One query where HSQLDB is slow is a two-table join:
</p> </p>
<pre> <pre class="notranslate">
SELECT COUNT(DISTINCT S_I_ID) FROM ORDER_LINE, STOCK SELECT COUNT(DISTINCT S_I_ID) FROM ORDER_LINE, STOCK
WHERE OL_W_ID=? AND OL_D_ID=? AND OL_O_ID&lt;? AND OL_O_ID&gt;=? WHERE OL_W_ID=? AND OL_D_ID=? AND OL_O_ID&lt;? AND OL_O_ID&gt;=?
AND S_W_ID=? AND S_I_ID=OL_I_ID AND S_QUANTITY&lt;? AND S_W_ID=? AND S_I_ID=OL_I_ID AND S_QUANTITY&lt;?
...@@ -178,7 +178,7 @@ SQLite was not tested because the JDBC driver doesn't support transactions. ...@@ -178,7 +178,7 @@ SQLite was not tested because the JDBC driver doesn't support transactions.
<p> <p>
This test was executed as follows: This test was executed as follows:
</p> </p>
<pre> <pre class="notranslate">
build benchmark build benchmark
</pre> </pre>
...@@ -310,7 +310,7 @@ poleposition-0.20/lib/hsqldb.jar with a newer version (for example hsqldb-1.8.0. ...@@ -310,7 +310,7 @@ poleposition-0.20/lib/hsqldb.jar with a newer version (for example hsqldb-1.8.0.
and then use the setting and then use the setting
hsqldb.connecturl=jdbc:hsqldb:file:data/hsqldb/dbbench2;hsqldb.default_table_type=cached;sql.enforce_size=true in Jdbc.properties. hsqldb.connecturl=jdbc:hsqldb:file:data/hsqldb/dbbench2;hsqldb.default_table_type=cached;sql.enforce_size=true in Jdbc.properties.
</li><li>HSQLDB keeps the database open between tests, while H2 closes the database (losing all the cache). </li><li>HSQLDB keeps the database open between tests, while H2 closes the database (losing all the cache).
To change that, use the database URL jdbc:h2:file:data/h2/dbbench;DB_CLOSE_DELAY=-1 To change that, use the database URL <code class="notranslate">jdbc:h2:file:data/h2/dbbench;DB_CLOSE_DELAY=-1</code>
</li><li>The amount of cache memory is quite important, specially for the PolePosition test. </li><li>The amount of cache memory is quite important, specially for the PolePosition test.
Unfortunately, the PolePosition test does not take this into account. Unfortunately, the PolePosition test does not take this into account.
</li></ul> </li></ul>
...@@ -332,13 +332,13 @@ A good tool to measure both memory usage and performance is the ...@@ -332,13 +332,13 @@ A good tool to measure both memory usage and performance is the
<p> <p>
A simple way to profile an application is to use the built-in profiling tool of java. Example: A simple way to profile an application is to use the built-in profiling tool of java. Example:
</p> </p>
<pre> <pre class="notranslate">
java -Xrunhprof:cpu=samples,depth=16 com.acme.Test java -Xrunhprof:cpu=samples,depth=16 com.acme.Test
</pre> </pre>
<p> <p>
Unfortunately, it is only possible to profile the application from start to end. Another solution is to create Unfortunately, it is only possible to profile the application from start to end. Another solution is to create
a number of full thread dumps. To do that, first run <code>jps -l</code> to get the process id, and then a number of full thread dumps. To do that, first run <code class="notranslate">jps -l</code> to get the process id, and then
run <code>jstack &lt;pid&gt;</code> or <code>kill -QUIT &lt;pid&gt;</code> (Linux) or press run <code class="notranslate">jstack &lt;pid&gt;</code> or <code class="notranslate">kill -QUIT &lt;pid&gt;</code> (Linux) or press
Ctrl+C (Windows). Ctrl+C (Windows).
</p> </p>
...@@ -349,7 +349,7 @@ The ConvertTraceFile tool generates SQL statement statistics at the end of the S ...@@ -349,7 +349,7 @@ The ConvertTraceFile tool generates SQL statement statistics at the end of the S
The format used is similar to the profiling data generated when using java -Xrunhprof. The format used is similar to the profiling data generated when using java -Xrunhprof.
As an example, execute the the following script using the H2 Console: As an example, execute the the following script using the H2 Console:
</p> </p>
<pre> <pre class="notranslate">
SET TRACE_LEVEL_FILE 3; SET TRACE_LEVEL_FILE 3;
DROP TABLE IF EXISTS TEST; DROP TABLE IF EXISTS TEST;
CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255)); CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255));
...@@ -359,15 +359,15 @@ SET TRACE_LEVEL_FILE 0; ...@@ -359,15 +359,15 @@ SET TRACE_LEVEL_FILE 0;
<p> <p>
Now convert the .trace.db file using the ConvertTraceFile tool: Now convert the .trace.db file using the ConvertTraceFile tool:
</p> </p>
<pre> <pre class="notranslate">
java -cp h2*.jar org.h2.tools.ConvertTraceFile java -cp h2*.jar org.h2.tools.ConvertTraceFile
-traceFile "~/test.trace.db" -script "~/test.sql" -traceFile "~/test.trace.db" -script "~/test.sql"
</pre> </pre>
<p> <p>
The generated file <code>test.sql</code> will contain the SQL statements as well as the The generated file <code class="notranslate">test.sql</code> will contain the SQL statements as well as the
following profiling data (results vary): following profiling data (results vary):
</p> </p>
<pre> <pre class="notranslate">
----------------------------------------- -----------------------------------------
-- SQL Statement Statistics -- SQL Statement Statistics
-- time: total time in milliseconds (accumulated) -- time: total time in milliseconds (accumulated)
...@@ -387,7 +387,7 @@ following profiling data (results vary): ...@@ -387,7 +387,7 @@ following profiling data (results vary):
<h3>Use a Modern JVM</h3> <h3>Use a Modern JVM</h3>
<p> <p>
Newer JVMs are faster. Upgrading to the latest version of your JVM can provide a "free" boost to performance. Newer JVMs are faster. Upgrading to the latest version of your JVM can provide a "free" boost to performance.
Switching from the default Client JVM to the Server JVM using the <code>-server</code> command-line Switching from the default Client JVM to the Server JVM using the <code class="notranslate">-server</code> command-line
option improves performance at the cost of a slight increase in start-up time. option improves performance at the cost of a slight increase in start-up time.
</p> </p>
...@@ -475,7 +475,7 @@ queries and data manipulation. ...@@ -475,7 +475,7 @@ queries and data manipulation.
</p> </p>
<p>In-memory indexes are automatically used <p>In-memory indexes are automatically used
for in-memory databases, but can also be created for persistent databases for in-memory databases, but can also be created for persistent databases
using <code>CREATE MEMORY TABLE</code>. In many cases, using <code class="notranslate">CREATE MEMORY TABLE</code>. In many cases,
the rows itself will also be kept in-memory. Please note this may cause memory the rows itself will also be kept in-memory. Please note this may cause memory
problems for large tables. problems for large tables.
</p> </p>
...@@ -483,13 +483,13 @@ problems for large tables. ...@@ -483,13 +483,13 @@ problems for large tables.
In-memory hash indexes are backed by a hash table and are usually faster than In-memory hash indexes are backed by a hash table and are usually faster than
regular indexes. However, hash indexes only supports direct lookup (WHERE ID = ?) regular indexes. However, hash indexes only supports direct lookup (WHERE ID = ?)
but not range scan (WHERE ID &lt; ?). To use hash indexes, use HASH as in: but not range scan (WHERE ID &lt; ?). To use hash indexes, use HASH as in:
<code>CREATE UNIQUE HASH INDEX</code> and <code class="notranslate">CREATE UNIQUE HASH INDEX</code> and
<code>CREATE TABLE ...(ID INT PRIMARY KEY HASH,...)</code>. <code class="notranslate">CREATE TABLE ...(ID INT PRIMARY KEY HASH,...)</code>.
</p> </p>
<h3>Optimization Examples</h3> <h3>Optimization Examples</h3>
<p> <p>
See <code>src/test/org/h2/samples/optimizations.sql</code> for a few examples of queries See <code class="notranslate">src/test/org/h2/samples/optimizations.sql</code> for a few examples of queries
that benefit from special optimizations built into the database. that benefit from special optimizations built into the database.
</p> </p>
...@@ -522,7 +522,7 @@ To speed up large imports, consider using the following options temporarily: ...@@ -522,7 +522,7 @@ To speed up large imports, consider using the following options temporarily:
</li></ul> </li></ul>
<p> <p>
These options can be set in the database URL: These options can be set in the database URL:
<code>jdbc:h2:~/test;CACHE_SIZE=65536;LOCK_MODE=0;LOG=0;UNDO_LOG=0</code>. <code class="notranslate">jdbc:h2:~/test;CACHE_SIZE=65536;LOCK_MODE=0;LOG=0;UNDO_LOG=0</code>.
Most of those options are not recommended for regular use, that means you need to reset them after use. Most of those options are not recommended for regular use, that means you need to reset them after use.
</p> </p>
......
...@@ -27,9 +27,9 @@ Quickstart ...@@ -27,9 +27,9 @@ Quickstart
This database can be used in embedded mode, or in server mode. To use it in embedded mode, you need to: This database can be used in embedded mode, or in server mode. To use it in embedded mode, you need to:
</p> </p>
<ul> <ul>
<li>Add the <code>h2*.jar</code> to the classpath (H2 does not have any dependencies) <li>Add the <code class="notranslate">h2*.jar</code> to the classpath (H2 does not have any dependencies)
</li><li>Use the JDBC driver class: <code>org.h2.Driver</code> </li><li>Use the JDBC driver class: <code class="notranslate">org.h2.Driver</code>
</li><li>The database URL <code>jdbc:h2:~/test</code> opens the database 'test' in your user home directory </li><li>The database URL <code class="notranslate">jdbc:h2:~/test</code> opens the database 'test' in your user home directory
</li><li>A new database is automatically created </li><li>A new database is automatically created
</li></ul> </li></ul>
......
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.
...@@ -297,6 +297,9 @@ java org.h2.test.TestAll timer ...@@ -297,6 +297,9 @@ java org.h2.test.TestAll timer
/* /*
disable translation in download
<span class="notranslate"></span>
mvcc merge problem mvcc merge problem
System.setProperty("h2.optimizeInList", "true"); System.setProperty("h2.optimizeInList", "true");
......
...@@ -128,10 +128,11 @@ public class GenerateDoc { ...@@ -128,10 +128,11 @@ public class GenerateDoc {
for (int i = 0; i < meta.getColumnCount(); i++) { for (int i = 0; i < meta.getColumnCount(); i++) {
String k = StringUtils.toLowerEnglish(meta.getColumnLabel(i + 1)); String k = StringUtils.toLowerEnglish(meta.getColumnLabel(i + 1));
String value = rs.getString(i + 1); String value = rs.getString(i + 1);
value = value.trim();
map.put(k, PageParser.escapeHtml(value)); map.put(k, PageParser.escapeHtml(value));
} }
String topic = rs.getString("TOPIC"); String topic = rs.getString("TOPIC");
String syntax = rs.getString("SYNTAX"); String syntax = rs.getString("SYNTAX").trim();
syntax = PageParser.escapeHtml(syntax); syntax = PageParser.escapeHtml(syntax);
// if enabled, HTML docs get very wide // if enabled, HTML docs get very wide
// syntax = StringUtils.replaceAll(syntax, "<br />", " "); // syntax = StringUtils.replaceAll(syntax, "<br />", " ");
...@@ -141,7 +142,6 @@ public class GenerateDoc { ...@@ -141,7 +142,6 @@ public class GenerateDoc {
// remove newlines in the regular text // remove newlines in the regular text
String text = map.get("text"); String text = map.get("text");
if (text != null) { if (text != null) {
text = text.trim();
// text is enclosed in <p> .. </p> so this works. // text is enclosed in <p> .. </p> so this works.
text = StringUtils.replaceAll(text, "<br /><br />", "</p><p>"); text = StringUtils.replaceAll(text, "<br /><br />", "</p><p>");
text = StringUtils.replaceAll(text, "<br />", " "); text = StringUtils.replaceAll(text, "<br />", " ");
...@@ -153,6 +153,7 @@ public class GenerateDoc { ...@@ -153,6 +153,7 @@ public class GenerateDoc {
// link = StringUtils.replaceAll(link, "_", ""); // link = StringUtils.replaceAll(link, "_", "");
link = StringUtils.replaceAll(link, "@", "_"); link = StringUtils.replaceAll(link, "@", "_");
map.put("link", StringUtils.urlEncode(link)); map.put("link", StringUtils.urlEncode(link));
list.add(map); list.add(map);
} }
session.put(key, list); session.put(key, list);
......
...@@ -613,4 +613,5 @@ modern slight boost characteristics significantly gae vfs centrally ten ...@@ -613,4 +613,5 @@ modern slight boost characteristics significantly gae vfs centrally ten
approach risky getters suxxess gmb delegate delegating delegates collisions approach risky getters suxxess gmb delegate delegating delegates collisions
linkage superfluous disallow scoop moebius inputs copilot dmoebius leod jenkov linkage superfluous disallow scoop moebius inputs copilot dmoebius leod jenkov
jakob poker docware peter unstable measurable scramble reissued recreation jakob poker docware peter unstable measurable scramble reissued recreation
scrambling distinguish official unofficial distinguishable overwrites lastval scrambling distinguish official unofficial distinguishable overwrites lastval
\ No newline at end of file notranslate
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论