提交 9a423776 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 4e97ff4f
......@@ -403,7 +403,7 @@ unless they are quoted (surrounded with double quotes). The list is currently:
<code>
CROSS, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, DISTINCT, EXCEPT, EXISTS, FALSE,
FOR, FROM, FULL, GROUP, HAVING, INNER, INTERSECT, IS, JOIN, LIKE, LIMIT, MINUS, NATURAL, NOT, NULL,
ON, ORDER, PRIMARY, ROWNUM, SELECT, SYSDATE, SYSTIME, SYSTIMESTAMP, TODAY, TRUE, UNION,
ON, ORDER, PRIMARY, ROWNUM, SELECT, SYSDATE, SYSTIME, SYSTIMESTAMP, TODAY, TRUE, UNION,
UNIQUE, WHERE
</code>
</p><p>
......@@ -1199,8 +1199,8 @@ is selected using a file name prefix. The following file systems are included:
</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).
</li><li><code>split:</code> file system that splits files in 1 GB files (stackable with other file systems).
</li><li><code>memFS:</code> in-memory file system (experimental; used for testing).
</li><li><code>memLZF:</code> compressing in-memory file system (experimental; used for testing).
</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).
</li></ul>
<p>
As an example, to use the the <code>nio</code> file system, use the following database URL:
......
......@@ -18,7 +18,18 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>UNIQUE was not listed as a keyword.
<ul><li>Commas at the end of INSERT ... VALUES (), (), are now supported.
</li><li>The H2 Console "Start Browser" button now works even when the IP
address changes while the tool runs (for example, because a wireless connection
breaks, or when enabling / disabling the network connection).
</li><li>When casting from float or double to BigDecimal, the result was
sometimes unexpected, because "new BigDecimal(double val)" was used.
Now "BigDecimal.valueOf(double val)" and "new BigDecimal(Float.toString(f))" are used.
But it is still not recommended to use float or double for currency values
(see data type documentation).
</li><li>Global temporary tables are now deleted when closing the database.
Before, they were deleted when opening the database the next time.
</li><li>UNIQUE was not listed as a keyword.
</li><li>Improved error message when an non-SQL-exception occurred in a user
defined function. The method name and parameters are included in the error message.
</li><li>For some queries, the exception did not include the SQL statement. Example:
......@@ -28,7 +39,7 @@ Change Log
</li><li>If InetAddress.getLocalHost() fails, the database should now throw an exception.
</li><li>New columns INFORMATION_SCHEMA.INDEXES.INDEX_CLASS and
INFORMATION_SCHEMA.TABLES.TABLE_CLASS.
</li><li>INFORMATION_SCHEMA.INDEXES.SQL now contains the CREATE INDEX statement
</li><li>INFORMATION_SCHEMA.INDEXES.SQL now contains the CREATE INDEX statement
instead of just the fully qualified index name.
</li></ul>
......
......@@ -320,8 +320,8 @@ encrypted using AES-128 and XTEA encryption algorithms
</tr><tr>
<td>Information Schema</td>
<td class="compareY">Yes</td>
<td class="compareY">No *8</td>
<td class="compareY">No *8</td>
<td class="compareN">No *8</td>
<td class="compareN">No *8</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
</tr><tr>
......
......@@ -71,6 +71,8 @@ The Codist: Write Your Own Database, Again (2006-11-13)</a><br />
Ohloh</a><br />
<a href="http://freshmeat.net/projects/h2">
Freshmeat Project Page</a><br />
<a href="http://fossfor.us/software/name/H2_Database">
Free Open Source Software For Us</a><br />
<a href="http://en.wikipedia.org/wiki/H2_%28DBMS%29">
Wikipedia</a><br />
<a href="http://java-source.net/open-source/database-engines/h2">
......
......@@ -516,7 +516,7 @@ Shutting down a TCP server can be protected using the option <code>-tcpPassword<
<h2 id="using_hibernate">Using Hibernate</h2>
<p>
This database supports Hibernate version 3.1 and newer. You can use the HSQLDB Dialect,
or the native H2 Dialect. Unfortunately the H2 Dialect included in some versions of Hibernate is buggy.
or the native H2 Dialect. Unfortunately the H2 Dialect included in some versions of Hibernate is buggy.
A <a href="http://opensource.atlassian.com/projects/hibernate/browse/HHH-3401">patch
for Hibernate</a> has been submitted and is now applied. The dialect for the newest version of Hibernate
is also available at <code>src/tools/org/hibernate/dialect/H2Dialect.java.txt</code>.
......
......@@ -279,6 +279,13 @@ public class DbException extends RuntimeException {
return get(ErrorCode.GENERAL_ERROR_1, e, e.toString());
}
/**
* Convert an InvocationTarget exception to a database exception.
*
* @param te the root cause
* @param message the added message or null
* @return the database exception object
*/
public static DbException convertInvocation(InvocationTargetException te, String message) {
Throwable t = te.getTargetException();
if (t instanceof SQLException || t instanceof DbException) {
......@@ -289,11 +296,11 @@ public class DbException extends RuntimeException {
}
/**
* Convert an IO exception to a SQL exception.
* Convert an IO exception to a database exception.
*
* @param e the root cause
* @param message the message
* @return the SQL exception object
* @param message the message or null
* @return the database exception object
*/
public static DbException convertIOException(IOException e, String message) {
if (message == null) {
......
......@@ -5,146 +5,31 @@
* Initial Developer: H2 Group
*/
CREATE TABLE VERSION(ID INT PRIMARY KEY, VERSION VARCHAR, CREATED VARCHAR);
INSERT INTO VERSION VALUES
(84, '1.2.134', '2010-04-23'),
(83, '1.2.133', '2010-04-10'),
(82, '1.2.132', '2010-03-21'),
(81, '1.2.131', '2010-03-05'),
(80, '1.2.130', '2010-02-26'),
(79, '1.2.129', '2010-02-19'),
(78, '1.2.128', '2010-01-30'),
(77, '1.2.127', '2010-01-15'),
(76, '1.2.126', '2009-12-18'),
(75, '1.2.125', '2009-12-06'),
(74, '1.2.124', '2009-11-20'),
(73, '1.2.123', '2009-11-08'),
;
CREATE TABLE CHANNEL(TITLE VARCHAR, LINK VARCHAR, DESC VARCHAR,
LANGUAGE VARCHAR, PUB TIMESTAMP, LAST TIMESTAMP, AUTHOR VARCHAR);
INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
'http://www.h2database.com/', 'H2 Database Engine', 'en-us', NOW(), NOW(), 'Thomas Mueller');
CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR);
INSERT INTO ITEM VALUES(84,
'New version available: 1.2.134 (2010-04-23)', '2010-04-23 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(83,
'New version available: 1.2.133 (2010-04-10)', '2010-04-10 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(82,
'New version available: 1.2.132 (2010-03-21)', '2010-03-21 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(81,
'New version available: 1.2.131 (2010-03-05)', '2010-03-05 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(80,
'New version available: 1.2.130 (2010-02-26)', '2010-02-26 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(79,
'New version available: 1.2.129 (2010-02-19)', '2010-02-19 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(78,
'New version available: 1.2.128 (2010-01-30)', '2010-01-30 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(77,
'New version available: 1.2.127 (2010-01-15)', '2010-01-15 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(76,
'New version available: 1.2.126 (2009-12-18)', '2009-12-18 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(75,
'New version available: 1.2.125 (2009-12-06)', '2009-12-06 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(74,
'New version available: 1.2.124 (2009-11-20)', '2009-11-20 12:00:00',
CREATE VIEW ITEM AS
SELECT ID, 'New version available: ' || VERSION || ' (' || CREATED || ')' TITLE,
CAST((CREATED || ' 12:00:00') AS TIMESTAMP) ISSUED,
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
......@@ -154,20 +39,7 @@ For details, see the
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(73,
'New version available: 1.2.123 (2009-11-08)', '2009-11-08 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
$$ AS DESC FROM VERSION;
SELECT 'newsfeed-rss.xml' FILE,
XMLSTARTDOC() ||
......@@ -211,3 +83,48 @@ SELECT 'newsfeed-atom.xml' FILE,
FROM CHANNEL C, ITEM I
UNION
SELECT 'newsletter.txt' FILE, I.DESC CONTENT FROM ITEM I WHERE I.ID = (SELECT MAX(ID) FROM ITEM)
UNION
SELECT 'doap-h2.rdf' FILE,
XMLSTARTDOC() ||
$$<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:lang="en">
<Project rdf:about="http://h2database.com">
<name>H2 Database Engine</name>
<homepage rdf:resource="http://h2database.com"/>
<programming-language>Java</programming-language>
<category rdf:resource="http://projects.apache.org/category/database"/>
<category rdf:resource="http://projects.apache.org/category/library"/>
<category rdf:resource="http://projects.apache.org/category/network-server"/>
<license rdf:resource="http://usefulinc.com/doap/licenses/mpl"/>
<bug-database rdf:resource="http://code.google.com/p/h2database/issues/list"/>
<download-page rdf:resource="http://h2database.com/html/download.html"/>
<shortdesc xml:lang="en">H2 Database Engine</shortdesc>
<description xml:lang="en">
H2 is a relational database management system written in Java.
It can be embedded in Java applications or run in the client-server mode.
The disk footprint is about 1 MB. The main programming APIs are SQL and JDBC,
however the database also supports using the PostgreSQL ODBC driver by acting like a PostgreSQL server.
It is possible to create both in-memory tables, as well as disk-based tables.
Tables can be persistent or temporary. Index types are hash table and tree for in-memory tables,
and b-tree for disk-based tables.
All data manipulation operations are transactional. (from Wikipedia)
</description>
<repository>
<SVNRepository>
<browse rdf:resource="http://code.google.com/p/h2database/source/browse"/>
<location rdf:resource="http://h2database.googlecode.com/svn/trunk"/>
</SVNRepository>
</repository>
<mailing-list rdf:resource="http://groups.google.com/group/h2-database"/>
$$ ||
GROUP_CONCAT(
XMLNODE('release', NULL,
XMLNODE('Version', NULL,
XMLNODE('name', NULL, 'H2 ' || V.VERSION) ||
XMLNODE('created', NULL, V.CREATED) ||
XMLNODE('revision', NULL, V.VERSION)
)
)
ORDER BY V.ID DESC SEPARATOR '') ||
' </Project>
</rdf:RDF>' CONTENT
FROM VERSION V
......@@ -641,4 +641,4 @@ stdio printf jchar sizeof stdlib jbyte jint uint ujlong typedef jdouble stdint
jfloat wchar hotspot jvoid std ujint jlong vars jboolean calloc argc strlen
equivalent synchronizes sullivan surname doe stepan getstart rojas snprintf
pulakka pagination collide visual aejaks simulation joonas finland minneapolis
determine timestampdiff
\ No newline at end of file
determine timestampdiff harmony doap shortdesc
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论