Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
f61d2340
提交
f61d2340
authored
1月 16, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
f0bf7fad
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
89 行增加
和
52 行删除
+89
-52
datatypes.jsp
h2/src/docsrc/html/datatypes.jsp
+4
-4
functions.jsp
h2/src/docsrc/html/functions.jsp
+8
-8
grammar.jsp
h2/src/docsrc/html/grammar.jsp
+8
-8
_messages_en.properties
h2/src/docsrc/textbase/_messages_en.properties
+1
-1
Bnf.java
h2/src/main/org/h2/bnf/Bnf.java
+7
-8
ErrorCode.java
h2/src/main/org/h2/constant/ErrorCode.java
+2
-2
_messages_de.properties
h2/src/main/org/h2/res/_messages_de.properties
+1
-1
_messages_en.properties
h2/src/main/org/h2/res/_messages_en.properties
+1
-1
_messages_pt_br.properties
h2/src/main/org/h2/res/_messages_pt_br.properties
+1
-1
help.csv
h2/src/main/org/h2/res/help.csv
+17
-0
UpdatableRow.java
h2/src/main/org/h2/result/UpdatableRow.java
+20
-8
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+4
-7
test.in.txt
h2/src/test/org/h2/test/test.in.txt
+11
-0
testSimple.in.txt
h2/src/test/org/h2/test/testSimple.in.txt
+0
-3
GenerateDoc.java
h2/src/tools/org/h2/tools/doc/GenerateDoc.java
+4
-0
没有找到文件。
h2/src/docsrc/html/datatypes.jsp
浏览文件 @
f61d2340
...
@@ -13,12 +13,12 @@ Data Types
...
@@ -13,12 +13,12 @@ Data Types
<h1>
Data Types
</h1>
<h1>
Data Types
</h1>
<c:forEach
var=
"item"
items=
"dataTypes"
>
<c:forEach
var=
"item"
items=
"dataTypes"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<c:forEach
var=
"item"
items=
"dataTypes"
>
<c:forEach
var=
"item"
items=
"dataTypes"
>
<br
/>
<br
/>
<a
name=
"
sql${item.id
}"
></a><h3>
${item.topic}
</h3>
<a
name=
"
${item.link
}"
></a><h3>
${item.topic}
</h3>
<pre>
<pre>
${item.syntax}
${item.syntax}
</pre>
</pre>
...
...
h2/src/docsrc/html/functions.jsp
浏览文件 @
f61d2340
...
@@ -15,32 +15,32 @@ Functions
...
@@ -15,32 +15,32 @@ Functions
<h2>
Aggregate Functions
</h2>
<h2>
Aggregate Functions
</h2>
<c:forEach
var=
"item"
items=
"functionsAggregate"
>
<c:forEach
var=
"item"
items=
"functionsAggregate"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<h2>
Numeric Functions
</h2>
<h2>
Numeric Functions
</h2>
<c:forEach
var=
"item"
items=
"functionsNumeric"
>
<c:forEach
var=
"item"
items=
"functionsNumeric"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<h2>
String Functions
</h2>
<h2>
String Functions
</h2>
<c:forEach
var=
"item"
items=
"functionsString"
>
<c:forEach
var=
"item"
items=
"functionsString"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<h2>
Time and Date Functions
</h2>
<h2>
Time and Date Functions
</h2>
<c:forEach
var=
"item"
items=
"functionsTimeDate"
>
<c:forEach
var=
"item"
items=
"functionsTimeDate"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<h2>
System Functions
</h2>
<h2>
System Functions
</h2>
<c:forEach
var=
"item"
items=
"functionsSystem"
>
<c:forEach
var=
"item"
items=
"functionsSystem"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<c:forEach
var=
"item"
items=
"functionsAll"
>
<c:forEach
var=
"item"
items=
"functionsAll"
>
<br
/>
<br
/>
<a
name=
"
sql${item.id
}"
></a><h3>
${item.topic}
</h3>
<a
name=
"
${item.link
}"
></a><h3>
${item.topic}
</h3>
<pre>
<pre>
${item.syntax}
${item.syntax}
</pre>
</pre>
...
...
h2/src/docsrc/html/grammar.jsp
浏览文件 @
f61d2340
...
@@ -14,24 +14,24 @@ SQL Grammar
...
@@ -14,24 +14,24 @@ SQL Grammar
<h1>
SQL Grammar
</h1>
<h1>
SQL Grammar
</h1>
<h2>
Commands (Data Manipulation)
</h2>
<h2>
Commands (Data Manipulation)
</h2>
<c:forEach
var=
"item"
items=
"commandsDML"
>
<c:forEach
var=
"item"
items=
"commandsDML"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<h2>
Commands (Data Definition)
</h2>
<h2>
Commands (Data Definition)
</h2>
<c:forEach
var=
"item"
items=
"commandsDDL"
>
<c:forEach
var=
"item"
items=
"commandsDDL"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<h2>
Commands (Other)
</h2>
<h2>
Commands (Other)
</h2>
<c:forEach
var=
"item"
items=
"commandsOther"
>
<c:forEach
var=
"item"
items=
"commandsOther"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<h2>
Other Grammar
</h2>
<h2>
Other Grammar
</h2>
<c:forEach
var=
"item"
items=
"otherGrammar"
>
<c:forEach
var=
"item"
items=
"otherGrammar"
>
<a
href=
"#
sql${item.id
}"
>
${item.topic}
</a><br
/>
<a
href=
"#
${item.link
}"
>
${item.topic}
</a><br
/>
</c:forEach>
</c:forEach>
<c:forEach
var=
"item"
items=
"commands"
>
<c:forEach
var=
"item"
items=
"commands"
>
<br
/>
<br
/>
<a
name=
"
sql${item.id
}"
></a><h3>
${item.topic}
</h3>
<a
name=
"
${item.link
}"
></a><h3>
${item.topic}
</h3>
<pre>
<pre>
${item.syntax}
${item.syntax}
</pre>
</pre>
...
@@ -45,7 +45,7 @@ ${item.example}
...
@@ -45,7 +45,7 @@ ${item.example}
<c:forEach
var=
"item"
items=
"otherGrammar"
>
<c:forEach
var=
"item"
items=
"otherGrammar"
>
<br
/>
<br
/>
<a
name=
"
sql${item.id
}"
></a><h3>
${item.topic}
</h3>
<a
name=
"
${item.link
}"
></a><h3>
${item.topic}
</h3>
<pre>
<pre>
${item.syntax}
${item.syntax}
</pre>
</pre>
...
...
h2/src/docsrc/textbase/_messages_en.properties
浏览文件 @
f61d2340
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
90013
=
Database {0} not found
90013
=
Database {0} not found
90014
=
Error parsing {0}
90014
=
Error parsing {0}
90015
=
SUM or AVG on wrong data type for {0}
90015
=
SUM or AVG on wrong data type for {0}
90016
=
Column {0} must be in
group by
list
90016
=
Column {0} must be in
the GROUP BY
list
90017
=
Attempt to define a second primary key
90017
=
Attempt to define a second primary key
90018
=
The connection was not closed by the application and is garbage collected
90018
=
The connection was not closed by the application and is garbage collected
90019
=
Cannot drop the current user
90019
=
Cannot drop the current user
...
...
h2/src/main/org/h2/bnf/Bnf.java
浏览文件 @
f61d2340
...
@@ -142,28 +142,27 @@ public class Bnf {
...
@@ -142,28 +142,27 @@ public class Bnf {
buff
.
append
(
s
);
buff
.
append
(
s
);
continue
;
continue
;
}
}
String
section
=
null
;
RuleHead
found
=
null
;
int
id
=
-
1
;
for
(
int
i
=
0
;
i
<
s
.
length
();
i
++)
{
for
(
int
i
=
0
;
i
<
s
.
length
();
i
++)
{
String
test
=
StringUtils
.
toLowerEnglish
(
s
.
substring
(
i
));
String
test
=
StringUtils
.
toLowerEnglish
(
s
.
substring
(
i
));
RuleHead
r
=
(
RuleHead
)
ruleMap
.
get
(
test
);
RuleHead
r
=
(
RuleHead
)
ruleMap
.
get
(
test
);
if
(
r
!=
null
)
{
if
(
r
!=
null
)
{
id
=
r
.
id
;
found
=
r
;
section
=
r
.
section
;
break
;
break
;
}
}
}
}
if
(
id
==
-
1
)
{
if
(
found
==
null
||
found
.
rule
instanceof
RuleFixed
)
{
buff
.
append
(
s
);
buff
.
append
(
s
);
continue
;
continue
;
}
}
String
page
=
"grammar.html"
;
String
page
=
"grammar.html"
;
if
(
section
.
startsWith
(
"Data Types"
))
{
if
(
found
.
section
.
startsWith
(
"Data Types"
))
{
page
=
"datatypes.html"
;
page
=
"datatypes.html"
;
}
else
if
(
section
.
startsWith
(
"Functions"
))
{
}
else
if
(
found
.
section
.
startsWith
(
"Functions"
))
{
page
=
"functions.html"
;
page
=
"functions.html"
;
}
}
buff
.
append
(
"<a href=\""
+
page
+
"#sql"
+
id
+
"\">"
);
String
link
=
StringUtils
.
urlEncode
(
found
.
getTopic
().
toLowerCase
());
buff
.
append
(
"<a href=\""
+
page
+
"#"
+
link
+
"\">"
);
buff
.
append
(
s
);
buff
.
append
(
s
);
buff
.
append
(
"</a>"
);
buff
.
append
(
"</a>"
);
}
}
...
...
h2/src/main/org/h2/constant/ErrorCode.java
浏览文件 @
f61d2340
...
@@ -91,13 +91,13 @@ public class ErrorCode {
...
@@ -91,13 +91,13 @@ public class ErrorCode {
public
static
final
int
SUM_OR_AVG_ON_WRONG_DATATYPE_1
=
90015
;
public
static
final
int
SUM_OR_AVG_ON_WRONG_DATATYPE_1
=
90015
;
/**
/**
* The column must be included in the
group by
clause. Example:
* The column must be included in the
GROUP BY
clause. Example:
*
*
* <pre>
* <pre>
* CREATE TABLE TEST(ID INT, NAME VARCHAR);
* CREATE TABLE TEST(ID INT, NAME VARCHAR);
* INSERT INTO TEST VALUES(1, 'Hello'), (2, 'World');
* INSERT INTO TEST VALUES(1, 'Hello'), (2, 'World');
* SELECT ID, MAX(NAME) FROM TEST;
* SELECT ID, MAX(NAME) FROM TEST;
* Column ID must be in
group by
list.
* Column ID must be in
the GROUP BY
list.
* </pre>
* </pre>
*
*
* Correct:
* Correct:
...
...
h2/src/main/org/h2/res/_messages_de.properties
浏览文件 @
f61d2340
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
90134
=
Der Zugriff auf die Klasse {0} ist nicht erlaubt
90134
=
Der Zugriff auf die Klasse {0} ist nicht erlaubt
90135
=
Die Datenbank befindet sich im Exclusiv Modus; es k
\u
00F6nnen keine zus
\u
00E4tzlichen Verbindungen ge
\u
00F6ffnet werden
90135
=
Die Datenbank befindet sich im Exclusiv Modus; es k
\u
00F6nnen keine zus
\u
00E4tzlichen Verbindungen ge
\u
00F6ffnet werden
90136
=
Diese Outer Join Bedingung wird nicht unterst
\u
00FCtzt
\:
{0}
90136
=
Diese Outer Join Bedingung wird nicht unterst
\u
00FCtzt
\:
{0}
90137
=
\#
Can only assign to a variable, not to
\:
{0}
90137
=
Werte k
\u
00F6nnen nur einer Variablen zugewiesen werden, nicht an
\:
{0}
HY000
=
Allgemeiner Fehler
\:
{0}
HY000
=
Allgemeiner Fehler
\:
{0}
HY004
=
Unbekannter Datentyp
\:
{0}
HY004
=
Unbekannter Datentyp
\:
{0}
HYC00
=
Dieses Feature wird unterst
\u
00FCtzt
HYC00
=
Dieses Feature wird unterst
\u
00FCtzt
...
...
h2/src/main/org/h2/res/_messages_en.properties
浏览文件 @
f61d2340
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
90013
=
Database {0} not found
90013
=
Database {0} not found
90014
=
Error parsing {0}
90014
=
Error parsing {0}
90015
=
SUM or AVG on wrong data type for {0}
90015
=
SUM or AVG on wrong data type for {0}
90016
=
Column {0} must be in
group by
list
90016
=
Column {0} must be in
the GROUP BY
list
90017
=
Attempt to define a second primary key
90017
=
Attempt to define a second primary key
90018
=
The connection was not closed by the application and is garbage collected
90018
=
The connection was not closed by the application and is garbage collected
90019
=
Cannot drop the current user
90019
=
Cannot drop the current user
...
...
h2/src/main/org/h2/res/_messages_pt_br.properties
浏览文件 @
f61d2340
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
90013
=
Base de dados {0} n
\u
00E3o encontrada
90013
=
Base de dados {0} n
\u
00E3o encontrada
90014
=
Erro na convers
\u
00E3o {0}
90014
=
Erro na convers
\u
00E3o {0}
90015
=
SUM ou AVG com tipo de dados errado para {0}
90015
=
SUM ou AVG com tipo de dados errado para {0}
90016
=
Coluna {0} tamb
\u
00E9m deve estar no
group by
90016
=
Coluna {0} tamb
\u
00E9m deve estar no
GROUP BY
90017
=
Tentativa para definir uma segunda chave prim
\u
00E1ria
90017
=
Tentativa para definir uma segunda chave prim
\u
00E1ria
90018
=
A conec
\u
00E7
\u
00E3o foi fechada pela aplica
\u
00E7
\u
00E3o e retirada da mem
\u
00F3ria
90018
=
A conec
\u
00E7
\u
00E3o foi fechada pela aplica
\u
00E7
\u
00E3o e retirada da mem
\u
00F3ria
90019
=
N
\u
00E3o pode remover o usu
\u
00E1rio corrente
90019
=
N
\u
00E3o pode remover o usu
\u
00E1rio corrente
...
...
h2/src/main/org/h2/res/help.csv
浏览文件 @
f61d2340
...
@@ -722,6 +722,14 @@ Savepoints are only valid until the transaction is committed or rolled back.
...
@@ -722,6 +722,14 @@ Savepoints are only valid until the transaction is committed or rolled back.
SAVEPOINT HALF_DONE
SAVEPOINT HALF_DONE
"
"
"Commands (Other)","SET @","
SET @variableName [=] expression
","
Updates a user defined variable.
","
SET @TOTAL=0
"
"Commands (Other)","SET ALLOW_LITERALS","
"Commands (Other)","SET ALLOW_LITERALS","
SET ALLOW_LITERALS {NONE|ALL|NUMBERS}
SET ALLOW_LITERALS {NONE|ALL|NUMBERS}
","
","
...
@@ -2806,6 +2814,15 @@ The database engine may re-use a session id after the connection is closed.
...
@@ -2806,6 +2814,15 @@ The database engine may re-use a session id after the connection is closed.
CALL SESSION_ID()
CALL SESSION_ID()
"
"
"Functions (System)","SET","
SET(@variableName, value): value
","
Updates a variable with the given value. The new value is returned.
When used in a query, the value is updated in the order the rows are read.
","
SELECT X, SET(@I, IFNULL(@I, 0)+X) RUNNING_TOTAL FROM SYSTEM_RANGE(1, 10)
"
"Functions (System)","TABLE","
"Functions (System)","TABLE","
TABLE|TABLE_DISTINCT( { name dataType = expression } [,..]): result set
TABLE|TABLE_DISTINCT( { name dataType = expression } [,..]): result set
","
","
...
...
h2/src/main/org/h2/result/UpdatableRow.java
浏览文件 @
f61d2340
...
@@ -94,7 +94,7 @@ public class UpdatableRow {
...
@@ -94,7 +94,7 @@ public class UpdatableRow {
private
void
appendColumnList
(
StringBuffer
buff
,
boolean
set
)
{
private
void
appendColumnList
(
StringBuffer
buff
,
boolean
set
)
{
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
if
(
i
>
0
)
{
if
(
i
>
0
)
{
buff
.
append
(
", "
);
buff
.
append
(
','
);
}
}
String
col
=
result
.
getColumnName
(
i
);
String
col
=
result
.
getColumnName
(
i
);
buff
.
append
(
StringUtils
.
quoteIdentifier
(
col
));
buff
.
append
(
StringUtils
.
quoteIdentifier
(
col
));
...
@@ -120,6 +120,11 @@ public class UpdatableRow {
...
@@ -120,6 +120,11 @@ public class UpdatableRow {
String
col
=
(
String
)
key
.
get
(
i
);
String
col
=
(
String
)
key
.
get
(
i
);
int
idx
=
getColumnIndex
(
col
);
int
idx
=
getColumnIndex
(
col
);
Value
v
=
current
[
idx
];
Value
v
=
current
[
idx
];
if
(
v
==
null
||
v
==
ValueNull
.
INSTANCE
)
{
// rows with a unique key containing NULL are not supported,
// as multiple such rows could exist
throw
Message
.
getSQLException
(
ErrorCode
.
NO_DATA_AVAILABLE
);
}
v
.
set
(
prep
,
start
+
i
);
v
.
set
(
prep
,
start
+
i
);
}
}
}
}
...
@@ -167,7 +172,6 @@ public class UpdatableRow {
...
@@ -167,7 +172,6 @@ public class UpdatableRow {
Value
[]
newRow
=
new
Value
[
columnCount
];
Value
[]
newRow
=
new
Value
[
columnCount
];
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
int
type
=
result
.
getColumnType
(
i
);
int
type
=
result
.
getColumnType
(
i
);
// TODO lob: support updatable rows
newRow
[
i
]
=
DataType
.
readValue
(
session
,
rs
,
i
+
1
,
type
);
newRow
[
i
]
=
DataType
.
readValue
(
session
,
rs
,
i
+
1
,
type
);
}
}
return
newRow
;
return
newRow
;
...
@@ -182,6 +186,7 @@ public class UpdatableRow {
...
@@ -182,6 +186,7 @@ public class UpdatableRow {
setKey
(
prep
,
1
,
current
);
setKey
(
prep
,
1
,
current
);
int
count
=
prep
.
executeUpdate
();
int
count
=
prep
.
executeUpdate
();
if
(
count
!=
1
)
{
if
(
count
!=
1
)
{
// the row has already been deleted
throw
Message
.
getSQLException
(
ErrorCode
.
NO_DATA_AVAILABLE
);
throw
Message
.
getSQLException
(
ErrorCode
.
NO_DATA_AVAILABLE
);
}
}
}
}
...
@@ -206,23 +211,27 @@ public class UpdatableRow {
...
@@ -206,23 +211,27 @@ public class UpdatableRow {
v
.
set
(
prep
,
j
++);
v
.
set
(
prep
,
j
++);
}
}
setKey
(
prep
,
j
,
current
);
setKey
(
prep
,
j
,
current
);
prep
.
execute
();
int
count
=
prep
.
executeUpdate
();
if
(
count
!=
1
)
{
// the row has been deleted
throw
Message
.
getSQLException
(
ErrorCode
.
NO_DATA_AVAILABLE
);
}
}
}
public
void
insertRow
(
Value
[]
row
)
throws
SQLException
{
public
void
insertRow
(
Value
[]
row
)
throws
SQLException
{
StringBuffer
buff
=
new
StringBuffer
();
StringBuffer
buff
=
new
StringBuffer
();
buff
.
append
(
"INSERT INTO "
);
buff
.
append
(
"INSERT INTO "
);
appendTableName
(
buff
);
appendTableName
(
buff
);
buff
.
append
(
"("
);
buff
.
append
(
'('
);
appendColumnList
(
buff
,
false
);
appendColumnList
(
buff
,
false
);
buff
.
append
(
")VALUES("
);
buff
.
append
(
")VALUES("
);
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
if
(
i
>
0
)
{
if
(
i
>
0
)
{
buff
.
append
(
","
);
buff
.
append
(
','
);
}
}
buff
.
append
(
"?"
);
buff
.
append
(
'?'
);
}
}
buff
.
append
(
")"
);
buff
.
append
(
')'
);
PreparedStatement
prep
=
conn
.
prepareStatement
(
buff
.
toString
());
PreparedStatement
prep
=
conn
.
prepareStatement
(
buff
.
toString
());
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
columnCount
;
i
++)
{
Value
v
=
row
[
i
];
Value
v
=
row
[
i
];
...
@@ -231,7 +240,10 @@ public class UpdatableRow {
...
@@ -231,7 +240,10 @@ public class UpdatableRow {
}
}
v
.
set
(
prep
,
i
+
1
);
v
.
set
(
prep
,
i
+
1
);
}
}
prep
.
executeUpdate
();
int
count
=
prep
.
executeUpdate
();
if
(
count
!=
1
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
NO_DATA_AVAILABLE
);
}
}
}
}
}
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
f61d2340
...
@@ -150,22 +150,19 @@ java org.h2.test.TestAll timer
...
@@ -150,22 +150,19 @@ java org.h2.test.TestAll timer
/*
/*
document SET method, variables
find send mail source code?
send mail
Roadmap:
Roadmap:
History:
History:
User defined variables are now supported. Examples: SET @VAR=10;CALL @VAR
User defined variables are now supported. Examples: SET @VAR=10;CALL @VAR.
This can be used for running totals as in:
select x, set(@t, ifnull(@t, 0) + x) from system_range(1, 10)
Test Recovery with MAX_LOG_FILE_SIZE=1; test with various log file sizes
Test Recovery with MAX_LOG_FILE_SIZE=1; test with various log file sizes
Test H2 on OS X (result are here: h2-2007-12-27_test.zip)
Test H2 on OS X (result are here: h2-2007-12-27_test.zip)
Docs:
H2 can emulate PostgreSQL server.
Web site:
Web site:
link to history page, bug page
link to history page, bug page
Add a link to the google code bug page
Add a link to the google code bug page
...
...
h2/src/test/org/h2/test/test.in.txt
浏览文件 @
f61d2340
--- special grammar and test cases ---------------------------------------------------------------------------------------------
--- special grammar and test cases ---------------------------------------------------------------------------------------------
set @t = 0;
> ok
call set(1, 2);
> exception
select x, set(@t, ifnull(@t, 0) + x) from system_range(1, 3);
select x, set(@t, ifnull(@t, 0) + x) from system_range(1, 3);
> X SET(@T, (IFNULL(@T, 0) + X))
> - ----------------------------
> 1 1
> 2 3
> 3 6
> rows: 3
> rows: 3
select * from system_range(1, 2) a,
select * from system_range(1, 2) a,
...
...
h2/src/test/org/h2/test/testSimple.in.txt
浏览文件 @
f61d2340
call set(1, 2);
> exception;
CREATE TABLE TEST(A int NOT NULL, B int NOT NULL, C int) ;
CREATE TABLE TEST(A int NOT NULL, B int NOT NULL, C int) ;
ALTER TABLE TEST ADD CONSTRAINT CON UNIQUE(A,B);
ALTER TABLE TEST ADD CONSTRAINT CON UNIQUE(A,B);
ALTER TABLE TEST DROP C;
ALTER TABLE TEST DROP C;
...
...
h2/src/tools/org/h2/tools/doc/GenerateDoc.java
浏览文件 @
f61d2340
...
@@ -104,6 +104,10 @@ public class GenerateDoc {
...
@@ -104,6 +104,10 @@ public class GenerateDoc {
syntax
=
StringUtils
.
replaceAll
(
syntax
,
"<br />"
,
""
);
syntax
=
StringUtils
.
replaceAll
(
syntax
,
"<br />"
,
""
);
syntax
=
bnf
.
getSyntax
(
topic
,
syntax
);
syntax
=
bnf
.
getSyntax
(
topic
,
syntax
);
map
.
put
(
"syntax"
,
syntax
);
map
.
put
(
"syntax"
,
syntax
);
String
link
=
topic
.
toLowerCase
();
link
=
StringUtils
.
replaceAll
(
link
,
" "
,
""
);
link
=
StringUtils
.
replaceAll
(
link
,
"_"
,
""
);
map
.
put
(
"link"
,
StringUtils
.
urlEncode
(
link
));
list
.
add
(
map
);
list
.
add
(
map
);
}
}
session
.
put
(
key
,
list
);
session
.
put
(
key
,
list
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论