Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
ddc4c6fe
提交
ddc4c6fe
authored
12月 21, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Javadocs
上级
c205a5be
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
142 行增加
和
56 行删除
+142
-56
Driver.java
h2/src/main/org/h2/Driver.java
+12
-0
Parser.java
h2/src/main/org/h2/command/Parser.java
+1
-0
Session.java
h2/src/main/org/h2/engine/Session.java
+3
-2
SessionRemote.java
h2/src/main/org/h2/engine/SessionRemote.java
+2
-0
Index.java
h2/src/main/org/h2/index/Index.java
+1
-0
PageData.java
h2/src/main/org/h2/index/PageData.java
+1
-1
PageDataLeaf.java
h2/src/main/org/h2/index/PageDataLeaf.java
+1
-0
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+7
-0
JdbcDatabaseMetaData.java
h2/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
+27
-8
JdbcStatement.java
h2/src/main/org/h2/jdbc/JdbcStatement.java
+4
-0
TraceWriter.java
h2/src/main/org/h2/message/TraceWriter.java
+2
-0
Schema.java
h2/src/main/org/h2/schema/Schema.java
+3
-0
SimpleResultSet.java
h2/src/main/org/h2/tools/SimpleResultSet.java
+50
-40
BitField.java
h2/src/main/org/h2/util/BitField.java
+1
-0
DbDriverActivator.java
h2/src/main/org/h2/util/DbDriverActivator.java
+6
-2
StringUtils.java
h2/src/main/org/h2/util/StringUtils.java
+1
-0
TestDeadlock.java
h2/src/test/org/h2/test/db/TestDeadlock.java
+2
-0
TestAutoServer.java
h2/src/test/org/h2/test/server/TestAutoServer.java
+2
-0
Command.java
h2/src/test/org/h2/test/synth/sql/Command.java
+3
-0
Table.java
h2/src/test/org/h2/test/synth/sql/Table.java
+2
-0
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
Doclet.java
h2/src/tools/org/h2/build/doclet/Doclet.java
+10
-2
没有找到文件。
h2/src/main/org/h2/Driver.java
浏览文件 @
ddc4c6fe
...
...
@@ -39,8 +39,12 @@ public class Driver implements java.sql.Driver {
}
/**
* Open a database connection.
* This method should not be called by an application.
* Instead, the method DriverManager.getConnection should be used.
*
* @param url the database URL
* @param info the connection properties
* @return the new connection
*/
public
Connection
connect
(
String
url
,
Properties
info
)
throws
SQLException
{
...
...
@@ -58,8 +62,10 @@ public class Driver implements java.sql.Driver {
}
/**
* Check if the driver understands this URL.
* This method should not be called by an application.
*
* @param url the database URL
* @return if the driver understands the URL
*/
public
boolean
acceptsURL
(
String
url
)
{
...
...
@@ -67,6 +73,7 @@ public class Driver implements java.sql.Driver {
}
/**
* Get the major version number of the driver.
* This method should not be called by an application.
*
* @return the major version number
...
...
@@ -76,6 +83,7 @@ public class Driver implements java.sql.Driver {
}
/**
* Get the minor version number of the driver.
* This method should not be called by an application.
*
* @return the minor version number
...
...
@@ -85,8 +93,11 @@ public class Driver implements java.sql.Driver {
}
/**
* Get the list of supported properties.
* This method should not be called by an application.
*
* @param url the database URL
* @param info the connection properties
* @return a zero length array
*/
public
DriverPropertyInfo
[]
getPropertyInfo
(
String
url
,
Properties
info
)
{
...
...
@@ -94,6 +105,7 @@ public class Driver implements java.sql.Driver {
}
/**
* Check if this driver is compliant to the JDBC specification.
* This method should not be called by an application.
*
* @return true
...
...
h2/src/main/org/h2/command/Parser.java
浏览文件 @
ddc4c6fe
...
...
@@ -3074,6 +3074,7 @@ public class Parser {
* Checks if this string is a SQL keyword.
*
* @param s the token to check
* @param supportOffsetFetch if OFFSET and FETCH are keywords
* @return true if it is a keyword
*/
public
static
boolean
isKeyword
(
String
s
,
boolean
supportOffsetFetch
)
{
...
...
h2/src/main/org/h2/engine/Session.java
浏览文件 @
ddc4c6fe
...
...
@@ -268,11 +268,11 @@ public class Session implements SessionInterface {
index
.
removeChildrenAndResources
(
this
);
}
}
/**
* Get the local temporary constraint if one exists with that name, or
* null if not.
*
*
* @param name the constraint name
* @return the constraint, or null
*/
...
...
@@ -511,6 +511,7 @@ public class Session implements SessionInterface {
* Partially roll back the current transaction.
*
* @param index the position to which should be rolled back
* @param trimToSize if the list should be trimmed
*/
public
void
rollbackTo
(
int
index
,
boolean
trimToSize
)
throws
SQLException
{
while
(
undoLog
.
size
()
>
index
)
{
...
...
h2/src/main/org/h2/engine/SessionRemote.java
浏览文件 @
ddc4c6fe
...
...
@@ -406,6 +406,7 @@ public class SessionRemote implements SessionInterface, SessionFactory, DataHand
*
* @param e the exception (used for debugging)
* @param i the index of the server to remove
* @param count the retry count index
*/
public
void
removeServer
(
IOException
e
,
int
i
,
int
count
)
throws
SQLException
{
transferList
.
remove
(
i
);
...
...
@@ -426,6 +427,7 @@ public class SessionRemote implements SessionInterface, SessionFactory, DataHand
/**
* Automatically re-connect if necessary and if configured to do so.
*
* @param count the retry count index
* @return true if reconnected
*/
public
boolean
autoReconnect
(
int
count
)
throws
SQLException
{
...
...
h2/src/main/org/h2/index/Index.java
浏览文件 @
ddc4c6fe
...
...
@@ -190,6 +190,7 @@ public interface Index extends SchemaObject {
* allowed using the current compatibility mode for unique indexes. Note:
* NULL behavior is complicated in SQL.
*
* @param session the session
* @param newRow the row to check
* @return true if one of the columns is null and multiple nulls in unique
* indexes are allowed
...
...
h2/src/main/org/h2/index/PageData.java
浏览文件 @
ddc4c6fe
...
...
@@ -125,7 +125,6 @@ abstract class PageData extends Record {
/**
* Split the index page at the given point.
*
* @param session the session
* @param splitPoint the index where to split
* @return the new page that contains about half the entries
*/
...
...
@@ -185,6 +184,7 @@ abstract class PageData extends Record {
/**
* Get the row for the given key.
*
* @param session the session
* @param key the key
* @return the row
*/
...
...
h2/src/main/org/h2/index/PageDataLeaf.java
浏览文件 @
ddc4c6fe
...
...
@@ -85,6 +85,7 @@ class PageDataLeaf extends PageData {
* Add a row if possible. If it is possible this method returns 0, otherwise
* the split point. It is always possible to add one row.
*
* @param row the now to add
* @return the split point of this page, or 0 if no split is required
*/
int
addRow
(
Row
row
)
throws
SQLException
{
...
...
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
ddc4c6fe
...
...
@@ -878,6 +878,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Creates a new named savepoint.
*
* @param name the savepoint name
* @return the new savepoint
*/
//## Java 1.4 begin ##
...
...
@@ -900,6 +901,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Rolls back to a savepoint.
*
* @param savepoint the savepoint
*/
//## Java 1.4 begin ##
public
void
rollback
(
Savepoint
savepoint
)
throws
SQLException
{
...
...
@@ -916,6 +919,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Releases a savepoint.
*
* @param savepoint the savepoint to release
*/
//## Java 1.4 begin ##
public
void
releaseSavepoint
(
Savepoint
savepoint
)
throws
SQLException
{
...
...
@@ -1408,6 +1413,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Returns true if this connection is still valid.
*
* @param timeout the number of seconds to wait for the database to respond
* (ignored)
* @return true if the connection is valid.
*/
public
synchronized
boolean
isValid
(
int
timeout
)
{
...
...
h2/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
浏览文件 @
ddc4c6fe
...
...
@@ -1445,6 +1445,8 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether CONVERT is supported for one datatype to another.
*
* @param fromType the source SQL type
* @param toType the target SQL type
* @return true
*/
public
boolean
supportsConvert
(
int
fromType
,
int
toType
)
{
...
...
@@ -1983,6 +1985,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether a specific transaction isolation level is supported.
*
* @param level the transaction isolation level (Connection.TRANSACTION_*)
* @return true
*/
public
boolean
supportsTransactionIsolationLevel
(
int
level
)
{
...
...
@@ -2035,6 +2038,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* Returns whether a specific result set type is supported.
* ResultSet.TYPE_SCROLL_SENSITIVE is not supported.
*
* @param type the result set type
* @return true for all types except ResultSet.TYPE_FORWARD_ONLY
*/
public
boolean
supportsResultSetType
(
int
type
)
{
...
...
@@ -2046,6 +2050,8 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* Returns whether a specific result set concurrency is supported.
* ResultSet.TYPE_SCROLL_SENSITIVE is not supported.
*
* @param type the result set type
* @param concurrency the result set concurrency
* @return true if the type is not ResultSet.TYPE_SCROLL_SENSITIVE
*/
public
boolean
supportsResultSetConcurrency
(
int
type
,
int
concurrency
)
{
...
...
@@ -2058,6 +2064,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether own updates are visible.
*
* @param type the result set type
* @return true
*/
public
boolean
ownUpdatesAreVisible
(
int
type
)
{
...
...
@@ -2068,6 +2075,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether own deletes are visible.
*
* @param type the result set type
* @return false
*/
public
boolean
ownDeletesAreVisible
(
int
type
)
{
...
...
@@ -2078,6 +2086,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether own inserts are visible.
*
* @param type the result set type
* @return false
*/
public
boolean
ownInsertsAreVisible
(
int
type
)
{
...
...
@@ -2088,6 +2097,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether other updates are visible.
*
* @param type the result set type
* @return false
*/
public
boolean
othersUpdatesAreVisible
(
int
type
)
{
...
...
@@ -2098,6 +2108,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether other deletes are visible.
*
* @param type the result set type
* @return false
*/
public
boolean
othersDeletesAreVisible
(
int
type
)
{
...
...
@@ -2108,6 +2119,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether other inserts are visible.
*
* @param type the result set type
* @return false
*/
public
boolean
othersInsertsAreVisible
(
int
type
)
{
...
...
@@ -2118,6 +2130,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether updates are detected.
*
* @param type the result set type
* @return false
*/
public
boolean
updatesAreDetected
(
int
type
)
{
...
...
@@ -2128,6 +2141,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether deletes are detected.
*
* @param type the result set type
* @return false
*/
public
boolean
deletesAreDetected
(
int
type
)
{
...
...
@@ -2138,6 +2152,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/**
* Returns whether inserts are detected.
*
* @param type the result set type
* @return false
*/
public
boolean
insertsAreDetected
(
int
type
)
{
...
...
@@ -2522,16 +2537,20 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* Get the list of super tables of a table.
* This method currently returns an empty result set.
*
* Get the list of super tables of a table. This method currently returns an
* empty result set.
* <ul>
* <li>1 TABLE_CAT (String) table catalog
* <
/li><li>2 TABLE_SCHEM (String) table schema
* <
/li><li>3 TABLE_NAME (String) table name
* <
/li><li>4 SUPERTABLE_NAME (String) the name of the super table
* </
li></
ul>
* <li>1 TABLE_CAT (String) table catalog
</li>
* <
li>2 TABLE_SCHEM (String) table schema</li>
* <
li>3 TABLE_NAME (String) table name</li>
* <
li>4 SUPERTABLE_NAME (String) the name of the super table</li>
* </ul>
*
* @param catalog null (to get all objects) or the catalog name
* @param schemaPattern null (to get all objects) or a schema name (uppercase for
* unquoted names)
* @param tableNamePattern null (to get all objects) or a table name pattern
* (uppercase for unquoted names)
* @return an empty result set
*/
public
ResultSet
getSuperTables
(
String
catalog
,
String
schemaPattern
,
...
...
h2/src/main/org/h2/jdbc/JdbcStatement.java
浏览文件 @
ddc4c6fe
...
...
@@ -53,6 +53,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* If another result set exists for this statement, this will be closed
* (even if this statement fails).
*
* @param sql the SQL statement to execute
* @return the result set
*/
public
ResultSet
executeQuery
(
String
sql
)
throws
SQLException
{
...
...
@@ -135,6 +136,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* If auto commit is on, and the statement is not a select, this statement
* will be committed.
*
* @param sql the SQL statement to execute
* @return true if a result set is available, false if not
*/
public
boolean
execute
(
String
sql
)
throws
SQLException
{
...
...
@@ -569,6 +571,8 @@ public class JdbcStatement extends TraceObject implements Statement {
/**
* Adds a statement to the batch.
*
* @param sql the SQL statement
*/
public
void
addBatch
(
String
sql
)
throws
SQLException
{
try
{
...
...
h2/src/main/org/h2/message/TraceWriter.java
浏览文件 @
ddc4c6fe
...
...
@@ -16,6 +16,8 @@ interface TraceWriter {
/**
* Set the name of the database or trace object.
*
* @param name the new name
*/
void
setName
(
String
name
);
...
...
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
ddc4c6fe
...
...
@@ -343,6 +343,7 @@ public class Schema extends DbObjectBase {
/**
* Create a unique index name.
*
* @param session the session
* @param table the indexed table
* @param prefix the index name prefix
* @return the unique name
...
...
@@ -471,6 +472,7 @@ public class Schema extends DbObjectBase {
* @param columns the column list
* @param persistent if the table should be persistent
* @param clustered if a clustered table should be created
* @param headPos the position (page number) of the head
* @return the created {@link TableData} object
*/
public
TableData
createTable
(
String
tableName
,
int
id
,
ObjectArray
columns
,
boolean
persistent
,
boolean
clustered
,
int
headPos
)
...
...
@@ -487,6 +489,7 @@ public class Schema extends DbObjectBase {
* @param url the database URL
* @param user the user name
* @param password the password
* @param originalSchema the schema name of the target table
* @param originalTable the table name of the target table
* @param emitUpdates if updates should be emitted instead of delete/insert
* @param force create the object even if the database can not be accessed
...
...
h2/src/main/org/h2/tools/SimpleResultSet.java
浏览文件 @
ddc4c6fe
...
...
@@ -207,7 +207,6 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
* @param sqlType the value returned in getColumnType(..) (ignored internally)
* @param precision the precision
* @param scale the scale
* @throws SQLException
*/
public
void
addColumn
(
String
name
,
int
sqlType
,
int
precision
,
int
scale
)
throws
SQLException
{
if
(
rows
!=
null
&&
rows
.
size
()
>
0
)
{
...
...
@@ -228,7 +227,6 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
* Add a new row to the result set.
*
* @param row the row as an array of objects
* @throws SQLException
*/
public
void
addRow
(
Object
[]
row
)
throws
SQLException
{
if
(
rows
==
null
)
{
...
...
@@ -300,7 +298,6 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
* Moves the cursor to the next row of the result set.
*
* @return true if successful, false if there are no more rows
* @throws SQLException
*/
public
boolean
next
()
throws
SQLException
{
if
(
source
!=
null
)
{
...
...
@@ -323,8 +320,6 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Moves the current position to before the first row, that means resets the
* result set.
*
* @throws SQLException is this method is not supported
*/
public
void
beforeFirst
()
throws
SQLException
{
rowId
=
-
1
;
...
...
@@ -345,8 +340,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a byte.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
byte
getByte
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -359,8 +354,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as an double.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
double
getDouble
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -373,8 +368,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a float.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
float
getFloat
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -387,8 +382,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as an int.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
int
getInt
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -401,8 +396,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a long.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
long
getLong
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -415,8 +410,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a short.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
short
getShort
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -429,8 +424,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a boolean.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
boolean
getBoolean
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -443,8 +438,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a byte array.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
byte
[]
getBytes
(
int
columnIndex
)
throws
SQLException
{
return
(
byte
[])
get
(
columnIndex
);
...
...
@@ -453,8 +448,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as an Object.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
Object
getObject
(
int
columnIndex
)
throws
SQLException
{
return
get
(
columnIndex
);
...
...
@@ -463,8 +458,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a String.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
String
getString
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -474,8 +469,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a byte.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
byte
getByte
(
String
columnName
)
throws
SQLException
{
return
getByte
(
findColumn
(
columnName
));
...
...
@@ -484,8 +479,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a double.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
double
getDouble
(
String
columnName
)
throws
SQLException
{
return
getDouble
(
findColumn
(
columnName
));
...
...
@@ -494,8 +489,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a float.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
float
getFloat
(
String
columnName
)
throws
SQLException
{
return
getFloat
(
findColumn
(
columnName
));
...
...
@@ -522,8 +517,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as an int.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
int
getInt
(
String
columnName
)
throws
SQLException
{
return
getInt
(
findColumn
(
columnName
));
...
...
@@ -532,8 +527,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a long.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
long
getLong
(
String
columnName
)
throws
SQLException
{
return
getLong
(
findColumn
(
columnName
));
...
...
@@ -542,8 +537,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a short.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
short
getShort
(
String
columnName
)
throws
SQLException
{
return
getShort
(
findColumn
(
columnName
));
...
...
@@ -552,8 +547,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a boolean.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
boolean
getBoolean
(
String
columnName
)
throws
SQLException
{
return
getBoolean
(
findColumn
(
columnName
));
...
...
@@ -562,8 +557,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a byte array.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
byte
[]
getBytes
(
String
columnName
)
throws
SQLException
{
return
getBytes
(
findColumn
(
columnName
));
...
...
@@ -572,8 +567,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a java.math.BigDecimal.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
BigDecimal
getBigDecimal
(
int
columnIndex
)
throws
SQLException
{
Object
o
=
get
(
columnIndex
);
...
...
@@ -586,8 +581,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as an java.sql.Date.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
Date
getDate
(
int
columnIndex
)
throws
SQLException
{
return
(
Date
)
get
(
columnIndex
);
...
...
@@ -623,8 +618,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as an java.sql.Time.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
Time
getTime
(
int
columnIndex
)
throws
SQLException
{
return
(
Time
)
get
(
columnIndex
);
...
...
@@ -633,8 +628,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as an java.sql.Timestamp.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
Timestamp
getTimestamp
(
int
columnIndex
)
throws
SQLException
{
return
(
Timestamp
)
get
(
columnIndex
);
...
...
@@ -643,8 +638,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a java.sql.Array.
*
* @param columnIndex (1,2,...)
* @return the value
* @throws SQLException
*/
public
Array
getArray
(
int
columnIndex
)
throws
SQLException
{
return
new
SimpleArray
((
Object
[])
get
(
columnIndex
));
...
...
@@ -653,8 +648,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as an Object.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
Object
getObject
(
String
columnName
)
throws
SQLException
{
return
getObject
(
findColumn
(
columnName
));
...
...
@@ -663,8 +658,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a String.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
String
getString
(
String
columnName
)
throws
SQLException
{
return
getString
(
findColumn
(
columnName
));
...
...
@@ -673,8 +668,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a java.math.BigDecimal.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
BigDecimal
getBigDecimal
(
String
columnName
)
throws
SQLException
{
return
getBigDecimal
(
findColumn
(
columnName
));
...
...
@@ -683,8 +678,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a java.sql.Date.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
Date
getDate
(
String
columnName
)
throws
SQLException
{
return
getDate
(
findColumn
(
columnName
));
...
...
@@ -693,8 +688,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a java.sql.Time.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
Time
getTime
(
String
columnName
)
throws
SQLException
{
return
getTime
(
findColumn
(
columnName
));
...
...
@@ -703,8 +698,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a java.sql.Timestamp.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
Timestamp
getTimestamp
(
String
columnName
)
throws
SQLException
{
return
getTimestamp
(
findColumn
(
columnName
));
...
...
@@ -713,8 +708,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the value as a java.sql.Array.
*
* @param columnName the name of the column label
* @return the value
* @throws SQLException
*/
public
Array
getArray
(
String
columnName
)
throws
SQLException
{
return
getArray
(
findColumn
(
columnName
));
...
...
@@ -735,6 +730,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns 15.
*
* @param columnIndex (1,2,...)
* @return 15
*/
public
int
getColumnDisplaySize
(
int
columnIndex
)
{
...
...
@@ -744,8 +740,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the SQL type.
*
* @param columnIndex (1,2,...)
* @return the SQL type
* @throws SQLException
*/
public
int
getColumnType
(
int
columnIndex
)
throws
SQLException
{
return
getColumn
(
columnIndex
-
1
).
sqlType
;
...
...
@@ -754,8 +750,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the precision.
*
* @param columnIndex (1,2,...)
* @return the precision
* @throws SQLException
*/
public
int
getPrecision
(
int
columnIndex
)
throws
SQLException
{
return
getColumn
(
columnIndex
-
1
).
precision
;
...
...
@@ -764,8 +760,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the scale.
*
* @param columnIndex (1,2,...)
* @return the scale
* @throws SQLException
*/
public
int
getScale
(
int
columnIndex
)
throws
SQLException
{
return
getColumn
(
columnIndex
-
1
).
scale
;
...
...
@@ -774,6 +770,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns ResultSetMetaData.columnNullableUnknown.
*
* @param columnIndex (1,2,...)
* @return columnNullableUnknown
*/
public
int
isNullable
(
int
columnIndex
)
{
...
...
@@ -783,6 +780,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns false.
*
* @param columnIndex (1,2,...)
* @return false
*/
public
boolean
isAutoIncrement
(
int
columnIndex
)
{
...
...
@@ -792,6 +790,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns true.
*
* @param columnIndex (1,2,...)
* @return true
*/
public
boolean
isCaseSensitive
(
int
columnIndex
)
{
...
...
@@ -801,6 +800,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns false.
*
* @param columnIndex (1,2,...)
* @return false
*/
public
boolean
isCurrency
(
int
columnIndex
)
{
...
...
@@ -810,6 +810,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns false.
*
* @param columnIndex (1,2,...)
* @return false
*/
public
boolean
isDefinitelyWritable
(
int
columnIndex
)
{
...
...
@@ -819,6 +820,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns true.
*
* @param columnIndex (1,2,...)
* @return true
*/
public
boolean
isReadOnly
(
int
columnIndex
)
{
...
...
@@ -828,6 +830,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns true.
*
* @param columnIndex (1,2,...)
* @return true
*/
public
boolean
isSearchable
(
int
columnIndex
)
{
...
...
@@ -837,6 +840,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns true.
*
* @param columnIndex (1,2,...)
* @return true
*/
public
boolean
isSigned
(
int
columnIndex
)
{
...
...
@@ -846,6 +850,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns false.
*
* @param columnIndex (1,2,...)
* @return false
*/
public
boolean
isWritable
(
int
columnIndex
)
{
...
...
@@ -855,6 +860,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns null.
*
* @param columnIndex (1,2,...)
* @return null
*/
public
String
getCatalogName
(
int
columnIndex
)
{
...
...
@@ -864,6 +870,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns null.
*
* @param columnIndex (1,2,...)
* @return null
*/
public
String
getColumnClassName
(
int
columnIndex
)
{
...
...
@@ -873,8 +880,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the column name.
*
* @param columnIndex (1,2,...)
* @return the column name
* @throws SQLException
*/
public
String
getColumnLabel
(
int
columnIndex
)
throws
SQLException
{
return
getColumn
(
columnIndex
-
1
).
name
;
...
...
@@ -883,8 +890,8 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns the column name.
*
* @param columnIndex (1,2,...)
* @return the column name
* @throws SQLException
*/
public
String
getColumnName
(
int
columnIndex
)
throws
SQLException
{
return
getColumnLabel
(
columnIndex
);
...
...
@@ -893,6 +900,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns null.
*
* @param columnIndex (1,2,...)
* @return null
*/
public
String
getColumnTypeName
(
int
columnIndex
)
{
...
...
@@ -902,6 +910,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns null.
*
* @param columnIndex (1,2,...)
* @return null
*/
public
String
getSchemaName
(
int
columnIndex
)
{
...
...
@@ -911,6 +920,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* Returns null.
*
* @param columnIndex (1,2,...)
* @return null
*/
public
String
getTableName
(
int
columnIndex
)
{
...
...
h2/src/main/org/h2/util/BitField.java
浏览文件 @
ddc4c6fe
...
...
@@ -187,6 +187,7 @@ public class BitField {
*
* @param start the index of the first bit to enable or disable
* @param len the number of bits to enable or disable
* @param value the new value
*/
public
void
setRange
(
int
start
,
int
len
,
boolean
value
)
{
// go backwards so that OutOfMemory happens
...
...
h2/src/main/org/h2/util/DbDriverActivator.java
浏览文件 @
ddc4c6fe
...
...
@@ -16,14 +16,18 @@ import org.osgi.framework.BundleContext;
public
class
DbDriverActivator
implements
BundleActivator
{
/**
* Start the bundle. This will load the database driver.
* Start the bundle. This will load and register the database driver.
*
* @param bundleContext the bundle context
*/
public
void
start
(
BundleContext
bundleContext
)
{
org
.
h2
.
Driver
.
load
();
}
/**
* Stop the bundle. This will unload the database driver.
* Stop the bundle. This will deregister the database driver.
*
* @param bundleContext the bundle context
*/
public
void
stop
(
BundleContext
bundleContext
)
{
org
.
h2
.
Driver
.
unload
();
...
...
h2/src/main/org/h2/util/StringUtils.java
浏览文件 @
ddc4c6fe
...
...
@@ -775,6 +775,7 @@ public class StringUtils {
/**
* Check if a String is null or empty (the length is null).
*
* @param s the string to check
* @return true if it is null or empty
*/
public
static
boolean
isNullOrEmpty
(
String
s
)
{
...
...
h2/src/test/org/h2/test/db/TestDeadlock.java
浏览文件 @
ddc4c6fe
...
...
@@ -92,6 +92,8 @@ public class TestDeadlock extends TestBase {
/**
* Add the exception to the list of exceptions.
*
* @param e the exception
*/
void
catchDeadlock
(
SQLException
e
)
{
if
(
lastException
!=
null
)
{
...
...
h2/src/test/org/h2/test/server/TestAutoServer.java
浏览文件 @
ddc4c6fe
...
...
@@ -76,6 +76,8 @@ public class TestAutoServer extends TestBase {
/**
* This method is called via reflection from the database.
*
* @param exitValue the exit value
*/
public
static
void
halt
(
int
exitValue
)
{
Runtime
.
getRuntime
().
halt
(
exitValue
);
...
...
h2/src/test/org/h2/test/synth/sql/Command.java
浏览文件 @
ddc4c6fe
...
...
@@ -130,6 +130,7 @@ class Command {
* Create a create table command.
*
* @param config the configuration
* @param table the table
* @return the command
*/
static
Command
getCreateTable
(
TestSynth
config
,
Table
table
)
{
...
...
@@ -140,6 +141,7 @@ class Command {
* Create a create index command.
*
* @param config the configuration
* @param index the index
* @return the command
*/
static
Command
getCreateIndex
(
TestSynth
config
,
Index
index
)
{
...
...
@@ -150,6 +152,7 @@ class Command {
* Create a random select command.
*
* @param config the configuration
* @param table the table
* @return the command
*/
static
Command
getRandomSelect
(
TestSynth
config
,
Table
table
)
{
...
...
h2/src/test/org/h2/test/synth/sql/Table.java
浏览文件 @
ddc4c6fe
...
...
@@ -135,6 +135,8 @@ class Table {
/**
* Get the INSERT statement for this table.
*
* @param c the column list
* @param v the value list
* @return the SQL statement
*/
String
getInsertSQL
(
Column
[]
c
,
Value
[]
v
)
{
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
ddc4c6fe
...
...
@@ -575,4 +575,4 @@ bleyl donald conservative offsets diabetes ansorg allocating osmond gluco
joachim mysqladmin sudo mysqld indicator wire ring relates expedites
approximated approximation dvan dsn dobysoft ebean syswow tmueller dbbench
connecturl problematic transformation lazy querydsl squill empire liq fle
xive evolving mssqlserver
xive evolving mssqlserver
eric respond faulhaber fixing
h2/src/tools/org/h2/build/doclet/Doclet.java
浏览文件 @
ddc4c6fe
...
...
@@ -226,7 +226,17 @@ public class Doclet {
boolean
hasComment
=
method
.
commentText
()
!=
null
&&
method
.
commentText
().
trim
().
length
()
!=
0
;
writer
.
println
(
formatText
(
method
.
commentText
()));
ParamTag
[]
paramTags
=
method
.
paramTags
();
ThrowsTag
[]
throwsTags
=
method
.
throwsTags
();
boolean
hasThrowsTag
=
throwsTags
!=
null
&&
throwsTags
.
length
>
0
;
boolean
space
=
false
;
if
(
paramTags
.
length
!=
params
.
length
)
{
if
(
hasComment
&&
!
method
.
commentText
().
startsWith
(
"["
)
&&
!
hasThrowsTag
)
{
// [Not supported] and such are not problematic
// also not problematic are methods that always throw an exception
addError
(
"Undocumented parameter(s) ("
+
clazz
.
name
()
+
".java:"
+
method
.
position
().
line
()
+
") "
+
name
+
" documented: "
+
paramTags
.
length
+
" params: "
+
params
.
length
);
}
}
for
(
int
j
=
0
;
j
<
paramTags
.
length
;
j
++)
{
if
(!
space
)
{
writer
.
println
(
"<br /><br />"
);
...
...
@@ -245,8 +255,6 @@ public class Doclet {
writer
.
println
(
"<div class=\"item\">"
+
p
+
"</div>"
);
}
Tag
[]
returnTags
=
method
.
tags
(
"return"
);
ThrowsTag
[]
throwsTags
=
method
.
throwsTags
();
boolean
hasThrowsTag
=
throwsTags
!=
null
&&
throwsTags
.
length
>
0
;
if
(
returnTags
!=
null
&&
returnTags
.
length
>
0
)
{
if
(!
space
)
{
writer
.
println
(
"<br /><br />"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论