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

Removed unused code and reduce visibility where possible.

上级 a15f2efc
...@@ -76,7 +76,7 @@ public class AlterTableAddConstraint extends SchemaCommand { ...@@ -76,7 +76,7 @@ public class AlterTableAddConstraint extends SchemaCommand {
* *
* @return the update count * @return the update count
*/ */
public int tryUpdate() { private int tryUpdate() {
if (!transactional) { if (!transactional) {
session.commit(true); session.commit(true);
} }
......
...@@ -27,7 +27,7 @@ public abstract class DefineCommand extends Prepared { ...@@ -27,7 +27,7 @@ public abstract class DefineCommand extends Prepared {
* *
* @param session the session * @param session the session
*/ */
public DefineCommand(Session session) { DefineCommand(Session session) {
super(session); super(session);
} }
......
...@@ -19,7 +19,7 @@ import org.h2.util.Permutations; ...@@ -19,7 +19,7 @@ import org.h2.util.Permutations;
* The optimizer is responsible to find the best execution plan * The optimizer is responsible to find the best execution plan
* for a given query. * for a given query.
*/ */
public class Optimizer { class Optimizer {
private static final int MAX_BRUTE_FORCE_FILTERS = 7; private static final int MAX_BRUTE_FORCE_FILTERS = 7;
private static final int MAX_BRUTE_FORCE = 2000; private static final int MAX_BRUTE_FORCE = 2000;
......
...@@ -57,7 +57,7 @@ public abstract class Query extends Prepared { ...@@ -57,7 +57,7 @@ public abstract class Query extends Prepared {
private Value[] lastParameters; private Value[] lastParameters;
private boolean cacheableChecked, cacheable; private boolean cacheableChecked, cacheable;
public Query(Session session) { Query(Session session) {
super(session); super(session);
} }
......
...@@ -34,7 +34,7 @@ import org.h2.util.TempFileDeleter; ...@@ -34,7 +34,7 @@ import org.h2.util.TempFileDeleter;
/** /**
* This class is the base for RunScriptCommand and ScriptCommand. * This class is the base for RunScriptCommand and ScriptCommand.
*/ */
public abstract class ScriptBase extends Prepared implements DataHandler { abstract class ScriptBase extends Prepared implements DataHandler {
/** /**
* The default name of the script file if .zip compression is used. * The default name of the script file if .zip compression is used.
...@@ -62,7 +62,7 @@ public abstract class ScriptBase extends Prepared implements DataHandler { ...@@ -62,7 +62,7 @@ public abstract class ScriptBase extends Prepared implements DataHandler {
private FileStore store; private FileStore store;
private String compressionAlgorithm; private String compressionAlgorithm;
public ScriptBase(Session session) { ScriptBase(Session session) {
super(session); super(session);
} }
......
...@@ -224,12 +224,6 @@ public class DbSettings extends SettingsBase { ...@@ -224,12 +224,6 @@ public class DbSettings extends SettingsBase {
*/ */
public final boolean optimizeOr = get("OPTIMIZE_OR", Constants.VERSION_MINOR >= 3); public final boolean optimizeOr = get("OPTIMIZE_OR", Constants.VERSION_MINOR >= 3);
/**
* Database setting <code>OPTIMIZE_SUBQUERY_CACHE</code> (default: true).<br />
* Cache subquery results.
*/
public final boolean optimizeSubqueryCache = get("OPTIMIZE_SUBQUERY_CACHE", true);
/** /**
* Database setting <code>OPTIMIZE_TWO_EQUALS</code> (default: true).<br /> * Database setting <code>OPTIMIZE_TWO_EQUALS</code> (default: true).<br />
* Optimize expressions of the form A=B AND B=1. In this case, AND A=1 is * Optimize expressions of the form A=B AND B=1. In this case, AND A=1 is
......
...@@ -1666,18 +1666,6 @@ public class ErrorCode { ...@@ -1666,18 +1666,6 @@ public class ErrorCode {
*/ */
public static final int DATABASE_CALLED_AT_SHUTDOWN = 90121; public static final int DATABASE_CALLED_AT_SHUTDOWN = 90121;
/**
* The error with code <code>90122</code> is thrown when
* trying to altering, adding or dropping columns of a table that has views.
* Example:
* <pre>
* CREATE TABLE TEST(ID INT);
* CREATE VIEW TEST_VIEW AS SELECT * FROM TEST;
* ALTER TABLE TEST ADD COLUMN NAME VARCHAR;
* </pre>
*/
public static final int OPERATION_NOT_SUPPORTED_WITH_VIEWS_2 = 90122;
/** /**
* The error with code <code>90123</code> is thrown when * The error with code <code>90123</code> is thrown when
* trying mix regular parameters and indexed parameters in the same statement. * trying mix regular parameters and indexed parameters in the same statement.
...@@ -1889,7 +1877,7 @@ public class ErrorCode { ...@@ -1889,7 +1877,7 @@ public class ErrorCode {
*/ */
public static final int RESULT_SET_READONLY = 90140; public static final int RESULT_SET_READONLY = 90140;
// next is 90140 // next is 90122, 90141
private ErrorCode() { private ErrorCode() {
// utility class // utility class
......
...@@ -48,7 +48,7 @@ public abstract class Constraint extends SchemaObjectBase implements Comparable< ...@@ -48,7 +48,7 @@ public abstract class Constraint extends SchemaObjectBase implements Comparable<
*/ */
protected Table table; protected Table table;
public Constraint(Schema schema, int id, String name, Table table) { Constraint(Schema schema, int id, String name, Table table) {
initSchemaObjectBase(schema, id, name, Trace.CONSTRAINT); initSchemaObjectBase(schema, id, name, Trace.CONSTRAINT);
this.table = table; this.table = table;
this.setTemporary(table.isTemporary()); this.setTemporary(table.isTemporary());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论