提交 96083e2b authored 作者: Thomas Mueller's avatar Thomas Mueller

H2 Console: Columns are now listed for up to 500 tables.

上级 e3a45374
......@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>H2 Console: Cmd+Enter executes the current statement.
<ul><li>Shell: line comments didn't work correctly.
</li><li>H2 Console: Columns are now listed for up to 500 tables instead of 100.
</li><li>H2 Console: Cmd+Enter executes the current statement.
</li><li>JaQu: the maximum length of a column can now be defined using maxLength.
For an example, see Product.java (maxLength(category, 255)).
</li><li>R&\#305;dvan A&\#287;ar has completed the Turkish translation of the H2 Console. Thanks a lot!
......
......@@ -17,6 +17,16 @@ import java.util.ArrayList;
*/
public class DbSchema {
/**
* Up to this many tables, the column type and indexes are listed.
*/
static final int MAX_TABLES_LIST_INDEXES = 100;
/**
* Up to this many tables, the column names are listed.
*/
static final int MAX_TABLES_LIST_COLUMNS = 500;
/**
* The database content container.
*/
......@@ -68,7 +78,7 @@ public class DbSchema {
rs.close();
tables = new DbTableOrView[list.size()];
list.toArray(tables);
if (tables.length < 100) {
if (tables.length < MAX_TABLES_LIST_COLUMNS) {
for (int i = 0; i < tables.length; i++) {
DbTableOrView tab = tables[i];
tab.readColumns(meta);
......
......@@ -792,7 +792,7 @@ class WebThread extends Thread implements DatabaseEventListener {
return treeIndex;
}
boolean isOracle = schema.contents.isOracle;
boolean notManyTables = tables.length < 100;
boolean notManyTables = tables.length < DbSchema.MAX_TABLES_LIST_INDEXES;
for (int i = 0; i < tables.length; i++) {
DbTableOrView table = tables[i];
if (table.isView) {
......
......@@ -283,8 +283,6 @@ java org.h2.test.TestAll timer
System.setProperty("h2.check2", "true");
/*
maybe make cmd+enter work for mac?
create_100_tables.sql (show columns in h2 console for h2 databases)
postgresql generate_series?
is in-memory scan index re-using ids?
don't store default values (store a special value)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论