提交 81c34acc authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 9030e8e7
...@@ -18,12 +18,14 @@ Initial Developer: H2 Group ...@@ -18,12 +18,14 @@ Initial Developer: H2 Group
</frameset> </frameset>
<noframes> <noframes>
<body> <body>
<p>
H2 (for 'Hypersonic 2') is free a Java SQL DBMS. H2 (for 'Hypersonic 2') is free a Java SQL DBMS.
Clustering, embedded and server mode, transactions, referential integrity, Clustering, embedded and server mode, transactions, referential integrity,
views, subqueries, triggers, encryption, and disk based or in-memory operation views, subqueries, triggers, encryption, and disk based or in-memory operation
are supported. A browser based console application is included. are supported. A browser based console application is included.
If you see this page your browser does not support frames. If you see this page your browser does not support frames.
Please click here to view the <a href="search.html">index</a>. Please click here to view the <a href="search.html">index</a>.
</p>
</body> </body>
</noframes> </noframes>
</html> </html>
...@@ -18,12 +18,14 @@ Initial Developer: H2 Group ...@@ -18,12 +18,14 @@ Initial Developer: H2 Group
</frameset> </frameset>
<noframes> <noframes>
<body> <body>
<p>
H2 (for 'Hypersonic 2') is free a Java SQL DBMS. H2 (for 'Hypersonic 2') is free a Java SQL DBMS.
Clustering, embedded and server mode, transactions, referential integrity, Clustering, embedded and server mode, transactions, referential integrity,
views, subqueries, triggers, encryption, and disk based or in-memory operation views, subqueries, triggers, encryption, and disk based or in-memory operation
are supported. A browser based console application is included. are supported. A browser based console application is included.
If you see this page your browser does not support frames. If you see this page your browser does not support frames.
Please click here to view the <a href="search_ja.html">index</a>. Please click here to view the <a href="search_ja.html">index</a>.
</p>
</body> </body>
</noframes> </noframes>
</html> </html>
...@@ -1092,6 +1092,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch. ...@@ -1092,6 +1092,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>Automatic mode: jdbc:h2:auto: (embedded mode if possible, if not use server mode). </li><li>Automatic mode: jdbc:h2:auto: (embedded mode if possible, if not use server mode).
Problem: what to do when server stops while others are connected to it. Problem: what to do when server stops while others are connected to it.
</li><li>Access rights: remember the owner of an object. COMMENT: allow owner of object to change it. </li><li>Access rights: remember the owner of an object. COMMENT: allow owner of object to change it.
</li><li>Implement INSTEAD OF trigger.
</li></ul> </li></ul>
<h3>Not Planned</h3> <h3>Not Planned</h3>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Copyright 2004-2006 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html). Copyright 2004-2006 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group Initial Developer: H2 Group
--> -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title> <head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
H2 Database Engine H2 Database Engine
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /> </title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
......
...@@ -40,6 +40,9 @@ public class JdbcSQLException extends SQLException { ...@@ -40,6 +40,9 @@ public class JdbcSQLException extends SQLException {
} }
private static String buildMessage(String message, String sql, String state) { private static String buildMessage(String message, String sql, String state) {
if(message == null) {
message = "";
}
StringBuffer buff = new StringBuffer(message); StringBuffer buff = new StringBuffer(message);
if(sql != null) { if(sql != null) {
buff.append("; SQL statement: "); buff.append("; SQL statement: ");
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
*/ */
package org.h2.test; package org.h2.test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties; import java.util.Properties;
import org.h2.server.TcpServer; import org.h2.server.TcpServer;
...@@ -94,6 +97,23 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2 ...@@ -94,6 +97,23 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
/* /*
search from a frame (but usually don't use frames)
Class.forName("org.h2.Driver");
DeleteDbFiles.execute("~", null, true);
Connection conn1 = DriverManager.getConnection("jdbc:h2:~/test");
Statement s1 = conn1.createStatement();
s1.execute("create table test(id int)");
conn1.setAutoCommit(false);
s1.execute("delete from test");
s1.execute("PREPARE COMMIT TX_8");
s1.execute("COMMIT TRANSACTION TX_8");
Connection conn2 = DriverManager.getConnection("jdbc:h2:~/test");
conn2.createStatement().execute("select * from test");
call N'@name';
pg_version is in public instead of pg_catalog pg_version is in public instead of pg_catalog
copyright to include 2007 copyright to include 2007
......
...@@ -17,7 +17,7 @@ public class DbStarter implements ServletContextListener { ...@@ -17,7 +17,7 @@ public class DbStarter implements ServletContextListener {
// You can also get the setting from a context-param in web.xml: // You can also get the setting from a context-param in web.xml:
ServletContext servletContext = servletContextEvent.getServletContext(); ServletContext servletContext = servletContextEvent.getServletContext();
// String url = servletContext.getInitParameter("db.url"); // String url = servletContext.getInitParameter("db.url");
conn = DriverManager.getConnection("jdbc:h2:test", "sa", ""); conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
servletContext.setAttribute("connection", conn); servletContext.setAttribute("connection", conn);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论