Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
93c4c62d
提交
93c4c62d
authored
4月 05, 2011
作者:
noelgrandin@gmail.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix some javadoc @throws comments
上级
21d04c85
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
40 行增加
和
38 行删除
+40
-38
Command.java
h2/src/main/org/h2/command/Command.java
+3
-3
Prepared.java
h2/src/main/org/h2/command/Prepared.java
+4
-4
Database.java
h2/src/main/org/h2/engine/Database.java
+3
-3
DbObject.java
h2/src/main/org/h2/engine/DbObject.java
+2
-1
Engine.java
h2/src/main/org/h2/engine/Engine.java
+1
-1
Session.java
h2/src/main/org/h2/engine/Session.java
+4
-4
SessionRemote.java
h2/src/main/org/h2/engine/SessionRemote.java
+2
-2
User.java
h2/src/main/org/h2/engine/User.java
+3
-3
Function.java
h2/src/main/org/h2/expression/Function.java
+2
-2
BaseIndex.java
h2/src/main/org/h2/index/BaseIndex.java
+1
-1
Schema.java
h2/src/main/org/h2/schema/Schema.java
+5
-5
DataHandler.java
h2/src/main/org/h2/store/DataHandler.java
+4
-3
FileLock.java
h2/src/main/org/h2/store/FileLock.java
+2
-2
Table.java
h2/src/main/org/h2/table/Table.java
+2
-2
Utils.java
h2/src/main/org/h2/util/Utils.java
+1
-1
Value.java
h2/src/main/org/h2/value/Value.java
+1
-1
没有找到文件。
h2/src/main/org/h2/command/Command.java
浏览文件 @
93c4c62d
...
...
@@ -93,7 +93,7 @@ public abstract class Command implements CommandInterface {
* Execute an updating statement, if this is possible.
*
* @return the update count
* @throws
SQL
Exception if the command is not an updating statement
* @throws
Db
Exception if the command is not an updating statement
*/
public
int
update
()
{
throw
DbException
.
get
(
ErrorCode
.
METHOD_NOT_ALLOWED_FOR_QUERY
);
...
...
@@ -104,7 +104,7 @@ public abstract class Command implements CommandInterface {
*
* @param maxrows the maximum number of rows returned
* @return the local result set
* @throws
SQL
Exception if the command is not a query
* @throws
Db
Exception if the command is not a query
*/
public
ResultInterface
query
(
int
maxrows
)
{
throw
DbException
.
get
(
ErrorCode
.
METHOD_ONLY_ALLOWED_FOR_QUERY
);
...
...
@@ -126,7 +126,7 @@ public abstract class Command implements CommandInterface {
/**
* Check if this command has been canceled, and throw an exception if yes.
*
* @throws
SQL
Exception if the statement has been canceled
* @throws
Db
Exception if the statement has been canceled
*/
protected
void
checkCanceled
()
{
if
(
cancel
)
{
...
...
h2/src/main/org/h2/command/Prepared.java
浏览文件 @
93c4c62d
...
...
@@ -153,7 +153,7 @@ public abstract class Prepared {
/**
* Check if all parameters have been set.
*
* @throws
SQL
Exception if any parameter has not been set
* @throws
Db
Exception if any parameter has not been set
*/
protected
void
checkParameters
()
{
if
(
parameters
!=
null
)
{
...
...
@@ -195,7 +195,7 @@ public abstract class Prepared {
* Execute the statement.
*
* @return the update count
* @throws
SQL
Exception if it is a query
* @throws
Db
Exception if it is a query
*/
public
int
update
()
{
throw
DbException
.
get
(
ErrorCode
.
METHOD_NOT_ALLOWED_FOR_QUERY
);
...
...
@@ -206,7 +206,7 @@ public abstract class Prepared {
*
* @param maxrows the maximum number of rows to return
* @return the result set
* @throws
SQL
Exception if it is not a query
* @throws
Db
Exception if it is not a query
*/
public
ResultInterface
query
(
int
maxrows
)
{
throw
DbException
.
get
(
ErrorCode
.
METHOD_ONLY_ALLOWED_FOR_QUERY
);
...
...
@@ -269,7 +269,7 @@ public abstract class Prepared {
/**
* Check if this statement was canceled.
*
* @throws
SQL
Exception if it was canceled
* @throws
Db
Exception if it was canceled
*/
public
void
checkCanceled
()
{
session
.
checkCanceled
();
...
...
h2/src/main/org/h2/engine/Database.java
浏览文件 @
93c4c62d
...
...
@@ -894,7 +894,7 @@ public class Database implements DataHandler {
*
* @param name the user name
* @return the user
* @throws
SQL
Exception if the user does not exist
* @throws
Db
Exception if the user does not exist
*/
public
User
getUser
(
String
name
)
{
User
user
=
findUser
(
name
);
...
...
@@ -909,7 +909,7 @@ public class Database implements DataHandler {
*
* @param user the user
* @return the session
* @throws
SQL
Exception if the database is in exclusive mode
* @throws
Db
Exception if the database is in exclusive mode
*/
synchronized
Session
createSession
(
User
user
)
{
if
(
exclusiveSession
!=
null
)
{
...
...
@@ -1433,7 +1433,7 @@ public class Database implements DataHandler {
*
* @param schemaName the name of the schema
* @return the schema
* @throws
SQL
Exception no schema with that name exists
* @throws
Db
Exception no schema with that name exists
*/
public
Schema
getSchema
(
String
schemaName
)
{
Schema
schema
=
findSchema
(
schemaName
);
...
...
h2/src/main/org/h2/engine/DbObject.java
浏览文件 @
93c4c62d
...
...
@@ -7,6 +7,7 @@
package
org
.
h2
.
engine
;
import
java.util.ArrayList
;
import
org.h2.message.DbException
;
import
org.h2.table.Table
;
/**
...
...
@@ -167,7 +168,7 @@ public interface DbObject {
/**
* Check if renaming is allowed. Does nothing when allowed.
*
* @throws
SQL
Exception if renaming is not allowed
* @throws
Db
Exception if renaming is not allowed
*/
void
checkRename
();
...
...
h2/src/main/org/h2/engine/Engine.java
浏览文件 @
93c4c62d
...
...
@@ -255,7 +255,7 @@ public class Engine implements SessionFactory {
* stack trace to see if the user name was wrong or the password.
*
* @param correct if the user name or the password was correct
* @throws
SQL
Exception the exception 'wrong user or password'
* @throws
Db
Exception the exception 'wrong user or password'
*/
private
void
validateUserAndPassword
(
boolean
correct
)
{
int
min
=
SysProperties
.
DELAY_WRONG_PASSWORD_MIN
;
...
...
h2/src/main/org/h2/engine/Session.java
浏览文件 @
93c4c62d
...
...
@@ -205,7 +205,7 @@ public class Session extends SessionWithState {
* Add a local temporary table to this session.
*
* @param table the table to add
* @throws
SQL
Exception if a table with this name already exists
* @throws
Db
Exception if a table with this name already exists
*/
public
void
addLocalTempTable
(
Table
table
)
{
if
(
localTempTables
==
null
)
{
...
...
@@ -256,7 +256,7 @@ public class Session extends SessionWithState {
* Add a local temporary index to this session.
*
* @param index the index to add
* @throws
SQL
Exception if a index with this name already exists
* @throws
Db
Exception if a index with this name already exists
*/
public
void
addLocalTempTableIndex
(
Index
index
)
{
if
(
localTempTableIndexes
==
null
)
{
...
...
@@ -313,7 +313,7 @@ public class Session extends SessionWithState {
* Add a local temporary constraint to this session.
*
* @param constraint the constraint to add
* @throws
SQL
Exception if a constraint with the same name already exists
* @throws
Db
Exception if a constraint with the same name already exists
*/
public
void
addLocalTempTableConstraint
(
Constraint
constraint
)
{
if
(
localTempTableConstraints
==
null
)
{
...
...
@@ -880,7 +880,7 @@ public class Session extends SessionWithState {
* Check if the current transaction is canceled by calling
* Statement.cancel() or because a session timeout was set and expired.
*
* @throws
SQL
Exception if the transaction is canceled
* @throws
Db
Exception if the transaction is canceled
*/
public
void
checkCanceled
()
{
throttle
();
...
...
h2/src/main/org/h2/engine/SessionRemote.java
浏览文件 @
93c4c62d
...
...
@@ -473,7 +473,7 @@ public class SessionRemote extends SessionWithState implements DataHandler {
/**
* Check if this session is closed and throws an exception if so.
*
* @throws
SQL
Exception if the session is closed
* @throws
Db
Exception if the session is closed
*/
public
void
checkClosed
()
{
if
(
isClosed
())
{
...
...
@@ -522,7 +522,7 @@ public class SessionRemote extends SessionWithState implements DataHandler {
* the server and throws any exception the server sent.
*
* @param transfer the transfer object
* @throws
SQL
Exception if the server sent an exception
* @throws
Db
Exception if the server sent an exception
* @throws IOException if there is a communication problem between client
* and server
*/
...
...
h2/src/main/org/h2/engine/User.java
浏览文件 @
93c4c62d
...
...
@@ -91,7 +91,7 @@ public class User extends RightOwner {
*
* @param table the database object
* @param rightMask the rights required
* @throws
SQL
Exception if this user does not have the required rights
* @throws
Db
Exception if this user does not have the required rights
*/
public
void
checkRight
(
Table
table
,
int
rightMask
)
{
if
(!
hasRight
(
table
,
rightMask
))
{
...
...
@@ -192,7 +192,7 @@ public class User extends RightOwner {
* Check if this user has admin rights. An exception is thrown if he does
* not have them.
*
* @throws
SQL
Exception if this user is not an admin
* @throws
Db
Exception if this user is not an admin
*/
public
void
checkAdmin
()
{
if
(!
admin
)
{
...
...
@@ -240,7 +240,7 @@ public class User extends RightOwner {
* Check that this user does not own any schema. An exception is thrown if he
* owns one or more schemas.
*
* @throws
SQL
Exception if this user owns a schema
* @throws
Db
Exception if this user owns a schema
*/
public
void
checkOwnsNoSchemas
()
{
for
(
Schema
s
:
database
.
getAllSchemas
())
{
...
...
h2/src/main/org/h2/expression/Function.java
浏览文件 @
93c4c62d
...
...
@@ -1546,7 +1546,7 @@ public class Function extends Expression implements FunctionCall {
* Check if the parameter count is correct.
*
* @param len the number of parameters set
* @throws
SQL
Exception if the parameter count is incorrect
* @throws
Db
Exception if the parameter count is incorrect
*/
protected
void
checkParameterCount
(
int
len
)
{
int
min
=
0
,
max
=
Integer
.
MAX_VALUE
;
...
...
@@ -1612,7 +1612,7 @@ public class Function extends Expression implements FunctionCall {
* This method is called after all the parameters have been set.
* It checks if the parameter count is correct.
*
* @throws
SQL
Exception if the parameter count is incorrect.
* @throws
Db
Exception if the parameter count is incorrect.
*/
public
void
doneWithParameters
()
{
if
(
info
.
parameterCount
==
VAR_ARGS
)
{
...
...
h2/src/main/org/h2/index/BaseIndex.java
浏览文件 @
93c4c62d
...
...
@@ -107,7 +107,7 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
* @param higherThan the lower limit (excluding)
* @param last the last row, or null for no limit
* @return the cursor
* @throws
SQL
Exception
* @throws
Db
Exception
*/
public
Cursor
findNext
(
Session
session
,
SearchRow
higherThan
,
SearchRow
last
)
{
throw
DbException
.
throwInternalError
();
...
...
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
93c4c62d
...
...
@@ -394,7 +394,7 @@ public class Schema extends DbObjectBase {
* @param session the session
* @param name the table or view name
* @return the table or view
* @throws
SQL
Exception if no such object exists
* @throws
Db
Exception if no such object exists
*/
public
Table
getTableOrView
(
Session
session
,
String
name
)
{
Table
table
=
tablesAndViews
.
get
(
name
);
...
...
@@ -414,7 +414,7 @@ public class Schema extends DbObjectBase {
*
* @param name the index name
* @return the index
* @throws
SQL
Exception if no such object exists
* @throws
Db
Exception if no such object exists
*/
public
Index
getIndex
(
String
name
)
{
Index
index
=
indexes
.
get
(
name
);
...
...
@@ -429,7 +429,7 @@ public class Schema extends DbObjectBase {
*
* @param name the constraint name
* @return the constraint
* @throws
SQL
Exception if no such object exists
* @throws
Db
Exception if no such object exists
*/
public
Constraint
getConstraint
(
String
name
)
{
Constraint
constraint
=
constraints
.
get
(
name
);
...
...
@@ -444,7 +444,7 @@ public class Schema extends DbObjectBase {
*
* @param constantName the constant name
* @return the constant
* @throws
SQL
Exception if no such object exists
* @throws
Db
Exception if no such object exists
*/
public
Constant
getConstant
(
String
constantName
)
{
Constant
constant
=
constants
.
get
(
constantName
);
...
...
@@ -459,7 +459,7 @@ public class Schema extends DbObjectBase {
*
* @param sequenceName the sequence name
* @return the sequence
* @throws
SQL
Exception if no such object exists
* @throws
Db
Exception if no such object exists
*/
public
Sequence
getSequence
(
String
sequenceName
)
{
Sequence
sequence
=
sequences
.
get
(
sequenceName
);
...
...
h2/src/main/org/h2/store/DataHandler.java
浏览文件 @
93c4c62d
...
...
@@ -7,6 +7,7 @@
package
org
.
h2
.
store
;
import
java.sql.Connection
;
import
org.h2.message.DbException
;
import
org.h2.util.SmallLRUCache
;
import
org.h2.util.TempFileDeleter
;
...
...
@@ -37,14 +38,14 @@ public interface DataHandler {
* Check if the simulated power failure occurred.
* This call will decrement the countdown.
*
* @throws
SQL
Exception if the simulated power failure occurred
* @throws
Db
Exception if the simulated power failure occurred
*/
void
checkPowerOff
();
/**
* Check if writing is allowed.
*
* @throws
SQL
Exception if it is not allowed
* @throws
Db
Exception if it is not allowed
*/
void
checkWritingAllowed
();
...
...
@@ -52,7 +53,7 @@ public interface DataHandler {
* Free up disk space if possible.
* This method is called if more space is needed.
*
* @throws
SQL
Exception if no more space could be freed
* @throws
Db
Exception if no more space could be freed
*/
void
freeUpDiskSpace
();
...
...
h2/src/main/org/h2/store/FileLock.java
浏览文件 @
93c4c62d
...
...
@@ -121,7 +121,7 @@ public class FileLock implements Runnable {
* Lock the file if possible. A file may only be locked once.
*
* @param fileLockMethod the file locking method to use
* @throws
SQL
Exception if locking was not successful
* @throws
Db
Exception if locking was not successful
*/
public
synchronized
void
lock
(
int
fileLockMethod
)
{
this
.
fs
=
FileSystem
.
getInstance
(
fileName
);
...
...
@@ -461,7 +461,7 @@ public class FileLock implements Runnable {
*
* @param method the method name
* @return the method type
* @throws
SQL
Exception if the method name is unknown
* @throws
Db
Exception if the method name is unknown
*/
public
static
int
getFileLockMethod
(
String
method
)
{
if
(
method
==
null
||
method
.
equalsIgnoreCase
(
"FILE"
))
{
...
...
h2/src/main/org/h2/table/Table.java
浏览文件 @
93c4c62d
...
...
@@ -479,7 +479,7 @@ public abstract class Table extends SchemaObjectBase {
*
* @param session the session
* @param col the column
* @throws
SQL
Exception if the column is referenced by multi-column
* @throws
Db
Exception if the column is referenced by multi-column
* constraints or indexes
*/
public
void
dropSingleColumnConstraintsAndIndexes
(
Session
session
,
Column
col
)
{
...
...
@@ -577,7 +577,7 @@ public abstract class Table extends SchemaObjectBase {
*
* @param columnName the column name
* @return the column
* @throws
SQL
Exception if the column was not found
* @throws
Db
Exception if the column was not found
*/
public
Column
getColumn
(
String
columnName
)
{
Column
column
=
columnMap
.
get
(
columnName
);
...
...
h2/src/main/org/h2/util/Utils.java
浏览文件 @
93c4c62d
...
...
@@ -263,7 +263,7 @@ public class Utils {
*
* @param data the byte array
* @return the object
* @throws
SQLException
* @throws
DbException if serialization fails
*/
public
static
Object
deserialize
(
byte
[]
data
)
{
try
{
...
...
h2/src/main/org/h2/value/Value.java
浏览文件 @
93c4c62d
...
...
@@ -1041,7 +1041,7 @@ public abstract class Value {
*
* @param op the operation
* @return never returns normally
* @throws the exception
* @throws
DbException
the exception
*/
protected
DbException
throwUnsupportedExceptionForType
(
String
op
)
{
throw
DbException
.
getUnsupportedException
(
DataType
.
getDataType
(
getType
()).
name
+
" "
+
op
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论