提交 e4440728 authored 作者: Noel Grandin's avatar Noel Grandin

Issue #387: H2 MSSQL Compatibility Mode - Support uniqueidentifier

上级 eb2fc137
...@@ -21,6 +21,8 @@ Change Log ...@@ -21,6 +21,8 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
<li>Issue #387: H2 MSSQL Compatibility Mode - Support uniqueidentifier
</li>
<li>Issue #401: NPE in "SELECT DISTINCT * ORDER BY" <li>Issue #401: NPE in "SELECT DISTINCT * ORDER BY"
</li> </li>
<li>Added BITGET function <li>Added BITGET function
......
...@@ -23,7 +23,6 @@ import java.sql.Types; ...@@ -23,7 +23,6 @@ import java.sql.Types;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.UUID; import java.util.UUID;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.api.TimestampWithTimeZone; import org.h2.api.TimestampWithTimeZone;
import org.h2.engine.Constants; import org.h2.engine.Constants;
...@@ -339,7 +338,8 @@ public class DataType { ...@@ -339,7 +338,8 @@ public class DataType {
); );
add(Value.UUID, Types.BINARY, "Bytes", add(Value.UUID, Types.BINARY, "Bytes",
createString(false), createString(false),
new String[]{"UUID"}, // UNIQUEIDENTIFIER is the MSSQL mode equivalent
new String[]{"UUID", "UNIQUEIDENTIFIER"},
32 32
); );
add(Value.JAVA_OBJECT, Types.OTHER, "Object", add(Value.JAVA_OBJECT, Types.OTHER, "Object",
......
...@@ -411,6 +411,9 @@ public class TestCompatibility extends TestBase { ...@@ -411,6 +411,9 @@ public class TestCompatibility extends TestBase {
// make sure we're ignoring the index part of the statement // make sure we're ignoring the index part of the statement
rs = stat.executeQuery("select * from test (index table1_index)"); rs = stat.executeQuery("select * from test (index table1_index)");
rs.close(); rs.close();
// UNIQUEIDENTIFIER is MSSQL's equivalent of UUID
stat.execute("create table test3 (id UNIQUEIDENTIFIER)");
} }
private void testDB2() throws SQLException { private void testDB2() throws SQLException {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论