Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
81d285d6
提交
81d285d6
authored
3月 19, 2013
作者:
noelgrandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for CREATE TABLE TEST (ID BIGSERIAL) for Oracle compatibility. Patch from Jesse Long.
上级
a013176a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
28 行增加
和
2 行删除
+28
-2
changelog.html
h2/src/docsrc/html/changelog.html
+1
-0
Parser.java
h2/src/main/org/h2/command/Parser.java
+6
-1
Column.java
h2/src/main/org/h2/table/Column.java
+2
-0
DataType.java
h2/src/main/org/h2/value/DataType.java
+7
-1
test-1.3.txt
h2/src/test/org/h2/test/test-1.3.txt
+12
-0
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
81d285d6
...
@@ -22,6 +22,7 @@ Change Log
...
@@ -22,6 +22,7 @@ Change Log
and then killing the process could result in a database that couldn't be opened (except when using
and then killing the process could result in a database that couldn't be opened (except when using
the recover tool).
the recover tool).
</li><li>
Support TRUNC(timestamp) for improved Oracle compatiblity.
</li><li>
Support TRUNC(timestamp) for improved Oracle compatiblity.
</li><li>
Add support for CREATE TABLE TEST (ID BIGSERIAL) for Oracle compatibility. Patch from Jesse Long.
</li></ul>
</li></ul>
<h2>
Version 1.3.171 (2013-03-17)
</h2>
<h2>
Version 1.3.171 (2013-03-17)
</h2>
...
...
h2/src/main/org/h2/command/Parser.java
浏览文件 @
81d285d6
...
@@ -3515,11 +3515,16 @@ public class Parser {
...
@@ -3515,11 +3515,16 @@ public class Parser {
private
Column
parseColumnForTable
(
String
columnName
,
boolean
defaultNullable
)
{
private
Column
parseColumnForTable
(
String
columnName
,
boolean
defaultNullable
)
{
Column
column
;
Column
column
;
boolean
isIdentity
=
false
;
boolean
isIdentity
=
false
;
if
(
readIf
(
"IDENTITY"
)
||
readIf
(
"SERIAL"
))
{
if
(
readIf
(
"IDENTITY"
)
||
readIf
(
"
BIG
SERIAL"
))
{
column
=
new
Column
(
columnName
,
Value
.
LONG
);
column
=
new
Column
(
columnName
,
Value
.
LONG
);
column
.
setOriginalSQL
(
"IDENTITY"
);
column
.
setOriginalSQL
(
"IDENTITY"
);
parseAutoIncrement
(
column
);
parseAutoIncrement
(
column
);
column
.
setPrimaryKey
(
true
);
column
.
setPrimaryKey
(
true
);
}
else
if
(
readIf
(
"SERIAL"
))
{
column
=
new
Column
(
columnName
,
Value
.
INT
);
column
.
setOriginalSQL
(
"SERIAL"
);
parseAutoIncrement
(
column
);
column
.
setPrimaryKey
(
true
);
}
else
{
}
else
{
column
=
parseColumnWithType
(
columnName
);
column
=
parseColumnWithType
(
columnName
);
}
}
...
...
h2/src/main/org/h2/table/Column.java
浏览文件 @
81d285d6
...
@@ -355,6 +355,8 @@ public class Column {
...
@@ -355,6 +355,8 @@ public class Column {
}
}
if
(
"IDENTITY"
.
equals
(
originalSQL
))
{
if
(
"IDENTITY"
.
equals
(
originalSQL
))
{
originalSQL
=
"BIGINT"
;
originalSQL
=
"BIGINT"
;
}
else
if
(
"SERIAL"
.
equals
(
originalSQL
))
{
originalSQL
=
"INT"
;
}
}
String
sequenceName
;
String
sequenceName
;
while
(
true
)
{
while
(
true
)
{
...
...
h2/src/main/org/h2/value/DataType.java
浏览文件 @
81d285d6
...
@@ -242,6 +242,12 @@ public class DataType {
...
@@ -242,6 +242,12 @@ public class DataType {
// in many cases the value is in the cache
// in many cases the value is in the cache
20
20
);
);
add
(
Value
.
INT
,
Types
.
INTEGER
,
"Int"
,
createDecimal
(
ValueInt
.
PRECISION
,
ValueInt
.
PRECISION
,
0
,
ValueInt
.
DISPLAY_SIZE
,
false
,
true
),
new
String
[]{
"SERIAL"
},
20
);
add
(
Value
.
LONG
,
Types
.
BIGINT
,
"Long"
,
add
(
Value
.
LONG
,
Types
.
BIGINT
,
"Long"
,
createDecimal
(
ValueLong
.
PRECISION
,
ValueLong
.
PRECISION
,
0
,
createDecimal
(
ValueLong
.
PRECISION
,
ValueLong
.
PRECISION
,
0
,
ValueLong
.
DISPLAY_SIZE
,
false
,
false
),
ValueLong
.
DISPLAY_SIZE
,
false
,
false
),
...
@@ -251,7 +257,7 @@ public class DataType {
...
@@ -251,7 +257,7 @@ public class DataType {
add
(
Value
.
LONG
,
Types
.
BIGINT
,
"Long"
,
add
(
Value
.
LONG
,
Types
.
BIGINT
,
"Long"
,
createDecimal
(
ValueLong
.
PRECISION
,
ValueLong
.
PRECISION
,
0
,
createDecimal
(
ValueLong
.
PRECISION
,
ValueLong
.
PRECISION
,
0
,
ValueLong
.
DISPLAY_SIZE
,
false
,
true
),
ValueLong
.
DISPLAY_SIZE
,
false
,
true
),
new
String
[]{
"IDENTITY"
,
"SERIAL"
},
new
String
[]{
"IDENTITY"
,
"
BIG
SERIAL"
},
24
24
);
);
add
(
Value
.
DECIMAL
,
Types
.
DECIMAL
,
"BigDecimal"
,
add
(
Value
.
DECIMAL
,
Types
.
DECIMAL
,
"BigDecimal"
,
...
...
h2/src/test/org/h2/test/test-1.3.txt
浏览文件 @
81d285d6
...
@@ -1169,6 +1169,18 @@ CREATE TABLE test (id int(25) NOT NULL auto_increment, name varchar NOT NULL, PR
...
@@ -1169,6 +1169,18 @@ CREATE TABLE test (id int(25) NOT NULL auto_increment, name varchar NOT NULL, PR
drop table test;
drop table test;
> ok
> ok
CREATE TABLE test (id bigserial NOT NULL primary key);
> ok
drop table test;
> ok
CREATE TABLE test (id serial NOT NULL primary key);
> ok
drop table test;
> ok
CREATE MEMORY TABLE TEST(ID INT, D DOUBLE, F FLOAT);
CREATE MEMORY TABLE TEST(ID INT, D DOUBLE, F FLOAT);
> ok
> ok
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论