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

Documentation.

上级 341be22e
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.
......@@ -283,10 +283,19 @@ public abstract class Command implements CommandInterface {
return false;
}
/**
* Whether the command is already closed (in which case it can be re-used).
*
* @return true if it can be re-used
*/
public boolean canReuse() {
return canReuse;
}
/**
* The command is now re-used, therefore reset the canReuse flag, and the
* parameter values.
*/
public void reuse() {
canReuse = false;
ArrayList<? extends ParameterInterface> parameters = getParameters();
......
......@@ -598,20 +598,6 @@ public class ConstraintReferential extends Constraint {
}
}
public boolean containsColumn(Column col) {
for (IndexColumn c : columns) {
if (c.column == col) {
return true;
}
}
for (IndexColumn c : refColumns) {
if (c.column == col) {
return true;
}
}
return false;
}
public boolean isBefore() {
return false;
}
......
......@@ -346,8 +346,4 @@ public abstract class FileSystem {
*/
public abstract String unwrap(String fileName);
protected static FileSystem getFileSystem(String fileName) {
return FileSystem.getInstance(fileName);
}
}
......@@ -40,8 +40,8 @@ public class FileSystemSplit extends FileSystemWrapper {
boolean result = false;
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(f).exists(f)) {
result = getFileSystem(f).setReadOnly(f);
if (getInstance(f).exists(f)) {
result = getInstance(f).setReadOnly(f);
} else {
break;
}
......@@ -52,12 +52,12 @@ public class FileSystemSplit extends FileSystemWrapper {
public void copy(String source, String target) {
source = unwrap(source);
target = unwrap(target);
getFileSystem(source).copy(source, target);
getInstance(source).copy(source, target);
for (int i = 1;; i++) {
String o = getFileName(source, i);
if (getFileSystem(o).exists(o)) {
if (getInstance(o).exists(o)) {
String c = getFileName(target, i);
getFileSystem(o).copy(o, c);
getInstance(o).copy(o, c);
} else {
break;
}
......@@ -68,8 +68,8 @@ public class FileSystemSplit extends FileSystemWrapper {
fileName = unwrap(fileName);
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
getFileSystem(fileName).delete(f);
if (getInstance(fileName).exists(f)) {
getInstance(fileName).delete(f);
} else {
break;
}
......@@ -81,8 +81,8 @@ public class FileSystemSplit extends FileSystemWrapper {
long lastModified = 0;
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
long l = getFileSystem(fileName).getLastModified(fileName);
if (getInstance(fileName).exists(f)) {
long l = getInstance(fileName).getLastModified(fileName);
lastModified = Math.max(lastModified, l);
} else {
break;
......@@ -96,8 +96,8 @@ public class FileSystemSplit extends FileSystemWrapper {
long length = 0;
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
length += getFileSystem(fileName).length(f);
if (getInstance(fileName).exists(f)) {
length += getInstance(fileName).length(f);
} else {
break;
}
......@@ -124,11 +124,11 @@ public class FileSystemSplit extends FileSystemWrapper {
public InputStream openFileInputStream(String fileName) throws IOException {
fileName = unwrap(fileName);
InputStream input = getFileSystem(fileName).openFileInputStream(fileName);
InputStream input = getInstance(fileName).openFileInputStream(fileName);
for (int i = 1;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(f).exists(f)) {
InputStream i2 = getFileSystem(f).openFileInputStream(f);
if (getInstance(f).exists(f)) {
InputStream i2 = getInstance(f).openFileInputStream(f);
input = new SequenceInputStream(input, i2);
} else {
break;
......@@ -140,12 +140,12 @@ public class FileSystemSplit extends FileSystemWrapper {
public FileObject openFileObject(String fileName, String mode) throws IOException {
fileName = unwrap(fileName);
ArrayList<FileObject> list = New.arrayList();
FileObject o = getFileSystem(fileName).openFileObject(fileName, mode);
FileObject o = getInstance(fileName).openFileObject(fileName, mode);
list.add(o);
for (int i = 1;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
o = getFileSystem(f).openFileObject(f, mode);
if (getInstance(fileName).exists(f)) {
o = getInstance(f).openFileObject(f, mode);
list.add(o);
} else {
break;
......@@ -203,9 +203,9 @@ public class FileSystemSplit extends FileSystemWrapper {
newName = unwrap(newName);
for (int i = 0;; i++) {
String o = getFileName(oldName, i);
if (getFileSystem(o).exists(o)) {
if (getInstance(o).exists(o)) {
String n = getFileName(newName, i);
getFileSystem(n).rename(o, n);
getInstance(n).rename(o, n);
} else {
break;
}
......@@ -216,8 +216,8 @@ public class FileSystemSplit extends FileSystemWrapper {
fileName = unwrap(fileName);
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
boolean ok = getFileSystem(fileName).tryDelete(f);
if (getInstance(fileName).exists(f)) {
boolean ok = getInstance(fileName).tryDelete(f);
if (!ok) {
return false;
}
......
......@@ -475,6 +475,7 @@ public abstract class Table extends SchemaObjectBase {
* multi-column index. If it is, an exception is thrown. Single-column
* references and indexes are dropped.
*
* @param session the session
* @param col the column
* @throws SQLException if the column is referenced by multi-column
* constraints or indexes
......
......@@ -35,14 +35,14 @@ public class TestAlter extends TestBase {
deleteDb("alter");
conn = getConnection("alter");
stat = conn.createStatement();
testAlterTableDropColumWithReferences();
testAlterTableDropColumnWithReferences();
testAlterTableAlterColumn();
testAlterTableDropIdentityColumn();
conn.close();
deleteDb("alter");
}
private void testAlterTableDropColumWithReferences() throws SQLException {
private void testAlterTableDropColumnWithReferences() throws SQLException {
stat.execute("create table parent(id int, b int)");
stat.execute("create table child(p int primary key)");
......
......@@ -76,6 +76,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
conn.close();
}
/**
* This method is called via reflection from the database.
*/
public static void testDefaultConn() throws SQLException {
DriverManager.getConnection("jdbc:default:connection");
}
......
......@@ -28,7 +28,7 @@ public class TestTempTableCrash {
new TestTempTableCrash().test();
}
public void test() throws Exception {
private void test() throws Exception {
Connection conn;
Statement stat;
......
......@@ -28,7 +28,7 @@ public class TestUndoLogLarge {
new TestUndoLogLarge().test();
}
public void test() throws SQLException {
private void test() throws SQLException {
DeleteDbFiles.execute("data", "test", true);
Connection conn = DriverManager.getConnection("jdbc:h2:data/test");
Statement stat = conn.createStatement();
......
......@@ -30,7 +30,7 @@ public class TestUndoLogMemory {
// new TestUndoLogMemory().test(1000, "space(100000)");
}
public void test(int count, String defaultValue) throws SQLException {
private void test(int count, String defaultValue) throws SQLException {
// -Xmx1m -XX:+HeapDumpOnOutOfMemoryError
DeleteDbFiles.execute("data", "test", true);
......
......@@ -466,10 +466,17 @@ public class BuildBase {
if (quiet) {
System.setOut(filter(System.out, new String[] {
"Loading source files for package",
"Constructing Javadoc information",
"Constructing Javadoc information...",
"Generating ",
"Standard Doclet",
"Building "
"Building tree for all the packages and classes...",
"Building index for all the packages and classes...",
"Building index for all classes..."
}));
} else {
System.setOut(filter(System.out, new String[] {
"Loading source files for package ",
"Generating ",
}));
}
Class<?> clazz = Class.forName("com.sun.tools.javadoc.Main");
......
......@@ -668,4 +668,5 @@ requeried requery closable curr outdated market accurate borg theis welford
ooq exceeded eye hannibal stels garringer czech prevention propagate
compromise portion nodded rapping door stealing napping artifacts lore
pondered curious muttered quaint chamber nearly unwrapped flows weary volume
tapping gently dreary wrapping tis moger udt chafik
tapping gently dreary wrapping tis moger udt chafik outfile geom scalable
highly cloud infrastructure
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论