Skip to content

Commits on Source 2

*.bat eol=crlf
*.sh eol=lf
*.java diff=java
......@@ -4,6 +4,7 @@
.settings
benchmark.html
bin
coverage
data
docs
ext
......@@ -13,3 +14,5 @@ test.out.txt
.idea/
*.log
target/
src/main/org/h2/res/help.csv
_tmp*
......@@ -9,31 +9,6 @@ Welcome to H2, the Java SQL database. The main features of H2 are:
## Experimental Building & Testing with Maven
### Setup JDK
Maven requires at minimum the JDK 1.7 whereas H2 is designed to be compiled against the JDK 1.6; the way in which this is
resolved is through [maven toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html).
You simply need to create a `toolchains.xml` file in `~/.m2/` that tells maven where to find the JDK 1.6
Here is a sample file
```
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<!-- JDK toolchains -->
<toolchain>
<type>jdk</type>
<provides>
<version>1.6</version>
</provides>
<configuration>
<jdkHome>/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/</jdkHome>
</configuration>
</toolchain>
</toolchains>
```
### Building
H2 uses [Maven Wrapper](https://github.com/takari/maven-wrapper) setup, you can instruct users to run wrapper scripts:
......
......@@ -228,6 +228,7 @@ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
-Djava.net.useSystemProxies=true \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CMD_LINE_ARGS
......
......@@ -121,7 +121,7 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR=""%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar""
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -Djava.net.useSystemProxies=true -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
goto end
......
......@@ -4,7 +4,7 @@
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.195-SNAPSHOT</version>
<version>1.4.196-SNAPSHOT</version>
<packaging>jar</packaging>
<name>H2 Database Engine</name>
<url>http://www.h2database.com</url>
......@@ -12,8 +12,13 @@
<licenses>
<license>
<name>MPL 2.0 or EPL 1.0</name>
<url>http://h2database.com/html/license.html</url>
<name>MPL 2.0</name>
<url>https://www.mozilla.org/en-US/MPL/2.0/</url>
<distribution>repo</distribution>
</license>
<license>
<name>EPL 1.0</name>
<url>https://opensource.org/licenses/eclipse-1.0.php</url>
<distribution>repo</distribution>
</license>
</licenses>
......@@ -69,9 +74,9 @@
<version>${osgi.version}</version>
</dependency>
<dependency>
<groupId>com.vividsolutions</groupId>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>1.14.0</version>
<version>1.15.0</version>
</dependency>
<!-- END COMPILE DEPENDENCIES !-->
......@@ -178,6 +183,7 @@
<include>**/*.ico</include>
<include>**/*.gif</include>
<include>**/*.css</include>
<include>**/*.js</include>
<include>org/h2/res/help.csv</include>
<include>org/h2/res/javadoc.properties</include>
<include>org/h2/server/pg/pg_catalog.sql</include>
......@@ -188,8 +194,8 @@
<testResource>
<directory>src/test</directory>
<includes>
<include>org/h2/test/testSimple.in.txt</include>
<include>org/h2/test/testScript.sql</include>
<include>org/h2/test/scripts/testSimple.in.txt</include>
<include>org/h2/test/scripts/testScript.sql</include>
<include>org/h2/samples/newsfeed.sql</include>
<include>org/h2/samples/optimizations.sql</include>
</includes>
......@@ -200,11 +206,13 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<version>3.0.0</version>
<executions>
<execution>
<phase>generate-test-sources</phase>
<goals><goal>add-test-source</goal></goals>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/tools</source>
......@@ -213,53 +221,53 @@
</execution>
</executions>
</plugin>
<!-- Maven requires at least JRE 1.7 but we want to build with JDK 1.6 -->
<!-- Make sure neither we nor one of our dependencies uses anything outside JDK 1.7 -->
<!-- commented out for now because it fails to build under JDK1.8+ because we are manually adding the tools jar
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>1.6</version>
</jdk>
</toolchains>
</configuration>
</plugin>
<!-- Make sure we are not using anything outside JDK 1.6 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.15</version>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M1</version>
<executions>
<execution>
<id>check-java-api</id>
<phase>test</phase>
<id>check-java-version</id>
<goals>
<goal>check</goal>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>1.7</maxJdkVersion>
</enforceBytecodeVersion>
<checkSignatureRule implementation="org.codehaus.mojo.animal_sniffer.enforcer.CheckSignatureRule">
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java16</artifactId>
<version>1.1</version>
<artifactId>java17</artifactId>
<version>1.0</version>
</signature>
</checkSignatureRule>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.0-beta-6</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-enforcer-rule</artifactId>
<version>1.16</version>
</dependency>
</dependencies>
</plugin>
<!-- Disable surefire since we don't use Junit -->
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<version>2.20.1</version>
<configuration>
<includes>
<include>TestAllJunit.java</include>
......
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -324,6 +324,7 @@ It is not possible to enable or disable this setting while the database is alrea
<p>
If MVCC is enabled, changing the lock mode (<code>LOCK_MODE</code>) has no effect.
</p>
<p>
The MVCC mode is enabled by default in version 1.4.x,
with the default MVStore storage engine.
MVCC is disabled by default when using the PageStore storage engine
......@@ -335,6 +336,7 @@ with the PageStore storage engine, it can not be used at the same time as
<code>MULTI_THREADED=TRUE</code>;
the complete undo log (the list of uncommitted changes) must fit in memory when using multi-version concurrency.
The setting <code>MAX_MEMORY_UNDO</code> has no effect.
</p>
<h2 id="clustering">Clustering / High Availability</h2>
<p>
......@@ -500,10 +502,10 @@ There is a list of keywords that can't be used as identifiers (table names, colu
unless they are quoted (surrounded with double quotes). The list is currently:
</p><p>
<code>
CROSS, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, DISTINCT, EXCEPT, EXISTS, FALSE,
FETCH, FOR, FROM, FULL, GROUP, HAVING, INNER, INTERSECT, IS, JOIN, LIKE, LIMIT, MINUS, NATURAL,
NOT, NULL, OFFSET, ON, ORDER, PRIMARY, ROWNUM, SELECT, SYSDATE, SYSTIME, SYSTIMESTAMP, TODAY,
TRUE, UNION, UNIQUE, WHERE
ALL, CHECK, CONSTRAINT, CROSS, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, DISTINCT, EXCEPT,
EXISTS, FALSE, FETCH, FOR, FOREIGN, FROM, FULL, GROUP, HAVING, INNER, INTERSECT, IS, JOIN,
LIKE, LIMIT, MINUS, NATURAL, NOT, NULL, OFFSET, ON, ORDER, PRIMARY, ROWNUM, SELECT, SYSDATE,
SYSTIME, SYSTIMESTAMP, TODAY, TRUE, UNION, UNIQUE, WHERE, WITH
</code>
</p><p>
Certain words of this list are keywords because they are functions that can be used without '()' for compatibility,
......@@ -527,7 +529,7 @@ H2 internally uses Unicode, and supports all character encoding systems and char
<p>
Using a native wrapper / adapter, Java applications can be run as a Windows Service.
There are various tools available to do that. The Java Service Wrapper from
<a href="http://wrapper.tanukisoftware.org">Tanuki Software, Inc.</a>
<a href="https://wrapper.tanukisoftware.org">Tanuki Software, Inc.</a>
is included in the installation. Batch files are provided to install, start, stop and uninstall the
H2 Database Engine Service. This service contains the TCP Server and the H2 Console web application.
The batch files are located in the directory <code>h2/service</code>.
......@@ -536,7 +538,7 @@ The batch files are located in the directory <code>h2/service</code>.
The service wrapper bundled with H2 is a 32-bit version.
To use a 64-bit version of Windows (x64), you need to use a 64-bit version of the wrapper,
for example the one from
<a href="http://www.krenger.ch/blog/java-service-wrapper-3-5-14-for-windows-x64/">
<a href="https://www.krenger.ch/blog/java-service-wrapper-3-5-14-for-windows-x64/">
Simon Krenger</a>.
</p>
<p>
......@@ -602,7 +604,7 @@ To use the PostgreSQL ODBC driver on 64 bit versions of Windows,
first run <code>c:/windows/syswow64/odbcad32.exe</code>.
At this point you set up your DSN just like you would on any other system.
See also:
<a href="http://archives.postgresql.org/pgsql-odbc/2005-09/msg00125.php">Re: ODBC Driver on Windows 64 bit</a>
<a href="https://www.postgresql.org/message-id/dg76q0$khn$1@sea.gmane.org">Re: ODBC Driver on Windows 64 bit</a>
</p>
<h3>ODBC Installation</h3>
......@@ -610,7 +612,7 @@ See also:
First, the ODBC driver must be installed.
Any recent PostgreSQL ODBC driver should work, however version 8.2 (<code>psqlodbc-08_02*</code>) or newer is recommended.
The Windows version of the PostgreSQL ODBC driver is available at
<a href="http://www.postgresql.org/ftp/odbc/versions/msi">http://www.postgresql.org/ftp/odbc/versions/msi</a>.
<a href="https://www.postgresql.org/ftp/odbc/versions/msi/">https://www.postgresql.org/ftp/odbc/versions/msi/</a>.
</p>
<h3>Starting the Server</h3>
......@@ -725,11 +727,11 @@ You can access a H2 database on .NET using the JDBC API, or using the ADO.NET in
<h3>Using the ADO.NET API on .NET</h3>
<p>
An implementation of the ADO.NET interface is available in the open source project
<a href="http://code.google.com/p/h2sharp">H2Sharp</a>.
<a href="https://code.google.com/archive/p/h2sharp/">H2Sharp</a>.
</p>
<h3>Using the JDBC API on .NET</h3>
<ul><li>Install the .NET Framework from <a href="http://www.microsoft.com">Microsoft</a>.
<ul><li>Install the .NET Framework from <a href="https://www.microsoft.com">Microsoft</a>.
Mono has not yet been tested.
</li><li>Install <a href="http://www.ikvm.net">IKVM.NET</a>.
</li><li>Copy the <code>h2*.jar</code> file to <code>ikvm/bin</code>
......@@ -853,9 +855,9 @@ Unfortunately, even when calling <code>FileDescriptor.sync()</code> or
<code>FileChannel.force()</code>,
data is not always persisted to the hard drive, because most hard drives do not obey
<code>fsync()</code>: see
<a href="http://hardware.slashdot.org/article.pl?sid=05/05/13/0529252">Your Hard Drive Lies to You</a>.
<a href="https://hardware.slashdot.org/story/05/05/13/0529252/your-hard-drive-lies-to-you">Your Hard Drive Lies to You</a>.
In Mac OS X, <code>fsync</code> does not flush hard drive buffers. See
<a href="http://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html">Bad fsync?</a>.
<a href="https://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html">Bad fsync?</a>.
So the situation is confusing, and tests prove there is a problem.
</p>
<p>
......@@ -1065,7 +1067,6 @@ import java.sql.*;
import java.util.*;
public class Test {
public static void main(String[] args) throws Exception {
Class.forName("org.h2.Driver");
String url = "jdbc:h2:~/test";
Properties prop = new Properties();
prop.setProperty("user", "sa");
......@@ -1083,7 +1084,6 @@ public class Test {
}
</pre>
<p>
This example requires Java 1.6.
When using Swing, use <code>javax.swing.JPasswordField</code>.
</p>
......@@ -1380,7 +1380,7 @@ Remote TLS connections are supported using the Java Secure Socket Extension
<p>
To use your own keystore, set the system properties <code>javax.net.ssl.keyStore</code> and
<code>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="https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores">
Customizing the Default Key and Trust Stores, Store Types, and Store Passwords</a>
for more information.
</p>
......@@ -1433,16 +1433,16 @@ that means the probability is about 0.000'000'000'06.
<h2 id="spatial_features">Spatial Features</h2>
<p>
H2 supports the geometry data type and spatial indexes if
the <a href="http://tsusiatsoftware.net/jts/main.html">JTS Topology Suite</a>
the <a href="https://projects.eclipse.org/projects/locationtech.jts">JTS Topology Suite</a>
is in the classpath.
To run the H2 Console tool with the JTS tool, you need to download the
<a href="http://search.maven.org/remotecontent?filepath=com/vividsolutions/jts-core/1.14.0/jts-core-1.14.0.jar">JTS-CORE 1.14.0 jar file</a>
<a href="https://search.maven.org/remotecontent?filepath=org/locationtech/jts/jts-core/1.15.0/jts-core-1.15.0.jar">JTS-CORE 1.15.0 jar file</a>
and place it in the h2 bin directory. Then edit the <code>h2.sh</code> file as follows:
</p>
<pre>
#!/bin/sh
dir=$(dirname "$0")
java -cp "$dir/h2.jar:jts-core-1.14.0.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Console "$@"
java -cp "$dir/h2.jar:jts-core-1.15.0.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Console "$@"
</pre>
<p>
Here is an example SQL script to create a table with a spatial column and index:
......@@ -1563,7 +1563,7 @@ The current value of the settings can be read in the table
</p>
<p>
For a complete list of settings, see
<a href="../javadoc/org/h2/engine/SysProperties.html">SysProperties</a>.
<a href="http://www.h2database.com/javadoc/org/h2/engine/SysProperties.html">SysProperties</a>.
</p>
<h2 id="server_bind_address">Setting the Server Bind Address</h2>
......@@ -1586,7 +1586,7 @@ The following file systems are included:
</li><li><code>split:</code> file system that splits files in 1 GB files (stackable with other file systems).
</li><li><code>nio:</code> file system that uses <code>FileChannel</code> instead of <code>RandomAccessFile</code> (faster in some operating systems).
</li><li><code>nioMapped:</code> file system that uses memory mapped files (faster in some operating systems).
Please note that there currently is a file size limitation of 2 GB when using this file system when using a 32-bit JVM.
Please note that there currently is a file size limitation of 2 GB when using this file system.
To work around this limitation, combine it with the split file system: <code>split:nioMapped:test</code>.
</li><li><code>memFS:</code> in-memory file system (slower than mem; experimental; mainly used for testing the database engine itself).
</li><li><code>memLZF:</code> compressing in-memory file system (slower than memFS but uses less memory; experimental; mainly used for testing the database engine itself).
......@@ -1675,7 +1675,8 @@ Java objects serialization is enabled by default for columns of type <code>OTHER
To disable this feature set the system property <code>h2.serializeJavaObject=false</code> (default: true).
</p>
<p>
Serialization and deserialization of java objects is customizable both at system level and at database level providing a <a href="../javadoc/org/h2/api/JavaObjectSerializer.html">JavaObjectSerializer</a> implementation:
Serialization and deserialization of java objects is customizable both at system level and at database level providing a
<a href="http://www.h2database.com/javadoc/org/h2/api/JavaObjectSerializer.html">JavaObjectSerializer</a> implementation:
<ul>
<li>
At system level set the system property <code>h2.javaObjectSerializer</code> with the
......@@ -1699,7 +1700,8 @@ It is possible to extend the type system of the database by providing your own i
of minimal required API basically consisting of type identification and conversion routines.
</p>
<p>
In order to enable this feature, set the system property <code>h2.customDataTypesHandler</code> (default: null) to the fully qualified name of the class providing <a href="../javadoc/org/h2/api/CustomDataTypesHandler.html">CustomDataTypesHandler</a> interface implementation. <br />
In order to enable this feature, set the system property <code>h2.customDataTypesHandler</code> (default: null) to the fully qualified name of the class providing
<a href="http://www.h2database.com/javadoc/org/h2/api/CustomDataTypesHandler.html">CustomDataTypesHandler</a> interface implementation. <br />
The instance of that class will be created by H2 and used to:
<ul>
<li>resolve the names and identifiers of extrinsic data types.
......@@ -1764,60 +1766,53 @@ OR X = 2 OR X = 2 OR X = 2 OR X = 2 OR X = 2
<tr>
<td>AES-128</td>
<td>A block encryption algorithm. See also: <a
href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia:
AES</a></td>
href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia:
Advanced Encryption Standard</a></td>
</tr>
<tr>
<td>Birthday Paradox</td>
<td>Describes the higher than expected probability that two
persons in a room have the same birthday. Also valid for randomly
generated UUIDs. See also: <a
href="http://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia:
Birthday Paradox</a></td>
href="https://en.wikipedia.org/wiki/Birthday_problem">Wikipedia:
Birthday problem</a></td>
</tr>
<tr>
<td>Digest</td>
<td>Protocol to protect a password (but not to protect data).
See also: <a href="http://www.faqs.org/rfcs/rfc2617.html">RFC
See also: <a href="https://www.ietf.org/rfc/rfc2617.txt">RFC
2617: HTTP Digest Access Authentication</a></td>
</tr>
<tr>
<td>GCJ</td>
<td>Compiler for Java. <a href="http://gcc.gnu.org/java">GNU
Compiler for the Java</a> and <a
href="http://www.dobysoft.com/products/nativej">NativeJ
(commercial)</a></td>
</tr>
<tr>
<td>HTTPS</td>
<td>A protocol to provide security to HTTP connections. See
also: <a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818:
also: <a href="https://www.ietf.org/rfc/rfc2818.txt">RFC 2818:
HTTP Over TLS</a></td>
</tr>
<tr>
<td>Modes of Operation</td>
<td><a
href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">Wikipedia:
Block cipher modes of operation</a></td>
href="https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation">Wikipedia:
Block cipher mode of operation</a></td>
</tr>
<tr>
<td>Salt</td>
<td>Random number to increase the security of passwords. See
also: <a href="http://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia:
also: <a href="https://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia:
Key derivation function</a></td>
</tr>
<tr>
<td>SHA-256</td>
<td>A cryptographic one-way hash function. See also: <a
href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA
hash functions</a></td>
href="https://en.wikipedia.org/wiki/Secure_Hash_Algorithms">Wikipedia:
Secure Hash Algorithms</a></td>
</tr>
<tr>
<td>SQL Injection</td>
<td>A security vulnerability where an application embeds SQL
statements or expressions in user input. See also: <a
href="http://en.wikipedia.org/wiki/SQL_injection">Wikipedia:
SQL Injection</a></td>
href="https://en.wikipedia.org/wiki/SQL_injection">Wikipedia:
SQL injection</a></td>
</tr>
<tr>
<td>Watermark Attack</td>
......@@ -1829,7 +1824,7 @@ OR X = 2 OR X = 2 OR X = 2 OR X = 2 OR X = 2
<tr>
<td>SSL/TLS</td>
<td>Secure Sockets Layer / Transport Layer Security. See also:
<a href="http://java.sun.com/products/jsse/">Java Secure Socket
<a href="https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html">Java Secure Socket
Extension (JSSE)</a></td>
</tr>
</table>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -86,7 +86,7 @@ The primary classes of interest are:
The parser lives in <code>org.h2.command.Parser</code>. It uses a straightforward recursive-descent design.
</p>
<p>
See Wikipedia <a href="http://en.wikipedia.org/wiki/Recursive_descent_parser">Recursive-descent parser</a> page.
See Wikipedia <a href="https://en.wikipedia.org/wiki/Recursive_descent_parser">Recursive descent parser</a> page.
</p>
......@@ -120,8 +120,8 @@ The primary packages of interest are:
<h2 id="transaction">Undo log, redo log, and transactions layer</h2>
<p>
We have a transaction log, which is shared among all sessions. See also
http://en.wikipedia.org/wiki/Transaction_log
http://h2database.com/html/grammar.html#set_log
<a href="https://en.wikipedia.org/wiki/Transaction_log">https://en.wikipedia.org/wiki/Transaction_log</a>
<a href="http://h2database.com/html/grammar.html#set_log">http://h2database.com/html/grammar.html#set_log</a>
</p>
<p>
We also have an undo log, which is per session, to undo an operation (an update that fails for example)
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -18,7 +18,7 @@ Build
<table class="content"><tr class="content"><td class="content"><div class="contentDiv">
<!-- } -->
<h1>Build</h1>
<h1 id="build_index">Build</h1>
<a href="#portability">
Portability</a><br />
<a href="#environment">
......@@ -45,26 +45,25 @@ Build
<h2 id="portability">Portability</h2>
<p>
This database is written in Java and therefore works on many platforms.
It can also be compiled to a native executable using GCJ.
</p>
<h2 id="environment">Environment</h2>
<p>
To run this database, a Java Runtime Environment (JRE) version 1.7 or higher is required.
To run this database, a Java Runtime Environment (JRE) version 7 or higher is required.
</p>
<p>
To create the database executables, the following software stack was used.
To use this database, it is not required to install this software however.
</p>
<ul><li>Mac OS X and Windows
</li><li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Oracle JDK Version 1.7</a>
</li><li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Oracle JDK Version 7</a>
(version 7 is not available for free download any more)
</li><li><a href="http://www.eclipse.org">Eclipse</a>
</li><li>Eclipse Plugins:
<a href="http://subclipse.tigris.org">Subclipse</a>,
<a href="http://eclipse-cs.sourceforge.net">Eclipse Checkstyle Plug-in</a>,
<a href="https://checkstyle.github.io/eclipse-cs/">Eclipse Checkstyle Plug-in</a>,
<a href="http://www.eclemma.org">EclEmma Java Code Coverage</a>
</li><li><a href="http://emma.sourceforge.net">Emma Java Code Coverage</a>
</li><li><a href="http://www.mozilla.com/firefox">Mozilla Firefox</a>
</li><li><a href="https://www.mozilla.com/firefox">Mozilla Firefox</a>
</li><li><a href="http://www.openoffice.org">OpenOffice</a>
</li><li><a href="http://nsis.sourceforge.net">NSIS</a> (Nullsoft Scriptable Install System)
</li><li><a href="http://maven.apache.org">Maven</a>
......@@ -72,7 +71,7 @@ To use this database, it is not required to install this software however.
<h2 id="building">Building the Software</h2>
<p>
You need to install a JDK, for example the Oracle JDK version 1.7 or 1.8.
You need to install a JDK, for example the Oracle JDK version 7 or 8.
Ensure that Java binary directory is included in the <code>PATH</code> environment variable, and that
the environment variable <code>JAVA_HOME</code> points to your Java installation.
On the command line, go to the directory <code>h2</code> and execute the following command:
......@@ -90,12 +89,15 @@ You will get a list of targets. If you want to build the <code>jar</code> file,
build jar
</pre>
<p>
To run the build tool in shell mode, use the command line option <code>-</code> as in <code>./build.sh -</code>.
To run the build tool in shell mode, use the command line option <code>-</code>:
</p>
<pre>
./build.sh -
</pre>
<h3>Switching the Source Code</h3>
<p>
The source code uses Java 1.7 features.
The source code uses Java 7 features.
To switch the source code to the installed version of Java, run:
</p>
<pre>
......@@ -150,7 +152,7 @@ however after a new release it may take a few hours before they are available th
<h3>Maven Plugin to Start and Stop the TCP Server</h3>
<p>
A Maven plugin to start and stop the H2 TCP server is available from
<a href="http://github.com/ljnelson/h2-maven-plugin">Laird Nelson at GitHub</a>.
<a href="https://github.com/ljnelson/h2-maven-plugin">Laird Nelson at GitHub</a>.
To start the H2 server, use:
</p>
<pre>
......@@ -216,7 +218,7 @@ The web site is currently translated using Google.
<p>
If you'd like to contribute bug fixes or new features, please consider the following guidelines to simplify merging them:
</p>
<ul><li>Only use Java 6 features (do not use Java 7) (see <a href="#environment">Environment</a>).
<ul><li>Only use Java 7 features (do not use Java 8/9/etc) (see <a href="#environment">Environment</a>).
</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).
The checkstyle configuration is in <code>src/installer/checkstyle.xml</code>.
......@@ -248,7 +250,7 @@ If you'd like to contribute bug fixes or new features, please consider the follo
<p>
For legal reasons, patches need to be public in the form of an
<a href="https://github.com/h2database/h2database/issues">issue report or attachment</a> or in the form of an email
to the <a href="http://groups.google.com/group/h2-database">group</a>.
to the <a href="https://groups.google.com/group/h2-database">group</a>.
Significant contributions need to include the following statement:
</p>
<p>
......@@ -265,17 +267,16 @@ or if you have a feature request:
<ul><li>For bug reports, please provide a
<a href="http://sscce.org/">short, self contained, correct (compilable), example</a> of the problem.
</li><li>Feature requests are always welcome, even if the feature is already on the
<a href="roadmap.html">roadmap</a>. Your mail will help prioritize feature requests.
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>. Your mail will help prioritize feature requests.
If you urgently need a feature, consider <a href="#providing_patches">providing a patch</a>.
</li><li>Before posting problems, check the
<a href="faq.html">FAQ</a> and do a <a href="http://google.com">Google search</a>.
</li><li>When got an unexpected exception, please try the
<a href="sourceError.html">Error Analyzer tool</a>. If this doesn't help,
<a href="http://www.h2database.com/html/sourceError.html">Error Analyzer tool</a>. If this doesn't help,
please report the problem, including the complete error message and stack trace,
and the root cause stack trace(s).
</li><li>When sending source code, please use a public web clipboard such as
<a href="http://pastebin.com">Pastebin</a>,
<a href="http://cl1p.net">Cl1p</a>, or
<a href="https://pastebin.com/">Pastebin</a> or
<a href="http://www.mysticpaste.com/new">Mystic Paste</a>
to avoid formatting problems.
Please keep test cases as simple and short as possible,
......@@ -287,8 +288,8 @@ or if you have a feature request:
Please use the JDBC API and no external tools or libraries.
The test should include all required initialization code, and
should be started with the main method.
</li><li>For large attachments, use a public temporary storage such as
<a href="http://rapidshare.com">Rapidshare</a>.
</li><li>For large attachments, use a public storage such as
<a href="https://www.google.com/drive/">Google Drive</a>.
</li><li>Google Group versus issue tracking:
Use the
<a href="http://groups.google.com/group/h2-database">Google Group</a>
......
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -169,7 +169,6 @@ Reference:
<h2><a href="tutorial.html#connecting_using_jdbc">Using the JDBC API</a></h2>
<pre>
Class.forName("org.h2.Driver");
Connection conn = DriverManager.
getConnection("jdbc:h2:~/test");
conn.close();
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -18,7 +18,7 @@ Data Types
<!-- } -->
<h1>Data Types</h1>
<h2>Index</h2>
<h2 id="datatypes_index">Index</h2>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="dataTypes">
......@@ -52,7 +52,7 @@ syntax-end -->
<!-- railroad-end -->
<c:forEach var="item" items="dataTypes">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<h2 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h2>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -17,7 +17,7 @@ Frequently Asked Questions
<table class="content"><tr class="content"><td class="content"><div class="contentDiv">
<!-- } -->
<h1>Frequently Asked Questions</h1>
<h1 id="faq_index">Frequently Asked Questions</h1>
<a href="#support">
I Have a Problem or Feature Request</a><br />
......@@ -47,8 +47,6 @@ Frequently Asked Questions
Column Names are Incorrect?</a><br />
<a href="#float_is_double">
Float is Double?</a><br />
<a href="#gcj">
Is the GCJ Version Stable? Faster?</a><br />
<a href="#how_to_translate">
How to Translate this Project?</a><br />
<a href="#how_to_contribute">
......@@ -69,10 +67,7 @@ Here is the list of known and confirmed issues:
will differ. This is not a problem within regions that use the same rules (such as, within
USA, or within Europe), even if the timezone itself is different. As a workaround, export the
database to a SQL script using the old timezone, and create a new database in the new
timezone. This problem does not occur when using the system property "h2.storeLocalTime"
(however such database files are not compatible with older versions of H2).
</li><li>Apache Harmony: there seems to be a bug in Harmony that affects H2.
See <a href="http://issues.apache.org/jira/browse/HARMONY-6505">HARMONY-6505</a>.
timezone.
</li><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>NullPointerException</code> in H2 versions
1.1.107 and older, and may still not work in newer versions. Please report it if you
......@@ -84,11 +79,6 @@ Here is the list of known and confirmed issues:
</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
when used in combination with other joins. This problem is fixed in H2 version 1.3.
</li><li>When using Install4j before 4.1.4 on Linux and enabling <code>pack200</code>,
the <code>h2*.jar</code> becomes corrupted by the install process, causing application failure.
A workaround is to add an empty file <code>h2*.jar.nopack</code>
next to the <code>h2*.jar</code> file.
This problem is solved in Install4j 4.1.4.
</li></ul>
<p>
For a complete list, see <a href="https://github.com/h2database/h2database/issues">Open Issues</a>.
......@@ -118,7 +108,6 @@ and the database URL starts with <code>jdbc:h2:</code>.
To connect to a database using JDBC, use the following code:
</p>
<pre>
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
</pre>
......@@ -176,7 +165,7 @@ When using one of the following features for production, please ensure your use
is well tested (if possible with automated test cases). The areas that are not well tested are:
</p>
<ul>
<li>Platforms other than Windows, Linux, Mac OS X, or JVMs other than Oracle 1.6, 1.7, 1.8.
<li>Platforms other than Windows, Linux, Mac OS X, or runtime environments other than Oracle / OpenJDK 7, 8, 9.
</li><li>The features <code>AUTO_SERVER</code> and <code>AUTO_RECONNECT</code>.
</li><li>Cluster mode, 2-phase commit, savepoints.
</li><li>Fulltext search.
......@@ -249,10 +238,10 @@ return <code>X</code>. What's wrong?
This is not a bug. According the the JDBC specification, the method
<code>ResultSetMetaData.getColumnName()</code> should return the name of the column
and not the alias name. If you need the alias name, use
<a href="http://java.sun.com/javase/6/docs/api/java/sql/ResultSetMetaData.html#getColumnLabel(int)"><code>ResultSetMetaData.getColumnLabel()</code></a>.
<a href="https://docs.oracle.com/javase/7/docs/api/java/sql/ResultSetMetaData.html#getColumnLabel(int)"><code>ResultSetMetaData.getColumnLabel()</code></a>.
Some other database don't work like this yet (they don't follow the JDBC specification).
If you need compatibility with those databases, use the <a href="features.html#compatibility">Compatibility Mode</a>,
or append <a href="../javadoc/org/h2/engine/DbSettings.html#ALIAS_COLUMN_NAME"><code>;ALIAS_COLUMN_NAME=TRUE</code></a> to the database URL.
or append <a href="http://www.h2database.com/javadoc/org/h2/engine/DbSettings.html#ALIAS_COLUMN_NAME"><code>;ALIAS_COLUMN_NAME=TRUE</code></a> to the database URL.
</p>
<p>
This also applies to DatabaseMetaData calls that return a result set.
......@@ -269,17 +258,9 @@ return a <code>java.lang.Float</code>. What's wrong?
This is not a bug. According the the JDBC specification, the JDBC data type <code>FLOAT</code>
is equivalent to <code>DOUBLE</code>, and both are mapped to <code>java.lang.Double</code>.
See also
<a href="http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/mapping.html#1055162">
<a href="https://docs.oracle.com/javase/1.5.0/docs/guide/jdbc/getstart/mapping.html#1055162">
Mapping SQL and Java Types - 8.3.10 FLOAT</a>.</p>
<h3 id="gcj">Is the GCJ Version Stable? Faster?</h3>
<p>
The GCJ version is not as stable as the Java version.
When running the regression test with the GCJ version, sometimes the application just stops
at what seems to be a random point without error message.
Currently, the GCJ version is also slower than when using the Sun VM.
However, the startup of the GCJ version is faster than when using a VM.
</p>
<p>Use REAL or FLOAT(24) data type for <code>java.lang.Float</code> values.</p>
<h3 id="how_to_translate">How to Translate this Project?</h3>
<p>
......@@ -297,7 +278,7 @@ Please start with small patches. That could be adding a test case to improve the
<a href="build.html#automated">code coverage</a> (the target code coverage for this project is 90%, higher is better).
You will have to <a href="build.html">develop, build and run the tests</a>.
Once you are familiar with the code, you could implement missing features from the
<a href="roadmap.html">feature request list</a>.
<a href="http://www.h2database.com/html/roadmap.html">feature request list</a>.
I suggest to start with very small features that are easy to implement.
Keep in mind to provide test cases as well.
</p>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -163,8 +163,8 @@ This comparison is based on
H2 1.3,
<a href="http://db.apache.org/derby">Apache Derby version 10.8</a>,
<a href="http://hsqldb.org">HSQLDB 2.2</a>,
<a href="http://mysql.com">MySQL 5.5</a>,
<a href="http://www.postgresql.org">PostgreSQL 9.0</a>.
<a href="https://www.mysql.com/">MySQL 5.5</a>,
<a href="https://www.postgresql.org/">PostgreSQL 9.0</a>.
</p>
<table class="main">
<tr>
......@@ -370,7 +370,7 @@ H2 1.3,
*8 Derby doesn't support standard compliant information schema tables.<br />
*9 When using MVCC (multi version concurrency).<br />
*10 Derby and HSQLDB
<a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29">don't hide data patterns well</a>.<br />
<a href="https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_Codebook_(ECB)">don't hide data patterns well</a>.<br />
*11 The MULTI_THREADED option is not enabled by default, and with version 1.3.x not supported when using MVCC.<br />
*12 Derby doesn't support the <code>EXPLAIN</code> statement, but it supports runtime statistics and retrieving statement execution plans.<br />
*13 Derby doesn't support the syntax <code>LIMIT .. [OFFSET ..]</code>, however it supports <code>FETCH FIRST .. ROW[S] ONLY</code>.<br />
......@@ -378,20 +378,10 @@ H2 1.3,
*15 Derby and H2 support <code>ROW_NUMBER() OVER()</code>.
</p>
<h3>DaffodilDb and One$Db</h3>
<p>
It looks like the development of this database has stopped. The last release was February 2006.
</p>
<h3>McKoi</h3>
<p>
It looks like the development of this database has stopped. The last release was August 2004.
</p>
<h2 id="products_work_with">H2 in Use</h2>
<p>
For a list of applications that work with or use H2, see:
<a href="links.html">Links</a>.
<a href="http://www.h2database.com/html/links.html">Links</a>.
</p>
<h2 id="connection_modes">Connection Modes</h2>
......@@ -492,7 +482,7 @@ This is achieved using different database URLs. Settings in the URLs are not cas
<tr>
<td><a href="advanced.html#tls_connections">Server mode (remote connections)<br /> using TLS</a></td>
<td class="notranslate">
jdbc:h2:ssl://&lt;server&gt;[:&lt;port&gt;]/&lt;databaseName&gt;<br />
jdbc:h2:ssl://&lt;server&gt;[:&lt;port&gt;]/[&lt;path&gt;]&lt;databaseName&gt;<br />
jdbc:h2:ssl://localhost:8085/~/sample;
</td>
</tr>
......@@ -669,7 +659,6 @@ and user passwords are case sensitive. Here is an example to connect to a
password-encrypted database:
</p>
<pre>
Class.forName("org.h2.Driver");
String url = "jdbc:h2:~/test;CIPHER=AES";
String user = "sa";
String pwds = "filepwd userpwd";
......@@ -820,7 +809,7 @@ other database settings can be passed in the database URL.
Adding <code>;setting=value</code> at the end of a database URL is the
same as executing the statement <code>SET setting value</code> just after
connecting. For a list of supported settings, see <a href="grammar.html">SQL Grammar</a>
or the <a href="../javadoc/org/h2/engine/DbSettings.html">DbSettings</a> javadoc.
or the <a href="http://www.h2database.com/javadoc/org/h2/engine/DbSettings.html">DbSettings</a> javadoc.
</p>
<h2 id="custom_access_mode">Custom File Access Mode</h2>
......@@ -1058,6 +1047,7 @@ or the SQL statement <code>SET MODE DB2</code>.
</li><li>Concatenating <code>NULL</code> with another value
results in the other value.
</li><li>Support the pseudo-table SYSIBM.SYSDUMMY1.
</li><li>Timestamps with dash between date and time are supported.
</li></ul>
<h3>Derby Compatibility Mode</h3>
......@@ -1109,7 +1099,7 @@ or the SQL statement <code>SET MODE MSSQLServer</code>.
<h3>MySQL Compatibility Mode</h3>
<p>
To use the MySQL mode, use the database URL <code>jdbc:h2:~/test;MODE=MySQL</code>
or the SQL statement <code>SET MODE MySQL</code>.
or the SQL statement <code>SET MODE MySQL</code>. Use this mode for compatibility with MariaDB too.
</p>
<ul><li>When inserting data, if a column is defined to be <code>NOT NULL</code>
and <code>NULL</code> is inserted,
......@@ -1123,6 +1113,9 @@ or the SQL statement <code>SET MODE MySQL</code>.
digits are not truncated, but the value is rounded.
</li><li>Concatenating <code>NULL</code> with another value
results in the other value.
</li><li>ON DUPLICATE KEY UPDATE is supported in INSERT statements.
</li><li>INSERT IGNORE is partially supported and may be used to skip rows with duplicate keys if ON DUPLICATE KEY UPDATE is not specified.
</li><li>REGEXP_REPLACE() uses \ for back-references for compatibility with MariaDB.
</li></ul>
<p>
Text comparison in MySQL is case insensitive by default, while in H2 it is case sensitive (as in most other databases).
......@@ -1145,6 +1138,8 @@ or the SQL statement <code>SET MODE Oracle</code>.
</li><li>Concatenating <code>NULL</code> with another value
results in the other value.
</li><li>Empty strings are treated like <code>NULL</code> values.
</li><li>REGEXP_REPLACE() uses \ for back-references.
</li><li>DATE data type is treated like TIMESTAMP data type.
</li></ul>
<h3>PostgreSQL Compatibility Mode</h3>
......@@ -1160,6 +1155,19 @@ or the SQL statement <code>SET MODE PostgreSQL</code>.
</li><li>The system columns <code>CTID</code> and
<code>OID</code> are supported.
</li><li>LOG(x) is base 10 in this mode.
</li><li>REGEXP_REPLACE() uses \ for back-references.
</li><li>Fixed-width strings are padded with spaces.
</li></ul>
<h3>Ignite Compatibility Mode</h3>
<p>
To use the Ignite mode, use the database URL <code>jdbc:h2:~/test;MODE=Ignite</code>
or the SQL statement <code>SET MODE Ignite</code>.
</p>
<ul><li>Creating indexes in the <code>CREATE TABLE</code> statement is allowed using
<code>INDEX(..)</code> or <code>KEY(..)</code>.
Example: <code>create table test(id int primary key, name varchar(255), key idx_name(name));</code>
</li><li>AFFINITY KEY and SHARD KEY keywords may be used in index definition.
</li></ul>
<h2 id="auto_reconnect">Auto-Reconnect</h2>
......@@ -1327,7 +1335,7 @@ In most cases, this is sufficient, however sometimes it is better to use the sam
facility as the application, for example Log4j. To do that, this database support SLF4J.
</p>
<p>
<a href="http://www.slf4j.org">SLF4J</a> is a simple facade for various logging APIs
<a href="https://www.slf4j.org/">SLF4J</a> is a simple facade for various logging APIs
and allows to plug in the desired implementation at deployment time.
SLF4J supports implementations such as Logback, Log4j, Jakarta Commons Logging (JCL),
Java logging, x4juli, and Simple Log.
......
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -78,15 +78,16 @@ translate -->
<a href="grammar.html">SQL Grammar</a><br />
<a href="functions.html">Functions</a><br />
<a href="datatypes.html">Data Types</a><br />
<a href="systemtables.html">System Tables</a><br />
<a href="../javadoc/index.html">Javadoc</a><br />
<a href="../h2.pdf">PDF (1 MB)</a><br />
<br />
<b>Support</b><br />
<a href="faq.html">FAQ</a><br />
<a href="sourceError.html">Error Analyzer</a><br />
<a href="http://groups.google.com/group/h2-database">Google Group (English)</a><br />
<a href="http://groups.google.co.jp/group/h2-database-jp">Google Group (Japanese)</a><br />
<a href="http://groups.google.com/group/h2-cn">Google Group (Chinese)</a><br />
<a href="https://groups.google.com/group/h2-database">Google Group (English)</a><br />
<a href="https://groups.google.co.jp/group/h2-database-jp">Google Group (Japanese)</a><br />
<a href="https://groups.google.com/group/h2-cn">Google Group (Chinese)</a><br />
<br />
<b>Appendix</b><br />
<a href="history.html">History &amp; Roadmap</a><br />
......
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -164,7 +164,92 @@ syntax-end -->
<p>Click on the header to switch between railroad diagram and BNF.</p>
<!-- railroad-end -->
<c:forEach var="item" items="functionsAll">
<h2>Aggregate Functions</h2>
<c:forEach var="item" items="functionsAggregate">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>Numeric Functions</h2>
<c:forEach var="item" items="functionsNumeric">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>String Functions</h2>
<c:forEach var="item" items="functionsString">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>Time and Date Functions</h2>
<c:forEach var="item" items="functionsTimeDate">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>System Functions</h2>
<c:forEach var="item" items="functionsSystem">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, Version 1.0,
and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
......@@ -18,7 +18,7 @@ SQL Grammar
<!-- } -->
<h1>SQL Grammar</h1>
<h2>Index</h2>
<h2 id="grammar_index">Index</h2>
<h3>Commands (Data Manipulation)</h3>
<!-- syntax-start
<p class="notranslate">
......@@ -103,6 +103,34 @@ syntax-end -->
</table>
<!-- railroad-end -->
<h3>Datetime fields</h3>
<!-- syntax-start
<p class="notranslate">
<c:forEach var="item" items="datetimeFields">
<a href="#${item.link}">${item.topic}</a><br />
</c:forEach>
</p>
syntax-end -->
<!-- railroad-start -->
<table class="notranslate index">
<tr>
<td class="index">
<c:forEach var="item" items="datetimeFields-0">
<a href="#${item.link}" >${item.topic}</a><br />
</c:forEach>
</td><td class="index">
<c:forEach var="item" items="datetimeFields-1">
<a href="#${item.link}" >${item.topic}</a><br />
</c:forEach>
</td><td class="index">
<c:forEach var="item" items="datetimeFields-2">
<a href="#${item.link}" >${item.topic}</a><br />
</c:forEach>
</td>
</tr>
</table>
<!-- railroad-end -->
<h3>Other Grammar</h3>
<!-- syntax-start
<p class="notranslate">
......@@ -131,18 +159,13 @@ syntax-end -->
</table>
<!-- railroad-end -->
<h3>System Tables</h3>
<p class="notranslate">
<a href="#information_schema">Information Schema</a><br />
<a href="#range_table">Range Table</a><br />
</p>
<!-- railroad-start -->
<h2>Details</h2>
<p>Click on the header to switch between railroad diagram and BNF.</p>
<!-- railroad-end -->
<c:forEach var="item" items="commands">
<h2>Commands (Data Manipulation)</h2>
<c:forEach var="item" items="commandsDML">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
......@@ -163,10 +186,16 @@ syntax-end -->
${item.example}</p>
</c:forEach>
<c:forEach var="item" items="otherGrammar">
<h2>Commands (Data Definition)</h2>
<c:forEach var="item" items="commandsDDL">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
......@@ -175,34 +204,69 @@ ${item.syntax}
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
<p class="notranslate">
${item.example}</p>
</c:forEach>
<h3 id="information_schema" class="notranslate">Information Schema</h3>
<p>
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.
</p>
<table class="main">
<tr><th>Table</th><th>Columns</th></tr>
<c:forEach var="item" items="informationSchema">
<tr class="notranslate">
<td>${item.topic}</td>
<td>${item.syntax}</td>
</tr>
<h2>Commands (Other)</h2>
<c:forEach var="item" items="commandsOther">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">
${item.example}</p>
</c:forEach>
</table>
<h3 id="range_table" class="notranslate">Range Table</h3>
<p>
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 is used as follows:
</p>
<h2>Datetime fields</h2>
<c:forEach var="item" items="datetimeFields">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">
${item.example}</p>
</c:forEach>
<h2>Other Grammar</h2>
<c:forEach var="item" items="otherGrammar">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
${item.railroad}
<!-- railroad-end -->
<!-- syntax-start
<pre>
SELECT X FROM SYSTEM_RANGE(1, 10);
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<!--[if lte IE 7]><script language="javascript">switchBnf(null);</script><![endif]-->
......