Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
4ad757f9
提交
4ad757f9
authored
7月 12, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
improved documentation
上级
dacf564f
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
62 行增加
和
2 行删除
+62
-2
advanced.html
h2/src/docsrc/html/advanced.html
+20
-0
features.html
h2/src/docsrc/html/features.html
+5
-0
Csv.java
h2/src/main/org/h2/tools/Csv.java
+10
-2
SimpleResultSet.java
h2/src/main/org/h2/tools/SimpleResultSet.java
+23
-0
Doclet.java
h2/src/tools/org/h2/build/doclet/Doclet.java
+4
-0
没有找到文件。
h2/src/docsrc/html/advanced.html
浏览文件 @
4ad757f9
...
@@ -102,6 +102,26 @@ When using the client/server mode, large BLOB and CLOB data is stored in a tempo
...
@@ -102,6 +102,26 @@ When using the client/server mode, large BLOB and CLOB data is stored in a tempo
on the client side.
on the client side.
</p>
</p>
<h3>
When to use CLOB/BLOB
</h3>
<p>
This database stores large LOB (CLOB and BLOB) objects as separate files.
Small LOB objects are stored in-place, the threshold can be set using
<a
href=
"grammar.html#setmaxlengthinplacelob"
>
MAX_LENGTH_INPLACE_LOB
</a>
,
but there is still an overhead to use CLOB/BLOB. Because of this, BLOB and CLOB
should never be used for columns with a maximum size below about 200 bytes.
The best threshold depends on the use case; reading in-place objects is faster
than reading from separate files, but slows down the performance of operations
that don't involve this column.
</p>
<h3>
Large Object Compression
</h3>
<p>
CLOB and BLOB values can be compressed by using
<a
href=
"grammar.html#setcompresslob"
>
SET COMPRESS_LOB
</a>
.
The LZF algorithm is faster but needs more disk space. By default compression is disabled, which usually speeds up write
operations. If you store many large compressible values such as XML, HTML, text, and uncompressed binary files,
then compressing can save a lot of disk space (sometimes more than 50%), and read operations may even be faster.
</p>
<br
/><a
name=
"linked_tables"
></a>
<br
/><a
name=
"linked_tables"
></a>
<h2>
Linked Tables
</h2>
<h2>
Linked Tables
</h2>
<p>
<p>
...
...
h2/src/docsrc/html/features.html
浏览文件 @
4ad757f9
...
@@ -1511,6 +1511,11 @@ Functions that accept non-nullable parameters such as 'int' will not be called i
...
@@ -1511,6 +1511,11 @@ Functions that accept non-nullable parameters such as 'int' will not be called i
Instead, the result of the function is NULL. If the function should be called if a parameter is NULL, you need
Instead, the result of the function is NULL. If the function should be called if a parameter is NULL, you need
to use 'java.lang.Integer' instead of 'int'.
to use 'java.lang.Integer' instead of 'int'.
</p>
</p>
<p>
SQL types are mapped to Java classes and vice-versa as in the JDBC API. For details, see
<a
href=
"datatypes.html"
>
Data Types
</a>
.
There are two special cases: java.lang.Object is mapped to OTHER (a serialized object). Therefore, java.lang.Object can not be used
to match all SQL types (matching all SQL types is not supported). The second special case is Object[]: arrays of any class are mapped to ARRAY.
</p>
<h3>
Functions that require a Connection
</h3>
<h3>
Functions that require a Connection
</h3>
<p>
<p>
...
...
h2/src/main/org/h2/tools/Csv.java
浏览文件 @
4ad757f9
...
@@ -110,10 +110,18 @@ public class Csv implements SimpleRowSource {
...
@@ -110,10 +110,18 @@ public class Csv implements SimpleRowSource {
}
}
/**
/**
* Writes the result set to a file in the CSV format.
* Writes the result set to a file in the CSV format. The result set is read
* using the following loop:
*
* <pre>
* while (rs.next()) {
* writeRow(row);
* }
* </pre>
*
*
* @param outputFileName the name of the csv file
* @param outputFileName the name of the csv file
* @param rs the result set
* @param rs the result set - the result set must be positioned before the
* first row.
* @param charset the charset or null to use UTF-8
* @param charset the charset or null to use UTF-8
* @return the number of rows written
* @return the number of rows written
* @throws SQLException
* @throws SQLException
...
...
h2/src/main/org/h2/tools/SimpleResultSet.java
浏览文件 @
4ad757f9
...
@@ -201,6 +201,26 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
...
@@ -201,6 +201,26 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
this
.
source
=
source
;
this
.
source
=
source
;
}
}
/**
* Constructor a new result set that is later populated with addRow.
*
* @return the new object
*/
public
static
SimpleResultSet
newInstance
()
{
return
new
SimpleResultSet
();
}
/**
* Constructor a new result set if the rows should be retrieved using
* the specified row source object.
*
* @param source the row source
* @return the new object
*/
public
static
SimpleResultSet
newInstance
(
SimpleRowSource
source
)
{
return
new
SimpleResultSet
();
}
/**
/**
* Adds a column to the result set.
* Adds a column to the result set.
*
*
...
@@ -1604,6 +1624,9 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
...
@@ -1604,6 +1624,9 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
// --- private -----------------------------
// --- private -----------------------------
/**
* INTERNAL
*/
static
SQLException
getUnsupportedException
()
{
static
SQLException
getUnsupportedException
()
{
return
new
SQLException
(
"Feature not supported"
,
"HYC00"
);
return
new
SQLException
(
"Feature not supported"
,
"HYC00"
);
}
}
...
...
h2/src/tools/org/h2/build/doclet/Doclet.java
浏览文件 @
4ad757f9
...
@@ -100,6 +100,10 @@ public class Doclet {
...
@@ -100,6 +100,10 @@ public class Doclet {
MethodDoc
[]
methods
=
clazz
.
methods
();
MethodDoc
[]
methods
=
clazz
.
methods
();
Arrays
.
sort
(
methods
,
new
Comparator
<
MethodDoc
>()
{
Arrays
.
sort
(
methods
,
new
Comparator
<
MethodDoc
>()
{
public
int
compare
(
MethodDoc
a
,
MethodDoc
b
)
{
public
int
compare
(
MethodDoc
a
,
MethodDoc
b
)
{
// sort static method before non-static methods
if
(
a
.
isStatic
()
!=
b
.
isStatic
())
{
return
a
.
isStatic
()
?
-
1
:
1
;
}
return
a
.
name
().
compareTo
(
b
.
name
());
return
a
.
name
().
compareTo
(
b
.
name
());
}
}
});
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论