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

Documentation.

上级 23959cee
......@@ -1611,8 +1611,11 @@ LIKE 'Jo%'
| referentialConstraint }
| PRIMARY KEY [ HASH ] ( columnName [,...] )
","
Defines a constraint. The check condition must evaluate to true or to NULL (to
prevent NULL, use NOT NULL).
Defines a constraint.
The check condition must evaluate to TRUE, FALSE or NULL.
TRUE and NULL mean the operation is to be permitted,
and FALSE means the operation is to be rejected.
To prevent NULL in a column, use NOT NULL instead of a check constraint.
","
PRIMARY KEY(ID, NAME)
"
......
......@@ -18,7 +18,10 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>-
<ul><li>When adding a comment to a column that has a check constraint,
the database couldn't be re-opened.
</li><li>New system property h2.lobClientMaxSizeMemory to set the maximum size
of a LOB object to keep in memory on the client side when using the server mode.
</li></ul>
<h2>Version 1.2.142 (2010-08-31)</h2>
......
......@@ -224,9 +224,9 @@ public abstract class Expression {
}
/**
* Check whether this expression is a column and can store null values.
* Check whether this expression is a column and can store NULL.
*
* @return whether null values are allowed
* @return whether NULL is allowed
*/
public int getNullable() {
return Column.NULLABLE_UNKNOWN;
......
......@@ -376,7 +376,7 @@ public class TreeIndex extends BaseIndex {
public Cursor findFirstOrLast(Session session, boolean first) {
if (first) {
// TODO optimization: this loops through NULL values
// TODO optimization: this loops through NULL
Cursor cursor = find(session, null, null);
while (cursor.next()) {
SearchRow row = cursor.getSearchRow();
......
......@@ -459,7 +459,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* Checks is NULL values are sorted high (bigger than any non-null values).
* Checks if NULL is sorted high (bigger than anything that is not null).
*
* @return false by default; true if the system property h2.sortNullsHigh is
* set to true
......@@ -470,7 +470,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* Checks is NULL values are sorted low (smaller than any non-null values).
* Checks if NULL is sorted low (smaller than anything that is not null).
*
* @return true by default; false if the system property h2.sortNullsHigh is
* set to true
......@@ -481,8 +481,8 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* Checks is NULL values are sorted at the beginning (no matter if ASC or
* DESC is used).
* Checks if NULL is sorted at the beginning (no matter if ASC or DESC is
* used).
*
* @return false
*/
......@@ -492,8 +492,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* Checks is NULL values are sorted at the end (no matter if ASC or DESC is
* used).
* Checks if NULL is sorted at the end (no matter if ASC or DESC is used).
*
* @return false
*/
......
......@@ -140,9 +140,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
}
/**
* Returns whether the last column accessed was a null value.
* Returns whether the last column accessed was null.
*
* @return true if the last column accessed was a null value
* @return true if the last column accessed was null
*/
public boolean wasNull() throws SQLException {
try {
......
......@@ -22,10 +22,10 @@ import org.h2.message.DbException;
import org.h2.message.Trace;
import org.h2.message.TraceSystem;
import org.h2.store.fs.FileSystem;
import org.h2.util.StringUtils;
import org.h2.util.MathUtils;
import org.h2.util.NetUtils;
import org.h2.util.SortedProperties;
import org.h2.util.StringUtils;
import org.h2.value.Transfer;
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论