提交 20294dfb authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation: improved website translation

上级 a08877c0
...@@ -67,20 +67,20 @@ Newer version or compatible software works too. ...@@ -67,20 +67,20 @@ Newer version or compatible software works too.
<h2 id="building">Building the Software</h2> <h2 id="building">Building the Software</h2>
<p> <p>
You need to install a JDK, for example the Sun JDK version 1.5 or 1.6. You need to install a JDK, for example the Sun JDK version 1.5 or 1.6.
Ensure that Java binary directory is included in the <code class="notranslate">PATH</code> environment variable, and that Ensure that Java binary directory is included in the <code>PATH</code> environment variable, and that
the environment variable <code class="notranslate">JAVA_HOME</code> points to your Java installation. the environment variable <code>JAVA_HOME</code> points to your Java installation.
On the command line, go to the directory <code class="notranslate">h2</code> and execute the following command: On the command line, go to the directory <code>h2</code> and execute the following command:
</p> </p>
<pre class="notranslate"> <pre>
build -? build -?
</pre> </pre>
<p> <p>
For Linux and OS X, use <code class="notranslate">./build.sh</code> instead of <code class="notranslate">build</code>. For Linux and OS X, use <code>./build.sh</code> instead of <code>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 class="notranslate"> <pre>
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 class="notranslate"> <pre>
build switchSource build switchSource
</pre> </pre>
...@@ -98,20 +98,20 @@ build switchSource ...@@ -98,20 +98,20 @@ build switchSource
<p> <p>
The build system can generate smaller jar files as well. The following targets are currently supported: The build system can generate smaller jar files as well. The following targets are currently supported:
</p> </p>
<ul><li><code class="notranslate">jarClient</code> <ul><li><code>jarClient</code>
creates the file <code class="notranslate">h2client.jar</code>. This only contains the JDBC client. creates the file <code>h2client.jar</code>. This only contains the JDBC client.
</li><li><code class="notranslate">jarSmall</code> </li><li><code>jarSmall</code>
creates the file <code class="notranslate">h2small.jar</code>. creates the file <code>h2small.jar</code>.
This only contains the embedded database. Debug information is disabled. This only contains the embedded database. Debug information is disabled.
</li><li><code class="notranslate">jarJaqu</code> </li><li><code>jarJaqu</code>
creates the file <code class="notranslate">h2jaqu.jar</code>. creates the file <code>h2jaqu.jar</code>.
This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu. This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu.
</li><li><code class="notranslate">javadocImpl</code> creates the Javadocs of the implementation. </li><li><code>javadocImpl</code> creates the Javadocs of the implementation.
</li></ul> </li></ul>
<p> <p>
To create the file <code class="notranslate">h2client.jar</code>, go to the directory h2 and execute the following command: To create the file <code>h2client.jar</code>, go to the directory <code>h2</code> and execute the following command:
</p> </p>
<pre class="notranslate"> <pre>
build jarClient build jarClient
</pre> </pre>
...@@ -122,7 +122,7 @@ build jarClient ...@@ -122,7 +122,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 class="notranslate"> <pre>
&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;
...@@ -139,13 +139,13 @@ they are available there. ...@@ -139,13 +139,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 class="notranslate"> <pre>
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 class="notranslate"> <pre>
&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;
...@@ -159,17 +159,17 @@ Afterwards, you can include the database in your Maven 2 project as a dependency ...@@ -159,17 +159,17 @@ Afterwards, you can include the database in your Maven 2 project as a dependency
The translation of this software is split into the following parts: The translation of this software is split into the following parts:
</p> </p>
<ul> <ul>
<li>H2 Console: <code class="notranslate">src/main/org/h2/server/web/res/_text_*.properties</code> <li>H2 Console: <code>src/main/org/h2/server/web/res/_text_*.properties</code>
</li><li>Error messages: <code class="notranslate">src/main/org/h2/res/_messages_*.properties</code> </li><li>Error messages: <code>src/main/org/h2/res/_messages_*.properties</code>
</li><li>Web site: <code class="notranslate">src/docsrc/text/_docs_*.utf8.txt</code> </li><li>Web site: <code>src/docsrc/text/_docs_*.utf8.txt</code>
</li></ul> </li></ul>
<p> <p>
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 <code class="notranslate">\u</code> syntax), The conversion between UTF-8 and Java encoding (using the <code>\u</code> syntax),
as well as the HTML entities (<code class="notranslate">&amp;#..;</code>) as well as the HTML entities (<code>&amp;#..;</code>)
is automated by running the tool <code class="notranslate">PropertiesToUTF8</code>. is automated by running the tool <code>PropertiesToUTF8</code>.
The web site translation is automated as well, The web site translation is automated as well,
using <code class="notranslate">build docs</code>. using <code>build docs</code>.
</p> </p>
<br /> <br />
...@@ -180,25 +180,25 @@ If you like to provide patches, please consider the following guidelines to simp ...@@ -180,25 +180,25 @@ 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 class="notranslate">src/installer/checkstyle.xml</code>. The checkstyle configuration is in <code>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 class="notranslate">src/test/org/h2/test/TestAll.java</code>. For Java level tests, see <code>src/test/org/h2/test/TestAll.java</code>.
For SQL level tests, see <code class="notranslate">src/test/org/h2/test/test.in.txt</code> or For SQL level tests, see <code>src/test/org/h2/test/test.in.txt</code> or
<code class="notranslate">testSimple.in.txt</code>. <code>testSimple.in.txt</code>.
</li><li>The test cases should cover at least 90% of the changed and new 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). use a code coverage tool to verify that (see above).
or use the build target <code class="notranslate">coverage</code>. or use the build target <code>coverage</code>.
</li><li>Verify that you did not break other features: run the test cases by executing </li><li>Verify that you did not break other features: run the test cases by executing
<code class="notranslate">build test</code>. <code>build test</code>.
</li><li>Provide end user documentation if required (<code class="notranslate">src/docsrc/html/*</code>). </li><li>Provide end user documentation if required (<code>src/docsrc/html/*</code>).
</li><li>Document grammar changes in <code class="notranslate">src/main/org/h2/res/help.csv</code> </li><li>Document grammar changes in <code>src/main/org/h2/res/help.csv</code>
</li><li>Provide a change log entry (<code class="notranslate">src/docsrc/html/changelog.html</code>). </li><li>Provide a change log entry (<code>src/docsrc/html/changelog.html</code>).
</li><li>Verify the spelling using <code class="notranslate">build spellcheck</code>. If required </li><li>Verify the spelling using <code>build spellcheck</code>. If required
add the new words to <code class="notranslate">src/tools/org/h2/build/doc/dictionary.txt</code>. add the new words to <code>src/tools/org/h2/build/doc/dictionary.txt</code>.
</li><li>Run the <code class="notranslate">src/installer/buildRelease</code> to find and fix formatting errors. </li><li>Run the <code>src/installer/buildRelease</code> to find and fix formatting errors.
</li><li>Verify the formatting using <code class="notranslate">build docs</code> and </li><li>Verify the formatting using <code>build docs</code> and
<code class="notranslate">build javadoc</code>. <code>build javadoc</code>.
</li><li>Submit patches as <code class="notranslate">.patch</code> files (compressed if big). </li><li>Submit patches as <code>.patch</code> files (compressed if big).
To create a patch using Eclipse, use Team / Create Patch. To create a patch using Eclipse, use Team / Create Patch.
</li></ul> </li></ul>
<p> <p>
...@@ -218,7 +218,7 @@ Eclipse Public License, version 1.0 (http://h2database.com/html/license.html)." ...@@ -218,7 +218,7 @@ Eclipse Public License, version 1.0 (http://h2database.com/html/license.html)."
<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 class="notranslate">./build.sh clean jar coverage -Dh2.ftpPassword=... uploadBuild</code>. <code>./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>
......
...@@ -25,7 +25,7 @@ Data Types ...@@ -25,7 +25,7 @@ Data Types
<c:forEach var="item" items="dataTypes"> <c:forEach var="item" items="dataTypes">
<br /> <br />
<h3 id="${item.link}" class="notranslate">${item.topic}</h3> <h3 id="${item.link}" class="notranslate">${item.topic}</h3>
<pre class="notranslate"> <pre>
${item.syntax} ${item.syntax}
</pre> </pre>
<p>${item.text}</p> <p>${item.text}</p>
......
...@@ -46,21 +46,21 @@ Frequently Asked Questions ...@@ -46,21 +46,21 @@ Frequently Asked Questions
Usually, bugs get fixes as they are found. There is a release every few weeks. Usually, bugs get fixes as they are found. There is a release every few weeks.
Here is the list of known and confirmed issues: Here is the list of known and confirmed issues:
</p> </p>
<ul><li>Tomcat and Glassfish 3 set most static fields (final or non-final) to null when <ul><li>Tomcat and Glassfish 3 set most static fields (final or non-final) to <code>null</code> when
unloading a web application. This can cause a <code class="notranslate">NullPointerException</code> in H2 versions unloading a web application. This can cause a <code>NullPointerException</code> in H2 versions
1.1.107 and older, and may still not work in newer versions. Please report it if you 1.1.107 and older, and may still not work in newer versions. Please report it if you
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 <code class="notranslate">org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES</code> system property <code>org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES</code>
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 class="notranslate">lib</code> directory put the h2.jar file in a shared <code>lib</code> directory
(<code class="notranslate">common/lib</code>). (<code>common/lib</code>).
</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.
</li><li>When using Install4j before 4.1.4 on Linux and enabling 'pack200', </li><li>When using Install4j before 4.1.4 on Linux and enabling <code>pack200</code>,
the <code class="notranslate">h2*.jar</code> becomes corrupted by the install process, causing application failure. the <code>h2*.jar</code> becomes corrupted by the install process, causing application failure.
A workaround is to add an empty file <code class="notranslate">h2*.jar.nopack</code> A workaround is to add an empty file <code>h2*.jar.nopack</code>
next to the <code class="notranslate">h2*.jar</code> file. next to the <code>h2*.jar</code> file.
This problem is solved in Install4j 4.1.4. This problem is solved in Install4j 4.1.4.
</li></ul> </li></ul>
...@@ -74,15 +74,15 @@ See also under license. ...@@ -74,15 +74,15 @@ See also under license.
<br /> <br />
<h3 id="query_slow">My Query is Slow</h3> <h3 id="query_slow">My Query is Slow</h3>
<p> <p>
Slow <code class="notranslate">SELECT</code> (or <code class="notranslate">DELETE, UPDATE, MERGE</code>) Slow <code>SELECT</code> (or <code>DELETE, UPDATE, MERGE</code>)
statement can have multiple reasons. Follow this checklist: statement can have multiple reasons. Follow this checklist:
</p> </p>
<ul> <ul>
<li>Run <code class="notranslate">ANALYZE</code> (see documentation for details). <li>Run <code>ANALYZE</code> (see documentation for details).
</li><li>Run the query with <code class="notranslate">EXPLAIN</code> and check if indexes are used </li><li>Run the query with <code>EXPLAIN</code> and check if indexes are used
(see documentation for details). (see documentation for details).
</li><li>If required, create additional indexes and try again using </li><li>If required, create additional indexes and try again using
<code class="notranslate">ANALYZE</code> and <code class="notranslate">EXPLAIN</code>. <code>ANALYZE</code> and <code>EXPLAIN</code>.
</li><li>If it doesn't help please report the problem. </li><li>If it doesn't help please report the problem.
</li> </li>
</ul> </ul>
...@@ -96,11 +96,11 @@ By default, a new database is automatically created if it does not yet exist. ...@@ -96,11 +96,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 class="notranslate">org.h2.Driver</code>, The database driver is <code>org.h2.Driver</code>,
and the database URL starts with <code class="notranslate">jdbc:h2:</code>. and the database URL starts with <code>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 class="notranslate"> <pre>
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>
...@@ -108,19 +108,19 @@ Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", ""); ...@@ -108,19 +108,19 @@ 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 <code class="notranslate">jdbc:h2:~/test</code>, When using database URLs like <code>jdbc:h2:~/test</code>,
the database is stored in the user directory. 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 <code class="notranslate">jdbc:h2:test</code>), If the base directory is not set (as in <code>jdbc:h2:test</code>),
the database files are stored in the directory where the application is started 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, (the current working directory). When using the H2 Console application from the start menu,
this is "&lt;Installation Directory&gt;/bin". 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
<code class="notranslate">jdbc:h2:file:data/sample</code>, the database is stored in the directory <code>jdbc:h2:file:data/sample</code>, the database is stored in the directory
<code class="notranslate">data</code> (relative to the current working directory). <code>data</code> (relative to the current working directory).
The directory is created automatically if it does not yet exist. It is also possible to use the 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). fully qualified directory name (and for Windows, drive name).
Example: <code class="notranslate">jdbc:h2:file:C:/data/test</code> Example: <code>jdbc:h2:file:C:/data/test</code>
</p> </p>
<br /> <br />
...@@ -135,7 +135,7 @@ See <a href="advanced.html#limits_limitations">Limits and Limitations</a>. ...@@ -135,7 +135,7 @@ See <a href="advanced.html#limits_limitations">Limits and Limitations</a>.
Some users have reported that after a power failure, the database can sometimes not be Some users have reported that after a power failure, the database can sometimes not be
opened because the index file is corrupt. In that case, the index file can be deleted opened because the index file is corrupt. In that case, the index file can be deleted
(it is automatically re-created). To avoid this, append (it is automatically re-created). To avoid this, append
<code class="notranslate">;LOG=2</code> to the database URL. <code>;LOG=2</code> to the database URL.
See also: <a href="grammar.html#set_log" class="notranslate">SET LOG</a>. This problem will be solved See also: <a href="grammar.html#set_log" class="notranslate">SET LOG</a>. This problem will be solved
using the new 'page store' mechanism (currently beta). using the new 'page store' mechanism (currently beta).
</p> </p>
...@@ -148,13 +148,13 @@ to be dangerous, they are only supported for situations where performance is mor ...@@ -148,13 +148,13 @@ to be dangerous, they are only supported for situations where performance is mor
than reliability. Those dangerous features are: than reliability. Those dangerous features are:
</p> </p>
<ul> <ul>
<li>Disabling the transaction log mechanism using <code class="notranslate">SET LOG 0</code>. <li>Disabling the transaction log mechanism using <code>SET LOG 0</code>.
</li><li>Using the transaction isolation level <code class="notranslate">READ_UNCOMMITTED</code> </li><li>Using the transaction isolation level <code>READ_UNCOMMITTED</code>
(<code class="notranslate">LOCK_MODE 0</code>) while at the same time using multiple (<code>LOCK_MODE 0</code>) while at the same time using multiple
connections. connections.
</li><li>Disabling database file protection using <code class="notranslate">FILE_LOCK=NO</code> </li><li>Disabling database file protection using <code>FILE_LOCK=NO</code>
in the database URL. in the database URL.
</li><li>Disabling referential integrity using <code class="notranslate">SET REFERENTIAL_INTEGRITY FALSE</code>. </li><li>Disabling referential integrity using <code>SET REFERENTIAL_INTEGRITY FALSE</code>.
</li></ul> </li></ul>
<p> <p>
In addition to that, running out of memory should be avoided. In addition to that, running out of memory should be avoided.
...@@ -165,8 +165,8 @@ Areas that are not fully tested: ...@@ -165,8 +165,8 @@ Areas that are not fully tested:
</p> </p>
<ul> <ul>
<li>Platforms other than Windows XP, Linux, Mac OS X, or JVMs other than Sun 1.5 or 1.6 <li>Platforms other than Windows XP, Linux, Mac OS X, or JVMs other than Sun 1.5 or 1.6
</li><li>The features <code class="notranslate">AUTO_SERVER</code> and </li><li>The features <code>AUTO_SERVER</code> and
<code class="notranslate">AUTO_RECONNECT</code> <code>AUTO_RECONNECT</code>
</li><li>The MVCC (multi version concurrency) mode </li><li>The MVCC (multi version concurrency) mode
</li><li>Cluster mode, 2-phase commit, savepoints </li><li>Cluster mode, 2-phase commit, savepoints
</li><li>24/7 operation </li><li>24/7 operation
...@@ -181,7 +181,7 @@ Areas considered experimental are: ...@@ -181,7 +181,7 @@ Areas considered experimental are:
</p> </p>
<ul> <ul>
<li>The PostgreSQL server <li>The PostgreSQL server
</li><li>Multi-threading within the engine using <code class="notranslate">SET MULTI_THREADED=1</code> </li><li>Multi-threading within the engine using <code>SET MULTI_THREADED=1</code>
</li><li>Compatibility modes for other databases (only some features are implemented) </li><li>Compatibility modes for other databases (only some features are implemented)
</li></ul> </li></ul>
...@@ -191,16 +191,16 @@ Areas considered experimental are: ...@@ -191,16 +191,16 @@ Areas considered experimental are:
If it takes a long time to open a database, in most cases it was not closed the last time. If it takes a long time to open a database, in most cases it was not closed the last time.
This is specially a problem for larger databases. This is specially a problem for larger databases.
To close a database, close all connections to it before the application ends, or execute To close a database, close all connections to it before the application ends, or execute
the command <code class="notranslate">SHUTDOWN</code>. the command <code>SHUTDOWN</code>.
The database is also closed when the virtual machine exits normally The database is also closed when the virtual machine exits normally
by using a shutdown hook. However killing a Java process or calling Runtime.halt will prevent this. by using a shutdown hook. However killing a Java process or calling Runtime.halt will prevent this.
The reason why opening is slow in this situations is that indexes are re-created. The reason why opening is slow in this situations is that indexes are re-created.
If you can not guarantee the database is closed, consider using If you can not guarantee the database is closed, consider using
<code class="notranslate">SET LOG 2</code> (see SQL Grammar). <code>SET LOG 2</code> (see SQL Grammar).
</p> </p>
<p> <p>
To find out what the problem is, open the database in embedded mode using the H2 Console. To find out what the problem is, open the database in embedded mode using the H2 Console.
This will print progress information. If you have many 'Creating index' lines it is an indication that the This will print progress information. If you have many lines with 'Creating index' it is an indication that the
database was not closed the last time. database was not closed the last time.
</p> </p>
<p> <p>
......
...@@ -56,7 +56,7 @@ Initial Developer: H2 Group ...@@ -56,7 +56,7 @@ Initial Developer: H2 Group
<a href="tutorial.html"> Tutorial </a><br /> <a href="tutorial.html"> Tutorial </a><br />
<a href="features.html"> Features </a><br /> <a href="features.html"> Features </a><br />
<a href="performance.html"> Performance </a><br /> <a href="performance.html"> Performance </a><br />
<a href="advanced.html"> Advanced Topics </a><br /> <a href="advanced.html"> Advanced </a><br />
<a href="jaqu.html"> JaQu </a><br /> <a href="jaqu.html"> JaQu </a><br />
<a href="download.html"> Download </a><br /> <a href="download.html"> Download </a><br />
<br /> <br />
...@@ -65,8 +65,8 @@ Initial Developer: H2 Group ...@@ -65,8 +65,8 @@ Initial Developer: H2 Group
<a href="functions.html"> Functions </a><br /> <a href="functions.html"> Functions </a><br />
<a href="datatypes.html"> Data Types </a><br /> <a href="datatypes.html"> Data Types </a><br />
<a href="../javadoc/index.html"> Javadoc </a><br /> <a href="../javadoc/index.html"> Javadoc </a><br />
<a href="../h2.pdf"> Docs as PDF (1 MB) </a><br />
<a href="sourceError.html"> Error Analyzer </a><br /> <a href="sourceError.html"> Error Analyzer </a><br />
<a href="../h2.pdf"> PDF (1 MB) </a><br />
<br /> <br />
<b> Appendix </b><br /> <b> Appendix </b><br />
<a href="build.html"> Build </a><br /> <a href="build.html"> Build </a><br />
......
...@@ -55,7 +55,7 @@ Functions ...@@ -55,7 +55,7 @@ Functions
<c:forEach var="item" items="functionsAll"> <c:forEach var="item" items="functionsAll">
<br /> <br />
<h3 id="${item.link}" class="notranslate">${item.topic}</h3> <h3 id="${item.link}" class="notranslate">${item.topic}</h3>
<pre class="notranslate"> <pre>
${item.syntax} ${item.syntax}
</pre> </pre>
<p>${item.text}</p> <p>${item.text}</p>
......
...@@ -53,7 +53,7 @@ SQL Grammar ...@@ -53,7 +53,7 @@ SQL Grammar
<c:forEach var="item" items="commands"> <c:forEach var="item" items="commands">
<br /> <br />
<h3 id="${item.link}" class="notranslate">${item.topic}</h3> <h3 id="${item.link}" class="notranslate">${item.topic}</h3>
<pre class="notranslate"> <pre>
${item.syntax} ${item.syntax}
</pre> </pre>
<p>${item.text}</p> <p>${item.text}</p>
...@@ -64,7 +64,7 @@ ${item.syntax} ...@@ -64,7 +64,7 @@ ${item.syntax}
<c:forEach var="item" items="otherGrammar"> <c:forEach var="item" items="otherGrammar">
<br /> <br />
<h3 id="${item.link}" class="notranslate">${item.topic}</h3> <h3 id="${item.link}" class="notranslate">${item.topic}</h3>
<pre class="notranslate"> <pre>
${item.syntax} ${item.syntax}
</pre> </pre>
<p>${item.text}</p> <p>${item.text}</p>
...@@ -75,7 +75,7 @@ ${item.syntax} ...@@ -75,7 +75,7 @@ ${item.syntax}
<br /> <br />
<h3 id="information_schema" class="notranslate">Information Schema</h3> <h3 id="information_schema" class="notranslate">Information Schema</h3>
<p> <p>
The system tables in the schema <code class="notranslate">INFORMATION_SCHEMA</code> contain the meta data The system tables in the schema <code>INFORMATION_SCHEMA</code> 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>
...@@ -94,7 +94,7 @@ The range table is a dynamic system table that contains all values from a start ...@@ -94,7 +94,7 @@ The range table is a dynamic system table that contains all values from a start
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 class="notranslate"> <pre>
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 class="notranslate"> <pre>
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 class="notranslate"> <pre>
SELECT * FROM PRODUCTS P SELECT * FROM PRODUCTS P
WHERE P.UNITS_IN_STOCK = 0 WHERE P.UNITS_IN_STOCK = 0
</pre> </pre>
...@@ -56,8 +56,8 @@ JaQu provides full control over when and what SQL statements are executed. ...@@ -56,8 +56,8 @@ JaQu provides full control over when and what SQL statements are executed.
<h3>Restrictions</h3> <h3>Restrictions</h3>
<p> <p>
Primitive types (eg. <code class="notranslate">boolean, int, long, double</code>) are not supported. Primitive types (eg. <code>boolean, int, long, double</code>) are not supported.
Use <code class="notranslate">java.lang.Boolean, Integer, Long, Double</code> instead. Use <code>java.lang.Boolean, Integer, Long, Double</code> instead.
</p> </p>
<h3>Why in Java?</h3> <h3>Why in Java?</h3>
...@@ -71,13 +71,13 @@ in the same application is complicated: you would need to split the application ...@@ -71,13 +71,13 @@ in the same application is complicated: you would need to split the application
Currently, JaQu is only tested with the H2 database. The API may change in future versions. Currently, JaQu is only tested with the H2 database. The API may change in future versions.
JaQu is not part of the h2 jar file, however the source code is included in H2, under: JaQu is not part of the h2 jar file, however the source code is included in H2, under:
</p> </p>
<ul><li><code class="notranslate">src/test/org/h2/test/jaqu/*</code> (samples and tests) <ul><li><code>src/test/org/h2/test/jaqu/*</code> (samples and tests)
</li><li><code class="notranslate">src/tools/org/h2/jaqu/*</code> (framework) </li><li><code>src/tools/org/h2/jaqu/*</code> (framework)
</li></ul> </li></ul>
<h2>Building the JaQu library</h2> <h2>Building the JaQu library</h2>
<p> <p>
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>. To create the JaQu jar file, run: <code>build jarJaqu</code>. This will create the file <code>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 class="notranslate"> <pre>
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;
...@@ -226,10 +226,10 @@ public class Test { ...@@ -226,10 +226,10 @@ public class Test {
<p> <p>
JaQu does not require any configuration when using the default mapping. JaQu does not require any configuration when using the default mapping.
To define table indices, or if you want to map a class to a table with a different name, To define table indices, or if you want to map a class to a table with a different name,
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 <code>define</code> in the data class.
Example: Example:
</p> </p>
<pre class="notranslate"> <pre>
public class Product implements Table { public class Product implements Table {
public Integer productId; public Integer productId;
...@@ -247,7 +247,7 @@ public class Product implements Table { ...@@ -247,7 +247,7 @@ public class Product implements Table {
} }
</pre> </pre>
<p> <p>
The method <code class="notranslate">define()</code> contains the mapping definition. It is called once The method <code>define()</code> contains the mapping definition. It is called once
when the class is used for the first time. Like annotations, the mapping is defined in the class itself. when the class is used for the first time. Like annotations, the mapping is defined in the class itself.
Unlike when using annotations, the compiler can check the syntax even for multi-column Unlike when using annotations, the compiler can check the syntax even for multi-column
objects (multi-column indexes, multi-column primary keys and so on). objects (multi-column indexes, multi-column primary keys and so on).
...@@ -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 class="notranslate"> <pre>
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
......
...@@ -37,7 +37,7 @@ There is a License FAQ for both the MPL and the EPL, most of that is applicable ...@@ -37,7 +37,7 @@ There is a License FAQ for both the MPL and the EPL, most of that is applicable
However, nobody is allowed to rename H2, modify it a little, and sell it as a database engine without telling the customers it is in fact H2. However, nobody is allowed to rename H2, modify it a little, and sell it as a database engine without telling the customers it is in fact H2.
This happened to HSQLDB: a company called 'bungisoft' copied HSQLDB, renamed it to 'RedBase', and tried to sell it, This happened to HSQLDB: a company called 'bungisoft' copied HSQLDB, renamed it to 'RedBase', and tried to sell it,
hiding the fact that it was in fact just HSQLDB. It seems 'bungisoft' does not exist any more, but you can use the hiding the fact that it was in fact just HSQLDB. It seems 'bungisoft' does not exist any more, but you can use the
Wayback Machine of http://www.archive.org and visit old web pages of http://www.bungisoft.com . <a href="http://www.archive.org">Wayback Machine</a> and visit old web pages of <code>http://www.bungisoft.com</code>.
</p><p> </p><p>
About porting the source code to another language (for example C# or C++): converted source code (even if done manually) stays under the same About porting the source code to another language (for example C# or C++): converted source code (even if done manually) stays under the same
copyright and license as the original code. The copyright of the ported source code does not (automatically) go to the person who ported the code. copyright and license as the original code. The copyright of the ported source code does not (automatically) go to the person who ported the code.
......
...@@ -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 class="notranslate">h2*.jar</code> to the classpath (H2 does not have any dependencies) <li>Add the <code>h2*.jar</code> to the classpath (H2 does not have any dependencies)
</li><li>Use the JDBC driver class: <code class="notranslate">org.h2.Driver</code> </li><li>Use the JDBC driver class: <code>org.h2.Driver</code>
</li><li>The database URL <code class="notranslate">jdbc:h2:~/test</code> opens the database 'test' in your user home directory </li><li>The database URL <code>jdbc:h2:~/test</code> opens the database <code>test</code> 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.
...@@ -297,15 +297,7 @@ java org.h2.test.TestAll timer ...@@ -297,15 +297,7 @@ java org.h2.test.TestAll timer
/* /*
replace class="n" with class="notranslate" for website documentation: rolling review at advanced.html (alphabetically)
documentation: rolling review at tutorial.html (alphabetically)
<code class="notranslate"></code>
check no space http: or https:
check space' and 'space
check spaceNULL and NULLspace
tool...
mvcc merge problem mvcc merge problem
......
...@@ -148,6 +148,8 @@ public class WebSite { ...@@ -148,6 +148,8 @@ public class WebSite {
if (web) { if (web) {
page = StringUtils.replaceAll(page, TRANSLATE_START, ""); page = StringUtils.replaceAll(page, TRANSLATE_START, "");
page = StringUtils.replaceAll(page, TRANSLATE_END, ""); page = StringUtils.replaceAll(page, TRANSLATE_END, "");
page = StringUtils.replaceAll(page, "<pre>", "<pre class=\"notranslate\">");
page = StringUtils.replaceAll(page, "<code>", "<code class=\"notranslate\">");
} }
bytes = page.getBytes("UTF-8"); bytes = page.getBytes("UTF-8");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论