Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b74219aa
提交
b74219aa
authored
1月 11, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
48a06615
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
28 行增加
和
37 行删除
+28
-37
help.csv
h2/src/docsrc/help/help.csv
+2
-1
features.html
h2/src/docsrc/html/features.html
+1
-1
history.html
h2/src/docsrc/html/history.html
+1
-1
mainWeb.html
h2/src/docsrc/html/mainWeb.html
+1
-1
roadmap.html
h2/src/docsrc/html/roadmap.html
+1
-0
CompressLZF.java
h2/src/main/org/h2/compress/CompressLZF.java
+1
-1
createFunction.txt
h2/src/test/org/h2/test/todo/createFunction.txt
+0
-32
tools.sql
h2/src/test/org/h2/test/todo/tools.sql
+21
-0
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
b74219aa
...
@@ -391,7 +391,8 @@ When defining a function alias with source code, the Sun javac is compiler
...
@@ -391,7 +391,8 @@ When defining a function alias with source code, the Sun javac is compiler
is used if the tools.jar is in the classpath. If not, javac is run as a separate process.
is used if the tools.jar is in the classpath. If not, javac is run as a separate process.
Only the source code is stored in the database; the class is compiled each time
Only the source code is stored in the database; the class is compiled each time
the database is re-opened. Source code is usually passed
the database is re-opened. Source code is usually passed
as dollar quoted text to avoid escaping problems.
as dollar quoted text to avoid escaping problems. If import statements are used,
then the tag @CODE must be added before the method.
If the first parameter of the Java function is a java.sql.Connection, then a
If the first parameter of the Java function is a java.sql.Connection, then a
connection to the database is provided. This connection must not be closed.
connection to the database is provided. This connection must not be closed.
...
...
h2/src/docsrc/html/features.html
浏览文件 @
b74219aa
...
@@ -282,7 +282,7 @@ encrypted using AES-256 and XTEA encryption algorithms
...
@@ -282,7 +282,7 @@ encrypted using AES-256 and XTEA encryption algorithms
<td
class=
"compareY"
>
Yes
</td>
<td
class=
"compareY"
>
Yes
</td>
<td
class=
"compareN"
>
No
</td>
<td
class=
"compareN"
>
No
</td>
<td
class=
"compareN"
>
No
</td>
<td
class=
"compareN"
>
No
</td>
<td
class=
"compare
N"
>
No
</td>
<td
class=
"compare
Y"
>
Yes
</td>
<td
class=
"compareY"
>
Yes
</td>
<td
class=
"compareY"
>
Yes
</td>
</tr><tr>
</tr><tr>
<td>
Role Based Security
</td>
<td>
Role Based Security
</td>
...
...
h2/src/docsrc/html/history.html
浏览文件 @
b74219aa
...
@@ -71,7 +71,7 @@ Some think Java is too slow for low level operations,
...
@@ -71,7 +71,7 @@ Some think Java is too slow for low level operations,
but this is no longer true. Garbage collection for example is
but this is no longer true. Garbage collection for example is
now faster than manual memory management.
now faster than manual memory management.
</p><p>
</p><p>
Developing Java code is faster than C or C++ code. When using Java,
Developing Java code is faster than
developing
C or C++ code. When using Java,
most time can be spent on improving the algorithms instead of
most time can be spent on improving the algorithms instead of
porting the code to different platforms or doing memory management.
porting the code to different platforms or doing memory management.
Features such as Unicode and network libraries are already built-in.
Features such as Unicode and network libraries are already built-in.
...
...
h2/src/docsrc/html/mainWeb.html
浏览文件 @
b74219aa
...
@@ -140,7 +140,7 @@ Welcome to H2, the Java SQL database. The main features of H2 are:
...
@@ -140,7 +140,7 @@ Welcome to H2, the Java SQL database. The main features of H2 are:
<td
class=
"compareY"
>
Yes
</td>
<td
class=
"compareY"
>
Yes
</td>
<td
class=
"compareN"
>
No
</td>
<td
class=
"compareN"
>
No
</td>
<td
class=
"compareN"
>
No
</td>
<td
class=
"compareN"
>
No
</td>
<td
class=
"compare
N"
>
No
</td>
<td
class=
"compare
Y"
>
Yes
</td>
<td
class=
"compareY"
>
Yes
</td>
<td
class=
"compareY"
>
Yes
</td>
</tr><tr>
</tr><tr>
<td>
Footprint (jar/dll size)
</td>
<td>
Footprint (jar/dll size)
</td>
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
b74219aa
...
@@ -468,6 +468,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
...
@@ -468,6 +468,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Maybe reject join without "on" (except natural join).
</li><li>
Maybe reject join without "on" (except natural join).
</li><li>
Cluster: support load balance with values for each server / auto detect.
</li><li>
Cluster: support load balance with values for each server / auto detect.
</li><li>
Implement GiST (Generalized Search Tree for Secondary Storage).
</li><li>
Implement GiST (Generalized Search Tree for Secondary Storage).
</li><li>
Function to read a number of bytes/characters from an BLOB or CLOB.
</li></ul>
</li></ul>
<h2>
Not Planned
</h2>
<h2>
Not Planned
</h2>
...
...
h2/src/main/org/h2/compress/CompressLZF.java
浏览文件 @
b74219aa
...
@@ -42,7 +42,7 @@ package org.h2.compress;
...
@@ -42,7 +42,7 @@ package org.h2.compress;
* </p>
* </p>
* <ul>
* <ul>
* <li>Each instance should be used by a single thread only.</li>
* <li>Each instance should be used by a single thread only.</li>
* <li>The data buffers
must be smaller than 2^31
.</li>
* <li>The data buffers
should be smaller than 1 GB
.</li>
* <li>For performance reasons, safety checks on expansion are omitted.</li>
* <li>For performance reasons, safety checks on expansion are omitted.</li>
* <li>Invalid compressed data can cause an ArrayIndexOutOfBoundsException.</li>
* <li>Invalid compressed data can cause an ArrayIndexOutOfBoundsException.</li>
* </ul>
* </ul>
...
...
h2/src/test/org/h2/test/todo/createFunction.txt
deleted
100644 → 0
浏览文件 @
48a06615
CREATE FUNCTION name ( argName ] type [ { DEFAULT | = } defaultExpression ] [, ...] ] )
[ RETURNS type ]
{ LANGUAGE languageName | IMMUTABLE | STABLE
| VOLATILE | CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT
| STRICT | COST executionCost | ROWS resultRows
IMMUTABLE cannot modify the database and always returns the same result
STABLE cannot modify the database and within a single table scan it will consistently
return the same result
VOLATILE value can change
CALLED ON NULL INPUT
RETURNS NULL ON NULL INPUT or STRICT
CREATE FUNCTION add(integer, integer) RETURNS integer
AS 'select $1 + $2;'
LANGUAGE SQL
IMMUTABLE
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS $$
BEGIN
RETURN i + 1;
END;
$$ LANGUAGE ...;
create alias newFunctionAliasName [ DETERMINISTIC ]
as
FOR classAndMethodName
h2/src/test/org/h2/test/todo/tools.sql
浏览文件 @
b74219aa
...
@@ -8,3 +8,24 @@
...
@@ -8,3 +8,24 @@
-- update all rows in all tables
-- update all rows in all tables
select
'update '
||
table_schema
||
'.'
||
table_name
||
' set '
||
column_name
||
'='
||
column_name
||
';'
select
'update '
||
table_schema
||
'.'
||
table_name
||
' set '
||
column_name
||
'='
||
column_name
||
';'
from
information_schema
.
columns
where
ORDINAL_POSITION
=
1
and
table_schema
<>
'INFORMATION_SCHEMA'
;
from
information_schema
.
columns
where
ORDINAL_POSITION
=
1
and
table_schema
<>
'INFORMATION_SCHEMA'
;
-- read the first few bytes from a BLOB
drop
table
test
;
drop
alias
first_bytes
;
create
alias
first_bytes
as
$$
import
java
.
io
.
*
;
@
CODE
byte
[]
firstBytes
(
InputStream
in
,
int
len
)
throws
IOException
{
try
{
byte
[]
data
=
new
byte
[
len
];
DataInputStream
din
=
new
DataInputStream
(
in
);
din
.
readFully
(
data
,
0
,
len
);
return
data
;
}
finally
{
in
.
close
();
}
}
$$
;
create
table
test
(
data
blob
);
insert
into
test
values
(
'010203040506070809'
);
select
first_bytes
(
data
,
3
)
from
test
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论