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

--no commit message

--no commit message
上级 c078603c
......@@ -161,21 +161,15 @@
<target name="docs" depends="clean, javadoc, compile">
<copy todir="docs">
<fileset dir="src/docsrc" includes="index.html"/>
<fileset dir="src/docsrc" includes="html/**/*" excludes="**/*.jsp" />
</copy>
<java classname="org.h2.tools.code.CheckJavadoc" classpath="bin"/>
<java classname="org.h2.tools.code.CheckTextFiles" classpath="bin"/>
<java classname="org.h2.tools.doc.GenerateDoc" classpath="bin">
<arg line="-in src/docsrc/html -out docs/html"/>
</java>
<java classname="org.h2.tools.doc.GenerateDoc" classpath="bin"/>
<java classname="org.h2.tools.i18n.PrepareTranslation" classpath="bin"/>
<java classname="org.h2.tools.indexer.Indexer" classpath="bin">
<arg line="-dir docs -destDir docs/html"/>
</java>
<java classname="org.h2.tools.doc.MergeDocs" classpath="bin" />
<java classname="org.h2.tools.doc.LinkChecker" classpath="bin">
<arg line="-dir docs"/>
</java>
<java classname="org.h2.tools.indexer.Indexer" classpath="bin"/>
<java classname="org.h2.tools.doc.MergeDocs" classpath="bin"/>
<java classname="org.h2.tools.doc.WebSite" classpath="bin"/>
<java classname="org.h2.tools.doc.LinkChecker" classpath="bin"/>
<java classname="org.h2.tools.doc.XMLChecker" classpath="bin"/>
<java classname="org.h2.tools.doc.SpellChecker" classpath="bin"/>
</target>
......
......@@ -1051,4 +1051,4 @@ IPv4 and IPv6 address formats are supported.
</tr>
</table>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -119,4 +119,4 @@ is automated by running the tool PropertiesToUTF8. The web site translation is a
using <code>ant docs</code>.
</p>
</div></td></tr></table></body></html>
</div></td></tr></table><!-- analytics --></body></html>
......@@ -15,7 +15,23 @@ Change Log
<h2>Next Version (unreleased)</h2>
<ul>
<li>When using multi-version concurrency (MVCC=TRUE), duplicate rows could appear in the result set when running queries
<li>ALTER SEQUENCE and ALTER TABLE ALTER COLUMN RESTART can now be used inside a transaction.
</li><li>New system property h2.aliasColumnName. When enabled, aliased columns
(as in SELECT ID AS I FROM TEST) return the real table and column name in
ResultSetMetaData.getTableName() and getColumnName(). This is disabled by
default for compatibility with other databases (HSQLDB, Apache Derby, PostgreSQL,
some version of MySQL). In version 1.1 this setting will be enabled.
</li><li>When using encrypted databases, and using the wrong file password,
the log file was renamed if the database was not already open. Fixed.
</li><li>Improved performance when using lob files in directories
(however this is still disabled by default)
</li><li>H2 Console: autocomplete didn't work with very large scripts. Fixed.
</li><li>Fulltext search: new method SEARCH_DATA that returns the column
names and primary keys as arrays.
</li><li>New experimental optimization for GROUP BY queries if an index can be used
that matches the group by columns. To enable this optimization, set the system
property h2.optimizeGroupSorted to true.
</li><li>When using multi-version concurrency (MVCC=TRUE), duplicate rows could appear in the result set when running queries
with uncommitted changes in the same session.
</li><li>H2 Console: remote connections were very slow because getHostName/getRemoteHost was used.
Fixed (now using getHostAddress/getRemoteAddr.
......@@ -317,4 +333,4 @@ Change Log
</li><li>Function tables did not work with views and EXPLAIN. Fixed.
</li></ul>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -30,4 +30,4 @@ ${item.example}
<br />
</c:forEach>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -41,4 +41,4 @@ H2 Database Engine
For details about changes, see the <a href="history.html">Change Log</a>.
</p>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -161,4 +161,4 @@ For more information, see
<a href="build.html#translating">Build/Translating</a>.
</p>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -1343,4 +1343,4 @@ call SELECT * FROM INFORMATION_SCHEMA.SETTINGS. The number of pages read / writt
is listed for the data and index file.
</p>
</div></td></tr></table></body></html>
</div></td></tr></table><!-- analytics --></body></html>
......@@ -52,4 +52,4 @@ ${item.example}
<br />
</c:forEach>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -57,4 +57,4 @@ ${item.example}
<br />
</c:forEach>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -107,4 +107,4 @@ via PayPal:
</li><li>William Gilbert, USA
</li></ul>
</div></td></tr></table></body></html>
</div></td></tr></table><!-- analytics --></body></html>
......@@ -86,4 +86,4 @@ After installing, you should get the following directory structure:
</tr>
</table>
</div></td></tr></table></body></html>
</div></td></tr></table><!-- analytics --></body></html>
......@@ -464,4 +464,4 @@ Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.h
Initial Developer: H2 Group
</pre>
</div></td></tr></table></body></html>
</div></td></tr></table><!-- analytics --></body></html>
......@@ -299,4 +299,4 @@ Volunteer database</a><br />
A database front end to register volunteers, partnership and donation for a Non Profit organization.
</p>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -93,9 +93,9 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
<tr><td style="border: 0px; background-color: #eee;">
<h3>News</h3>
<p>
<b>Newsfeeds:</b> Two are available:
<b>Newsfeeds:</b>
<a href="http://www.h2database.com/html/newsfeed-atom.xml" target="_blank">Full text (Atom)</a>
and <a href="http://www.h2database.com/html/newsfeed-rss.xml" target="_blank">Header only (RSS)</a>.
or <a href="http://www.h2database.com/html/newsfeed-rss.xml" target="_blank">Header only (RSS)</a>.
</p><p>
<b>Email Newsletter:</b> Subscribe to
<a href="http://groups.google.com/group/h2database-news/subscribe">
......@@ -132,16 +132,4 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
</table>
</div></td></tr></table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2351060-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
\ No newline at end of file
......@@ -370,4 +370,4 @@ The SQL statement ANALYZE can be used to automatically estimate the selectivity
This command should be run from time to time to improve the query plans generated by the optimizer.
</p>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
\ No newline at end of file
......@@ -96,4 +96,4 @@ Close the console window.
For more information, see the <a href="tutorial.html">Tutorial</a>.
</p>
</div></td></tr></table></body></html>
</div></td></tr></table><!-- analytics --></body></html>
......@@ -385,6 +385,8 @@ Roadmap
</li><li>Use FilterIn / FilterOut putStream?
</li><li>Access rights: add missing features (users should be 'owner' of objects; missing rights for sequences; dropping objects)
</li><li>Support NOCACHE table option (Oracle)
</li><li>Use ant 'get' to download dependencies
</li><li>Index usage for UPDATE ... WHERE .. IN (SELECT...)
</li></ul>
<h2>Not Planned</h2>
......@@ -393,4 +395,4 @@ Roadmap
</li><li>String.intern (so that Strings can be compared with ==) will not be used because some VMs have problems when used extensively.
</li></ul>
</div></td></tr></table></body></html>
\ No newline at end of file
</div></td></tr></table><!-- analytics --></body></html>
......@@ -63,16 +63,16 @@ Initial Developer: H2 Group
<a href="grammar.html" target="main">SQL Grammar</a><br />
<a href="functions.html" target="main">Functions</a><br />
<a href="datatypes.html" target="main">Data Types</a><br />
<a href="../javadoc/index.html" target="main">Javadoc JDBC API</a><br />
<a href="../h2.pdf" target="_blank">Documentation as PDF</a><br />
<a href="../javadoc/index.html" target="main">Javadoc</a><br />
<a href="../h2.pdf" target="_blank">Docs as PDF</a><br />
<a href="sourceError.html" target="main">Error Analyzer</a><br />
<br />
<b>Appendix</b><br />
<a href="build.html" target="main">Build</a><br />
<a href="history.html" target="main">History and Roadmap</a><br />
<a href="faq.html" target="main">FAQ and Known Bugs</a><br />
<a href="history.html" target="main">History &amp; Roadmap</a><br />
<a href="faq.html" target="main">FAQ</a><br />
<a href="license.html" target="main">License</a><br />
<br />
</div>
<!-- analytics -->
</body></html>
......@@ -59,4 +59,5 @@ Initial Developer: H2 Group
document.location = '#here';
// -->
</script>
<!-- analytics -->
</pre></html>
......@@ -225,4 +225,5 @@ function sizeTextArea() {
select('input');
//-->
</script>
<!-- analytics -->
</body></html>
......@@ -4,17 +4,17 @@
*/
td, input, select, textarea, body, code, pre, td, th {
font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif;
font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif;
font-weight: normal;
}
h1, h2, h3, h4, h5 {
font: 8pt Arial, Helvetica, sans-serif;
font: 9pt Arial, Helvetica, sans-serif;
font-weight: bold;
}
td, input, select, textarea, body, code, pre {
font-size: 8pt;
font-size: 9pt;
}
pre {
......@@ -147,7 +147,7 @@ td.searchKeyword a:hover {
td.searchLink {
border: 0px;
padding: 0px 0px 0px 42px;
padding: 0px 0px 0px 32px;
text-indent: -16px;
}
......
......@@ -4,17 +4,17 @@
*/
td, input, select, textarea, body, code, pre, td, th {
font: 8pt Tahoma, Arial, Helvetica, sans-serif;
font: 9pt Tahoma, Arial, Helvetica, sans-serif;
font-weight: normal;
}
h1, h2, h3, h4, h5 {
font: 8pt Arial, Helvetica, sans-serif;
font: 9pt Arial, Helvetica, sans-serif;
font-weight: bold;
}
td, input, select, textarea, body, code, pre {
font-size: 8pt;
font-size: 9pt;
}
pre {
......@@ -61,7 +61,7 @@ table {
}
th {
font-size: 8pt;
font-size: 9pt;
font-weight: normal;
text-align: left;
background-color: #ece9d8;
......@@ -71,7 +71,7 @@ th {
td {
background-color: #ffffff;
font-size: 8pt;
font-size: 9pt;
text-align: left;
vertical-align: top;
border: 1px solid #aca899;
......
......@@ -642,4 +642,4 @@ of the value assigned to it, that means it is not necessary (or possible) to dec
There are no restrictions on the assigned values, large objects (LOBs) are supported as well.
</p>
</div></td></tr></table></body></html>
</div></td></tr></table><!-- analytics --></body></html>
......@@ -4,7 +4,7 @@
*/
td, input, select, textarea, body, code, pre, td, th {
font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif;
font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif;
font-weight: normal;
}
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Contains interfaces for user defined extensions, such as triggers and user defined aggregate functions.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
The implementation of the BNF (Backus-Naur form) parser and tool.
......
......@@ -13,7 +13,6 @@ import java.util.HashSet;
import org.h2.api.Trigger;
import org.h2.command.ddl.AlterIndexRename;
import org.h2.command.ddl.AlterSequence;
import org.h2.command.ddl.AlterTableAddConstraint;
import org.h2.command.ddl.AlterTableAlterColumn;
import org.h2.command.ddl.AlterTableDropConstraint;
......@@ -53,6 +52,7 @@ import org.h2.command.ddl.GrantRevoke;
import org.h2.command.ddl.PrepareProcedure;
import org.h2.command.ddl.SetComment;
import org.h2.command.ddl.TruncateTable;
import org.h2.command.dml.AlterSequence;
import org.h2.command.dml.AlterTableSet;
import org.h2.command.dml.BackupCommand;
import org.h2.command.dml.Call;
......@@ -3664,9 +3664,10 @@ public class Parser {
}
private AlterSequence parseAlterSequence() throws SQLException {
AlterSequence command = new AlterSequence(session);
String sequenceName = readIdentifierWithSchema();
command.setSequence(getSchema().getSequence(sequenceName));
Sequence sequence = getSchema().getSequence(sequenceName);
AlterSequence command = new AlterSequence(session, sequence.getSchema());
command.setSequence(sequence);
if (readIf("RESTART")) {
read("WITH");
command.setStartWith(readExpression());
......@@ -4142,10 +4143,8 @@ public class Parser {
} else if (readIf("RESTART")) {
readIf("WITH");
Expression start = readExpression();
AlterTableAlterColumn command = new AlterTableAlterColumn(session, table.getSchema());
command.setTable(table);
command.setType(AlterTableAlterColumn.RESTART);
command.setOldColumn(column);
AlterSequence command = new AlterSequence(session, table.getSchema());
command.setColumn(column);
command.setStartWith(start);
return command;
} else if (readIf("SELECTIVITY")) {
......@@ -4153,7 +4152,7 @@ public class Parser {
command.setTable(table);
command.setType(AlterTableAlterColumn.SELECTIVITY);
command.setOldColumn(column);
command.setStartWith(readExpression());
command.setSelectivity(readExpression());
return command;
} else {
Column newColumn = parseColumnForTable(columnName);
......
......@@ -40,15 +40,15 @@ import org.h2.util.ObjectArray;
*/
public class AlterTableAlterColumn extends SchemaCommand {
public static final int NOT_NULL = 0, NULL = 1, DEFAULT = 2, RESTART = 3, CHANGE_TYPE = 4;
public static final int ADD = 5, DROP = 6, SELECTIVITY = 7;
public static final int NOT_NULL = 0, NULL = 1, DEFAULT = 2, CHANGE_TYPE = 3;
public static final int ADD = 4, DROP = 5, SELECTIVITY = 6;
private Table table;
private Column oldColumn;
private Column newColumn;
private int type;
private Expression defaultExpression;
private Expression newStart;
private Expression newSelectivity;
private String addBefore;
public AlterTableAlterColumn(Session session, Schema schema) {
......@@ -102,15 +102,6 @@ public class AlterTableAlterColumn extends SchemaCommand {
db.update(session, table);
break;
}
case RESTART: {
if (sequence == null) {
throw Message.getSQLException(ErrorCode.SEQUENCE_NOT_FOUND_1, oldColumn.getSQL());
}
long value = newStart.optimize(session).getValue(session).getLong();
sequence.setStartValue(value);
db.update(session, sequence);
break;
}
case CHANGE_TYPE: {
// TODO document data type change problems when used with
// autoincrement columns.
......@@ -145,7 +136,7 @@ public class AlterTableAlterColumn extends SchemaCommand {
break;
}
case SELECTIVITY: {
int value = newStart.optimize(session).getValue(session).getInt();
int value = newSelectivity.optimize(session).getValue(session).getInt();
oldColumn.setSelectivity(value);
db.update(session, table);
break;
......@@ -403,8 +394,8 @@ public class AlterTableAlterColumn extends SchemaCommand {
this.type = type;
}
public void setStartWith(Expression start) {
newStart = start;
public void setSelectivity(Expression selectivity) {
newSelectivity = selectivity;
}
public void setDefaultExpression(Expression defaultExpression) {
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Contains DDL (data definition language) and related SQL statements.
......
......@@ -3,35 +3,53 @@
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.command.ddl;
package org.h2.command.dml;
import java.sql.SQLException;
import org.h2.command.ddl.SchemaCommand;
import org.h2.constant.ErrorCode;
import org.h2.engine.Database;
import org.h2.engine.Right;
import org.h2.engine.Session;
import org.h2.expression.Expression;
import org.h2.message.Message;
import org.h2.schema.Schema;
import org.h2.schema.Sequence;
import org.h2.table.Column;
import org.h2.table.Table;
/**
* This class represents the statement
* ALTER SEQUENCE
*/
public class AlterSequence extends DefineCommand {
public class AlterSequence extends SchemaCommand {
private Table table;
private Sequence sequence;
private Expression start;
private Expression increment;
public AlterSequence(Session session) {
super(session);
public AlterSequence(Session session, Schema schema) {
super(session, schema);
}
public void setSequence(Sequence sequence) {
this.sequence = sequence;
}
public boolean isTransactional() {
return true;
}
public void setColumn(Column column) throws SQLException {
table = column.getTable();
sequence = column.getSequence();
if (sequence == null) {
throw Message.getSQLException(ErrorCode.SEQUENCE_NOT_FOUND_1, column.getSQL());
}
}
public void setStartWith(Expression start) {
this.start = start;
}
......@@ -42,8 +60,10 @@ public class AlterSequence extends DefineCommand {
public int update() throws SQLException {
// TODO rights: what are the rights required for a sequence?
session.commit(true);
Database db = session.getDatabase();
if (table != null) {
session.getUser().checkRight(table, Right.ALL);
}
if (start != null) {
long startValue = start.optimize(session).getValue(session).getLong();
sequence.setStartValue(startValue);
......
......@@ -6,11 +6,11 @@
package org.h2.command.dml;
import java.sql.SQLException;
import org.h2.command.ddl.SchemaCommand;
import org.h2.engine.Right;
import org.h2.engine.Session;
import org.h2.message.Message;
import org.h2.result.LocalResult;
import org.h2.schema.Schema;
import org.h2.table.Table;
......@@ -68,7 +68,4 @@ public class AlterTableSet extends SchemaCommand {
return 0;
}
public LocalResult queryMeta() {
return null;
}
}
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Contains DML (data manipulation language) and related SQL statements.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
This package contains the parser and the base classes for prepared SQL statements.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Lossless data compression classes.
......
......@@ -63,6 +63,16 @@ public class SysProperties {
*/
public static final String USER_HOME = getStringSetting("user.home", "");
/**
* System property <code>h2.aliasColumnName</code> (default: false).<br />
* When enabled, aliased columns (as in SELECT ID AS I FROM TEST) return the
* real table and column name in ResultSetMetaData.getTableName() and
* getColumnName(). This is disabled by default for compatibility with other
* databases (HSQLDB, Apache Derby, PostgreSQL, some version of MySQL).
*/
// TODO change in version 1.1
public static final boolean ALIAS_COLUMN_NAME = getBooleanSetting("h2.aliasColumnName", false);
/**
* System property <code>h2.allowBigDecimalExtensions</code> (default:
* false).<br />
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Error codes and system properties.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Database constraints such as check constraints, unique constraints, and referential constraints.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Contains high level classes of the database and classes that don't fit in another sub-package.
......
......@@ -8,6 +8,7 @@ package org.h2.expression;
import java.sql.SQLException;
import org.h2.command.Parser;
import org.h2.constant.SysProperties;
import org.h2.engine.Session;
import org.h2.table.ColumnResolver;
import org.h2.table.TableFilter;
......@@ -91,4 +92,20 @@ public class Alias extends Expression {
return expr.getCost();
}
public String getTableName() {
if (SysProperties.ALIAS_COLUMN_NAME) {
return expr.getTableName();
} else {
return super.getTableName();
}
}
public String getColumnName() {
if (SysProperties.ALIAS_COLUMN_NAME) {
return expr.getColumnName();
} else {
return super.getColumnName();
}
}
}
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Expressions include mathematical operations, conditions, simple values, and functions.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
The native full text search implementation, and the wrapper for the the Lucene full text search implementation.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Various table index implementations, as well as cursors to navigate in an index.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Implementation of the JDBC API (package java.sql).
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Implementation of the extended JDBC API (package javax.sql).
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Undo and redo log implementation.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Trace (logging facility) and error message tool.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Implementation of the JDBC driver.
......
......@@ -137,6 +137,10 @@ ALTER SEQUENCE sequenceName
[INCREMENT BY long]
","
Changes the next value and / or the increment of a sequence.
This command can be used inside a transaction,
that means it does not commit the current transaction;
however the new value is by other transactions immediately,
and rolling back this command has no effect.
","
ALTER SEQUENCE SEQ_ID RESTART WITH 1000
"
......@@ -188,6 +192,7 @@ RESTART WITH long
","
Changes the next value of an auto increment column.
The column must be an auto increment column.
The same transactional rules as for ALTER SEQUENCE apply.
","
ALTER TABLE TEST ALTER COLUMN ID RESTART WITH 10000
"
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Implementation of row and internal result sets.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Schema implementation and objects that are stored in a schema (for example, sequences and constants).
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Security classes, such as encryption and cryptographically secure hash algorithms.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Implementation of the TCP server.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
A small FTP server.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
PostgreSQL server implementation of this database.
......
......@@ -72,21 +72,23 @@ public class PageParser {
char c = p.charAt(i);
switch (c) {
case '<': {
if (p.charAt(i + 1) == '%') {
if (p.charAt(i + 2) == '@') {
i += 3;
pos = i;
read("include");
String file = readParam("file");
read("%>");
String s = server.getTextFile(file);
append(s);
i = pos;
} else {
buff.append(c);
}
break;
} else if (p.charAt(i + 3) == ':' && p.charAt(i + 1) == '/') {
// if (p.charAt(i + 1) == '%') {
// // TODO <%@include %>: never used
// if (p.charAt(i + 2) == '@') {
// i += 3;
// pos = i;
// read("include");
// String file = readParam("file");
// read("%>");
// String s = server.getTextFile(file);
// append(s);
// i = pos;
// } else {
// buff.append(c);
// }
// break;
// } else
if (p.charAt(i + 3) == ':' && p.charAt(i + 1) == '/') {
// end tag
pos = i;
return;
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
The H2 Console tool.
......
......@@ -4,8 +4,7 @@
*/
td, input, select, textarea, body, code, pre {
font-family: Tahoma, helvetica, sans-serif;
font-size: 8pt;
font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif;
}
body {
......@@ -91,7 +90,7 @@ th.login {
td.login {
background-color: #ece9d8;
font-size: 8pt;
font-size: 9pt;
padding: 5px 10px;
text-align: left;
border: 0px;
......@@ -128,7 +127,7 @@ table.empty {
td.empty {
background-color: #ffffff;
border: 0px;
font-size: 8pt;
font-size: 9pt;
padding: 5px 10px;
text-align: left;
}
......@@ -148,7 +147,7 @@ table {
}
th {
font-size: 8pt;
font-size: 9pt;
font-weight: normal;
text-align: left;
background-color: #ece9d8;
......@@ -158,7 +157,7 @@ th {
td {
background-color: #ffffff;
font-size: 8pt;
font-size: 9pt;
padding: 2px;
text-align: left;
vertical-align:top;
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
A file system abstraction.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Storage abstractions, such as a file with a cache, or a class to convert values to a byte array and vice versa.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Classes related to a table and table meta data.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Various tools. Most tools are command line driven, but not all (for example the CSV tool).
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Internal utility classes.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Data type and value implementations.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Standalone sample applications.
......
......@@ -159,16 +159,14 @@ java org.h2.test.TestAll timer
/*
scheduler: what if invoke takes more than...
scheduler: log at startup next 5
CREATE TABLE in a before trigger results in an internal error.
drop table test;
create table test(id int primary key, type int, name varchar);
create index idx_type on test(type);
@LOOP 10000 insert into test values(?, mod(?, 100), 'Hello ' || ?);
explain SELECT type, max(name) FROM TEST group by type;
SELECT type, max(name) FROM TEST group by type;
merge query and result frames
auto-complete in-place
scheduler: what if invoke takes more than...
scheduler: log at startup next 5
scheduler: add an a cron functionality
test with:
- large varchar columns (40 KB)
......@@ -178,50 +176,21 @@ read uncommitted and multi-threaded mode at the same time is dangerous
add @author
CREATE TABLE in a before trigger results in an internal error.
should be transactional:
ALTER TABLE test ALTER COLUMN id RESTART WITH ?
ALTER SEQUENCE sequenceName RESTART WITH ? INCREMENT BY ?
console autocomplete with pos
sparse files
remove old in use, links
multi-threaded kernel fulltext
test multi-threaded kernel fulltext
fix or disable the linear hash index
delete old ipowerb content
link to new changelog and roadmap, remove pages from google groups
Can sometimes not delete log file? need test case
Add where required // TODO: change in version 1.1
History:
I'm trying to use h2database embedded with AES encryption. It all
seems to work fine UNLESS the wrong decryption password id specified
in the connection ( DriverManager.getConnection(url, prop) ). If this
happens, I get dot corrupt (.corrupt) files created.
After several failed attempts (total
across a database's lifespan), FILE_RENAME_FAILED_2 errors start occur
until I delete the .corrupt files.
Improved performance when using lob files in directories
(however this is still disabled by default)
H2 Console: autocomplete didn't work with very large scripts. Fixed.
Fulltext search: new method SEARCH_DATA that returns the column
names and primary keys as arrays.
New experimental optimization for GROUP BY queries if an index can be used
that matches the group by columns. To enable this optimization, set the system
property h2.optimizeGroupSorted to true.
Roadmap:
Use ant 'get' to download dependencies
Index usage for UPDATE ... WHERE .. IN (SELECT...)
*/
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
The implementation of the benchmark application.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
A standalone code coverage tool.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Database tests. Most tests are on the SQL level.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
JDBC API tests.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Tests related to distributed transactions.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Multi version concurrency tests.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
High level test classes.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Multi version concurrency tests.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
This package contains server tests.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Synthetic tests using random operations or statements.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
A synthetic test using random SQL statements executed against multiple databases.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Synthetic tests using random operations in multiple threads.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
A player to interpret and execute Java statements in a trace file.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Unit tests that don't start the database (in most cases).
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Source code checking classes.
......
......@@ -68,19 +68,38 @@ public class GenerateDoc {
map("functionsAll",
"SELECT * FROM INFORMATION_SCHEMA.HELP WHERE SECTION LIKE 'Functions%' ORDER BY SECTION, ID");
map("dataTypes", "SELECT * FROM INFORMATION_SCHEMA.HELP WHERE SECTION LIKE 'Data Types%' ORDER BY SECTION, ID");
process("grammar");
process("functions");
process("datatypes");
processAll("");
conn.close();
}
void process(String fileName) throws Exception {
FileOutputStream out = new FileOutputStream(outDir + "/" + fileName + ".html");
FileInputStream in = new FileInputStream(inDir + "/" + fileName + ".jsp");
void processAll(String dir) throws Exception {
if (dir.endsWith(".svn")) {
return;
}
File[] list = new File(inDir + "/" + dir).listFiles();
for (int i = 0; i < list.length; i++) {
File file = list[i];
if (file.isDirectory()) {
processAll(dir + file.getName());
} else {
process(dir, file.getName());
}
}
}
void process(String dir, String fileName) throws Exception {
String inFile = inDir + "/" + dir + "/" + fileName;
String outFile = outDir + "/" + dir + "/" + fileName;
new File(outFile).getParentFile().mkdirs();
FileOutputStream out = new FileOutputStream(outFile);
FileInputStream in = new FileInputStream(inFile);
byte[] bytes = IOUtils.readBytesAndClose(in, 0);
if (fileName.endsWith(".html")) {
String page = new String(bytes);
page = PageParser.parse(null, page, session);
out.write(page.getBytes());
bytes = page.getBytes();
}
out.write(bytes);
out.close();
}
......
......@@ -35,7 +35,7 @@ public class LinkChecker {
private HashMap links = new HashMap();
private void run(String[] args) throws Exception {
String dir = "src/docsrc";
String dir = "docs";
for (int i = 0; i < args.length; i++) {
if ("-dir".equals(args[i])) {
dir = args[++i];
......
......@@ -53,7 +53,7 @@ public class MergeDocs {
// String end = "</body>";
String start = "<div class=\"contentDiv\"";
String end = "</div></td></tr></table></body></html>";
String end = "</div></td></tr></table><!-- analytics --></body></html>";
int idx = text.indexOf(end);
text = text.substring(0, idx);
......
......@@ -30,7 +30,7 @@ public class SpellChecker {
private HashSet used = new HashSet();
private HashMap unknown = new HashMap();
private boolean debug;
private boolean printDictionary = true;
private boolean printDictionary = false;
private boolean addToDictionary;
private static final String[] SUFFIX = new String[] { "html", "java", "sql", "txt", "xml", "jsp", "css", "bat",
"csv", "xml", "js", "Driver", "properties", "task", "php", "" };
......@@ -46,7 +46,6 @@ public class SpellChecker {
}
private void run(String dictionary, String dir) throws IOException {
System.out.println("SpellChecker...");
process(new File(dir + "/" + dictionary));
process(new File(dir));
if (printDictionary) {
......
/*
* Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
* (license2)
* Initial Developer: H2 Group
*/
package org.h2.tools.doc;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import org.h2.util.IOUtils;
import org.h2.util.StringUtils;
/**
* Create the web site, mainly by copying the regular docs. A few items are
* different in the web site, for example it calls web site analytics.
* Also, the main entry point page is different.
*/
public class WebSite {
String sourceDir = "docs";
String targetDir = "dataWeb";
private static final String ANALYTICS_TAG = "<!-- analytics -->";
private static final String ANALYTICS_SCRIPT =
"<script src='http://www.google-analytics.com/ga.js' type=\"text/javascript\" />\n" +
"<script type=\"text/javascript\">var pageTracker=_gat._getTracker(\"UA-2351060-1\");pageTracker._initData();pageTracker._trackPageview();</script>";
public static void main(String[] args) throws Exception {
new WebSite().run();
}
private void run() throws Exception {
deleteRecursive(new File(targetDir));
copy(new File(sourceDir), new File(targetDir));
}
private void deleteRecursive(File dir) {
if (dir.isDirectory()) {
File[] list = dir.listFiles();
for (int i = 0; i < list.length; i++) {
deleteRecursive(list[i]);
}
}
dir.delete();
}
private void copy(File source, File target) throws IOException {
if (source.isDirectory()) {
target.mkdirs();
File[] list = source.listFiles();
for (int i = 0; i < list.length; i++) {
copy(list[i], new File(target, list[i].getName()));
}
} else {
String name = source.getName();
if (name.endsWith("main.html") || name.endsWith("main_ja.html") || name.endsWith("onePage.html")) {
return;
}
FileInputStream in = new FileInputStream(source);
byte[] bytes = IOUtils.readBytesAndClose(in, 0);
if (name.endsWith(".html")) {
String page = new String(bytes, "UTF-8");
page = StringUtils.replaceAll(page, ANALYTICS_TAG, ANALYTICS_SCRIPT);
bytes = page.getBytes("UTF-8");
}
FileOutputStream out = new FileOutputStream(target);
out.write(bytes);
out.close();
if (name.endsWith("mainWeb.html")) {
target.renameTo(new File(target.getParentFile(), "main.html"));
} else if (name.endsWith("mainWeb_ja.html")) {
target.renameTo(new File(target.getParentFile(), "main_ja.html"));
}
}
}
}
......@@ -481,3 +481,5 @@ xdo xfc xhtml xid xids xmkd xml xmlattr xmlcdata xmlcomment xmlhttp xmlnode xmln
xmlstartdoc xmltext xor xrmd xrunhprof xsi xsm xtea xti xtime xts xvi xyz yacute
year yen yes yet yield yielding ymd you your yourkit yourself ytd yuml yusuke
yyyy zeile zero zeros zeta zip zloty zone zwj zwnj
cron ide pageview track gat analytics tracker
\ No newline at end of file
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Tools to build the documentation.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
A Javadoc doclet to build nicer and smaller API Javadoc HTML files.
......
......@@ -43,6 +43,7 @@ public class PrepareTranslation {
private static final String MAIN_LANGUAGE = "en";
private static final String DELETED_PREFIX = "~";
private static final boolean AUTO_TRANSLATE = false;
private static final String[] EXCLUDE = { "datatypes.html", "functions.html", "grammar.html" };
public static void main(String[] args) throws Exception {
new PrepareTranslation().run(args);
......@@ -159,6 +160,15 @@ public class PrepareTranslation {
}
}
private static boolean exclude(String fileName) {
for (int i = 0; i < EXCLUDE.length; i++) {
if (fileName.endsWith(EXCLUDE[i])) {
return true;
}
}
return false;
}
private static void extractFromHtml(String dir, String target, String language) throws Exception {
File[] list = new File(dir).listFiles();
for (int i = 0; i < list.length; i++) {
......@@ -167,6 +177,9 @@ public class PrepareTranslation {
if (!name.endsWith(".html")) {
continue;
}
if (exclude(name)) {
continue;
}
// remove '.html'
name = name.substring(0, name.length() - 5);
if (name.indexOf('_') >= 0) {
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Internationalization tools.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
A Javadoc indexing mechanism.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
A tool to redirect and interpret PostgreSQL network protocol packets.
......
......@@ -6,7 +6,7 @@ Initial Developer: H2 Group
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 8pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;">
Security tools.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论