提交 cd720f1c authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 1b972af6
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -219,6 +219,9 @@ public abstract class Query extends Prepared {
return true;
}
/**
* Disable caching of result sets.
*/
public void disableCache() {
this.noCache = true;
}
......
......@@ -174,7 +174,7 @@ public class ViewIndex extends BaseIndex {
throw DbException.get(ErrorCode.SYNTAX_ERROR_2, "recursive queries without UNION ALL");
}
Query left = union.getLeft();
// to ensure the last result isn't closed
// to ensure the last result is not closed
left.disableCache();
LocalResult r = left.query(0);
LocalResult result = union.getEmptyResult();
......@@ -184,7 +184,7 @@ public class ViewIndex extends BaseIndex {
Query right = union.getRight();
r.reset();
view.setRecursiveResult(r);
// to ensure the last result isn't closed
// to ensure the last result is not closed
right.disableCache();
while (true) {
r = right.query(0);
......
......@@ -946,9 +946,9 @@ RANDOM_UUID()
","
Returns a new UUID with 122 pseudo random bits."
"Functions (Numeric)","ROUND","
ROUND(numeric, digitsInt)
ROUND(numeric [, digitsInt])
","
Rounds to a number of digits."
Rounds to a number of digits, or to the nearest long if the number of digits if not set."
"Functions (Numeric)","ROUNDMAGIC","
ROUNDMAGIC(numeric)
","
......
......@@ -284,22 +284,6 @@ public class LobStorage {
return super.skip(n);
}
// public long skip(long n) throws IOException {
// n -= skipSmall(n);
// while (n > BLOCK_LENGTH) {
// try {
// n -= skipBuffer(lob, seq++);
// pos = 0;
// buffer = null;
// } catch (SQLException e) {
// throw DbException.convertToIOException(e);
// }
// }
// fillBuffer();
// n -= skipSmall(n);
// return super.skip(n);
// }
//
private int skipSmall(long n) {
if (n > 0 && buffer != null && pos < buffer.length) {
int x = MathUtils.convertLongToInt(Math.min(n, buffer.length - pos));
......@@ -553,8 +537,6 @@ public class LobStorage {
long lobId = getNextLobId();
String sql = "INSERT INTO " + LOB_MAP + "(LOB, SEQ, OFFSET, HASH, BLOCK) " +
"SELECT ?, SEQ, OFFSET, HASH, BLOCK FROM " + LOB_MAP + " WHERE LOB = ?";
// String sql = "INSERT INTO " + LOB_MAP + "(LOB, SEQ, LEN, HASH, BLOCK) " +
// "SELECT ?, SEQ, LEN, HASH, BLOCK FROM " + LOB_MAP + " WHERE LOB = ?";
PreparedStatement prep = prepare(sql);
prep.setLong(1, lobId);
prep.setLong(2, oldLobId);
......@@ -608,7 +590,6 @@ public class LobStorage {
*/
void storeBlock(long lobId, int seq, long offset, byte[] b, String compressAlgorithm) throws SQLException {
long block;
// int len = b.length;
boolean blockExists = false;
if (compressAlgorithm != null) {
b = compress.compress(b, compressAlgorithm);
......@@ -643,11 +624,9 @@ public class LobStorage {
reuse(sql, prep);
}
String sql = "INSERT INTO " + LOB_MAP + "(LOB, SEQ, OFFSET, HASH, BLOCK) VALUES(?, ?, ?, ?, ?)";
// String sql = "INSERT INTO " + LOB_MAP + "(LOB, SEQ, LEN, HASH, BLOCK) VALUES(?, ?, ?, ?, ?)";
PreparedStatement prep = prepare(sql);
prep.setLong(1, lobId);
prep.setInt(2, seq);
// prep.setInt(3, len);
prep.setLong(3, offset);
prep.setLong(4, hash);
prep.setLong(5, block);
......
......@@ -77,8 +77,10 @@ public class CloseWatcher extends PhantomReference<Object> {
* called in a loop to remove old references.
*
* @param o the object
* @param closeable the object to close
* @param stackTrace whether the stack trace should be registered (this is
* relatively slow)
* @return the close watcher
*/
public static CloseWatcher register(Object o, Closeable closeable, boolean stackTrace) {
ReferenceQueue<Object> q = queue;
......
......@@ -47,6 +47,7 @@ public class ValueArray extends Value {
* Get or create a array value for the given value array.
* Do not clone the data.
*
* @param componentType the array class (null for Object[])
* @param list the value array
* @return the value
*/
......
......@@ -52,7 +52,7 @@ public class TestSelectCountNonNullColumn extends TestBase {
}
void checkStarCount(long expect) throws SQLException {
private void checkStarCount(long expect) throws SQLException {
String sql = "SELECT COUNT(*) FROM SIMPLE";
if (expect < 0) {
sql = "EXPLAIN " + sql;
......@@ -68,7 +68,7 @@ public class TestSelectCountNonNullColumn extends TestBase {
}
}
void checkKeyCount(long expect) throws SQLException {
private void checkKeyCount(long expect) throws SQLException {
String sql = "SELECT COUNT(KEY) FROM SIMPLE";
if (expect < 0) {
sql = "EXPLAIN " + sql;
......@@ -84,7 +84,7 @@ public class TestSelectCountNonNullColumn extends TestBase {
}
}
void checkNameCount(long expect) throws SQLException {
private void checkNameCount(long expect) throws SQLException {
String sql = "SELECT COUNT(NAME) FROM SIMPLE";
if (expect < 0) {
sql = "EXPLAIN " + sql;
......
......@@ -684,3 +684,5 @@ diagnostics checkout somewhat icu delegation classifications karlsson applet
litailang springsource eccn springframework spr growth teams gigabytes europe
mcleod decade experience travel willing scjp himself routinely tsi retrieving
multiplied ross judson closeable watcher enqueued referent refs watch tracked
preserving disallowed restrictive
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论