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

docs

上级 6ae22bc7
......@@ -1083,12 +1083,12 @@ OR X = 2 OR X = 2 OR X = 2 OR X = 2 OR X = 2
-- repeat previous line 500 times --
</pre>
</li><li>There is no limit for the following entities, except the memory and storage capacity:
maximum identifier length, maximum number of tables, maximum number of columns,
maximum number of indexes, maximum number of parameters,
maximum number of triggers, and maximum number of other database objects.
maximum identifier length, maximum number of tables, maximum number of columns,
maximum number of indexes, maximum number of parameters,
maximum number of triggers, and maximum number of other database objects.
</li><li>For limitations on data types, see the documentation of the respective Java data type
or the data type documentation of this database.
</ul>
or the data type documentation of this database.
</li></ul>
<br /><a name="glossary_links"></a>
<h2>Glossary and Links</h2>
......
......@@ -17,7 +17,9 @@ Change Log
<h2>Next Version (unreleased)</h2>
<ul>
<li>-
<li>Support for overloaded Java methods. A user defined function can now be bound to
multiple Java methods, if the Java methods have the same name but a different number
of parameters. Thanks to Gary Tong for providing a patch!
</li></ul>
<h2>Version 1.0.73 (2008-05-31)</h2>
......
......@@ -51,7 +51,6 @@ Roadmap
<h2>Priority 2</h2>
<ul>
<li>Automatic mode: jdbc:h2:auto: (embedded mode if possible, if not use server mode). Keep the server running until all have disconnected.
</li><li>Support function overloading as in Java (multiple functions with the same name, but different parameter count or data types).
</li><li>Linked tables that point to the same database should share the connection ([SHARED CONNECTION]). Serialize access to the connection.
</li><li>Procedural language / script language (Javascript)
</li><li>Linked tables should support a schema name: CREATE LINKED TABLE ... (... [schemaName, ] originalTableString) - DB2: SET SCHEMA after connecting
......
......@@ -70,6 +70,7 @@ org.h2.tools<br />
<b>Interfaces</b><br />
org.h2.api<br />
<a href="org/h2/api/AggregateFunction.html" target="javadoc">AggregateFunction</a><br />
<a href="org/h2/api/CloseListener.html" target="javadoc">CloseListener</a><br />
<a href="org/h2/api/DatabaseEventListener.html" target="javadoc">DatabaseEventListener</a><br />
<a href="org/h2/api/Trigger.html" target="javadoc">Trigger</a><br />
<br />
......
......@@ -159,6 +159,14 @@ public abstract class DataPage {
*/
public abstract void fill(int len);
/**
* Create a new data page for the given hander. The
* handler will decide what type of buffer is created.
*
* @param handler the data handler
* @param capacity the initial capacity of the buffer
* @return the data page
*/
public static DataPage create(DataHandler handler, int capacity) {
if (handler.getTextStorage()) {
return new DataPageText(handler, new byte[capacity]);
......@@ -166,6 +174,14 @@ public abstract class DataPage {
return new DataPageBinary(handler, new byte[capacity]);
}
/**
* Create a new data page using the given data for the given hander. The
* handler will decide what type of buffer is created.
*
* @param handler the data handler
* @param buff the data
* @return the data page
*/
public static DataPage create(DataHandler handler, byte[] buff) {
if (handler.getTextStorage()) {
return new DataPageText(handler, buff);
......@@ -173,6 +189,12 @@ public abstract class DataPage {
return new DataPageBinary(handler, buff);
}
/**
* Check if there is still enough capacity in the buffer.
* This method extends the buffer if required.
*
* @param plus the number of additional bytes required
*/
public void checkCapacity(int plus) {
if (pos + plus >= data.length) {
byte[] d = new byte[(data.length + plus) * 2];
......@@ -183,6 +205,12 @@ public abstract class DataPage {
}
}
/**
* Get the current write position of this data page, which is the current
* length.
*
* @return the length
*/
public int length() {
return pos;
}
......@@ -217,6 +245,14 @@ public abstract class DataPage {
pos += len;
}
/**
* Copy a number of bytes to the given buffer from the current position. The
* current position is incremented accordingly.
*
* @param buff the output buffer
* @param off the offset in the output buffer
* @param len the number of bytes to copy
*/
public void read(byte[] buff, int off, int len) {
System.arraycopy(data, pos, buff, off, len);
pos += len;
......@@ -344,6 +380,12 @@ public abstract class DataPage {
}
}
/**
* Calculate the number of bytes required to encode the given value.
*
* @param v the value
* @return the number of bytes required to store this value
*/
public int getValueLen(Value v) throws SQLException {
if (v == ValueNull.INSTANCE) {
return 1;
......@@ -503,6 +545,10 @@ public abstract class DataPage {
}
}
/**
* Fill up the buffer with empty space and an (initially empty) checksum
* until the size is a multiple of Constants.FILE_BLOCK_SIZE.
*/
public void fillAligned() {
// TODO datapage: fillAligned should not use a fixed constant '2'
// 0..6 > 8, 7..14 > 16, 15..22 > 24, ...
......
......@@ -247,7 +247,8 @@ public class DiskFile implements CacheWriter {
}
/**
* Initialize the the 'storage allocation table' of this file from a given byte array.
* Initialize the the 'storage allocation table' of this file from a given
* byte array.
*
* @param summary the storage allocation table
*/
......@@ -854,6 +855,13 @@ public class DiskFile implements CacheWriter {
}
}
/**
* Copy a number of bytes at the specified location to the output stream.
*
* @param pos the position
* @param out the output stream
* @return the new position, or -1 if there is no more data to copy
*/
public int copyDirect(int pos, OutputStream out) throws SQLException {
synchronized (database) {
try {
......@@ -977,6 +985,9 @@ public class DiskFile implements CacheWriter {
}
}
/**
* Flush pending writes of the underlying file.
*/
public void sync() {
synchronized (database) {
if (file != null) {
......@@ -985,13 +996,24 @@ public class DiskFile implements CacheWriter {
}
}
/**
* Check if this is the data file.
*
* @return true if this is the data file
*/
public boolean isDataFile() {
return dataFile;
}
public void setLogChanges(boolean b) {
/**
* Set whether changes should be written to the transaction log before they
* are applied in the file.
*
* @param logChanges the new value
*/
public void setLogChanges(boolean logChanges) {
synchronized (database) {
this.logChanges = b;
this.logChanges = logChanges;
}
}
......@@ -1037,6 +1059,10 @@ public class DiskFile implements CacheWriter {
}
}
/**
* Write all buffered redo log data to the file. Redo log data is buffered
* to improve recovery performance.
*/
public void flushRedoLog() throws SQLException {
synchronized (database) {
if (redoBuffer.size() == 0) {
......
......@@ -31,6 +31,12 @@ import org.h2.util.Tool;
/**
* Executes the contents of a SQL script file against a database.
* This tool is usually used to create a database from script.
* It can also be used to analyze performance problems by running
* the tool using Java profiler settings such as:
* <pre>
* java -Xrunhprof:cpu=samples ...
* </pre>
*/
public class RunScript extends Tool {
......
......@@ -515,4 +515,5 @@ gives clunky cooperative paged conflicts ontology freely regards standards
placing refer informational unlocks memo unlimited unmounted keeping hints
hides heterogeneous construction rutema prepending rowscn overrides jconsole
mbean explicit directs leaves printing holds covariant redirector piped alarm
indicate timezone unmounting beep
\ No newline at end of file
indicate timezone unmounting beep ignoring gary tong extending respective
overloaded
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论