提交 4ad757f9 authored 作者: Thomas Mueller's avatar Thomas Mueller

improved documentation

上级 dacf564f
......@@ -102,6 +102,26 @@ When using the client/server mode, large BLOB and CLOB data is stored in a tempo
on the client side.
</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>
<h2>Linked Tables</h2>
<p>
......
......@@ -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
to use 'java.lang.Integer' instead of 'int'.
</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>
<p>
......
......@@ -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 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
* @return the number of rows written
* @throws SQLException
......
......@@ -201,6 +201,26 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
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.
*
......@@ -1604,6 +1624,9 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
// --- private -----------------------------
/**
* INTERNAL
*/
static SQLException getUnsupportedException() {
return new SQLException("Feature not supported", "HYC00");
}
......
......@@ -100,6 +100,10 @@ public class Doclet {
MethodDoc[] methods = clazz.methods();
Arrays.sort(methods, new Comparator<MethodDoc>() {
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());
}
});
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论