提交 251479dc authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Add DATABASE_TO_LOWER=TRUE to sample connection URLs for MySQL and PostgreSQL modes

上级 bc08bd2d
...@@ -338,7 +338,7 @@ This is achieved using different database URLs. Settings in the URLs are not cas ...@@ -338,7 +338,7 @@ This is achieved using different database URLs. Settings in the URLs are not cas
<td><a href="#compatibility">Compatibility mode</a></td> <td><a href="#compatibility">Compatibility mode</a></td>
<td class="notranslate"> <td class="notranslate">
jdbc:h2:&lt;url&gt;;MODE=&lt;databaseType&gt;<br /> jdbc:h2:&lt;url&gt;;MODE=&lt;databaseType&gt;<br />
jdbc:h2:~/test;MODE=MYSQL jdbc:h2:~/test;MODE=MYSQL;DATABASE_TO_LOWER=TRUE
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -894,8 +894,9 @@ or the SQL statement <code>SET MODE MSSQLServer</code>. ...@@ -894,8 +894,9 @@ or the SQL statement <code>SET MODE MSSQLServer</code>.
<h3>MySQL Compatibility Mode</h3> <h3>MySQL Compatibility Mode</h3>
<p> <p>
To use the MySQL mode, use the database URL <code>jdbc:h2:~/test;MODE=MySQL</code> To use the MySQL mode, use the database URL <code>jdbc:h2:~/test;MODE=MySQL;DATABASE_TO_LOWER=TRUE</code>.
or the SQL statement <code>SET MODE MySQL</code>. Use this mode for compatibility with MariaDB too. Use this mode for compatibility with MariaDB too.
When case-insensitive identifiers are needed append <code>;CASE_INSENSITIVE_IDENTIFIERS=TRUE</code> to URL.
</p> </p>
<ul><li>When inserting data, if a column is defined to be <code>NOT NULL</code> <ul><li>When inserting data, if a column is defined to be <code>NOT NULL</code>
and <code>NULL</code> is inserted, and <code>NULL</code> is inserted,
...@@ -904,7 +905,6 @@ or the SQL statement <code>SET MODE MySQL</code>. Use this mode for compatibilit ...@@ -904,7 +905,6 @@ or the SQL statement <code>SET MODE MySQL</code>. Use this mode for compatibilit
</li><li>Creating indexes in the <code>CREATE TABLE</code> statement is allowed using </li><li>Creating indexes in the <code>CREATE TABLE</code> statement is allowed using
<code>INDEX(..)</code> or <code>KEY(..)</code>. <code>INDEX(..)</code> or <code>KEY(..)</code>.
Example: <code>create table test(id int primary key, name varchar(255), key idx_name(name));</code> Example: <code>create table test(id int primary key, name varchar(255), key idx_name(name));</code>
</li><li>Meta data calls return identifiers in lower case.
</li><li>When converting a floating point number to an integer, the fractional </li><li>When converting a floating point number to an integer, the fractional
digits are not truncated, but the value is rounded. digits are not truncated, but the value is rounded.
</li><li>Concatenating <code>NULL</code> with another value </li><li>Concatenating <code>NULL</code> with another value
...@@ -944,8 +944,7 @@ or the SQL statement <code>SET MODE Oracle</code>. ...@@ -944,8 +944,7 @@ or the SQL statement <code>SET MODE Oracle</code>.
<h3>PostgreSQL Compatibility Mode</h3> <h3>PostgreSQL Compatibility Mode</h3>
<p> <p>
To use the PostgreSQL mode, use the database URL <code>jdbc:h2:~/test;MODE=PostgreSQL</code> To use the PostgreSQL mode, use the database URL <code>jdbc:h2:~/test;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE</code>.
or the SQL statement <code>SET MODE PostgreSQL</code>.
</p> </p>
<ul><li>For aliased columns, <code>ResultSetMetaData.getColumnName()</code> <ul><li>For aliased columns, <code>ResultSetMetaData.getColumnName()</code>
returns the alias name and <code>getTableName()</code> returns returns the alias name and <code>getTableName()</code> returns
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论