Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
723d005e
提交
723d005e
authored
3月 29, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improved error message for unsupported features.
上级
3bd2d5c0
全部展开
显示空白字符变更
内嵌
并排
正在显示
49 个修改的文件
包含
315 行增加
和
298 行删除
+315
-298
changelog.html
h2/src/docsrc/html/changelog.html
+6
-2
_messages_en.properties
h2/src/docsrc/textbase/_messages_en.properties
+1
-1
AlterTableRename.java
h2/src/main/org/h2/command/ddl/AlterTableRename.java
+1
-1
ErrorCode.java
h2/src/main/org/h2/constant/ErrorCode.java
+2
-2
FunctionAlias.java
h2/src/main/org/h2/engine/FunctionAlias.java
+1
-1
SessionRemote.java
h2/src/main/org/h2/engine/SessionRemote.java
+2
-2
Setting.java
h2/src/main/org/h2/engine/Setting.java
+1
-1
UserAggregate.java
h2/src/main/org/h2/engine/UserAggregate.java
+1
-1
FunctionIndex.java
h2/src/main/org/h2/index/FunctionIndex.java
+7
-7
HashIndex.java
h2/src/main/org/h2/index/HashIndex.java
+1
-1
LinkedIndex.java
h2/src/main/org/h2/index/LinkedIndex.java
+2
-2
MetaIndex.java
h2/src/main/org/h2/index/MetaIndex.java
+6
-6
PageBtreeIndex.java
h2/src/main/org/h2/index/PageBtreeIndex.java
+1
-1
PageScanIndex.java
h2/src/main/org/h2/index/PageScanIndex.java
+2
-2
RangeIndex.java
h2/src/main/org/h2/index/RangeIndex.java
+5
-5
ScanIndex.java
h2/src/main/org/h2/index/ScanIndex.java
+2
-2
ViewIndex.java
h2/src/main/org/h2/index/ViewIndex.java
+6
-6
JdbcArray.java
h2/src/main/org/h2/jdbc/JdbcArray.java
+1
-1
JdbcBlob.java
h2/src/main/org/h2/jdbc/JdbcBlob.java
+7
-7
JdbcCallableStatement.java
h2/src/main/org/h2/jdbc/JdbcCallableStatement.java
+124
-116
JdbcClob.java
h2/src/main/org/h2/jdbc/JdbcClob.java
+8
-8
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+8
-7
JdbcDatabaseMetaData.java
h2/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
+8
-8
JdbcParameterMetaData.java
h2/src/main/org/h2/jdbc/JdbcParameterMetaData.java
+2
-2
JdbcPreparedStatement.java
h2/src/main/org/h2/jdbc/JdbcPreparedStatement.java
+6
-6
JdbcResultSet.java
h2/src/main/org/h2/jdbc/JdbcResultSet.java
+31
-30
JdbcResultSetMetaData.java
h2/src/main/org/h2/jdbc/JdbcResultSetMetaData.java
+2
-2
JdbcStatement.java
h2/src/main/org/h2/jdbc/JdbcStatement.java
+2
-2
JdbcConnectionPool.java
h2/src/main/org/h2/jdbcx/JdbcConnectionPool.java
+2
-2
JdbcDataSource.java
h2/src/main/org/h2/jdbcx/JdbcDataSource.java
+2
-2
Message.java
h2/src/main/org/h2/message/Message.java
+2
-2
_messages_de.properties
h2/src/main/org/h2/res/_messages_de.properties
+1
-1
_messages_en.properties
h2/src/main/org/h2/res/_messages_en.properties
+1
-1
_messages_es.properties
h2/src/main/org/h2/res/_messages_es.properties
+1
-1
_messages_ja.properties
h2/src/main/org/h2/res/_messages_ja.properties
+1
-1
_messages_pl.properties
h2/src/main/org/h2/res/_messages_pl.properties
+1
-1
_messages_pt_br.properties
h2/src/main/org/h2/res/_messages_pt_br.properties
+1
-1
FileSystemDatabase.java
h2/src/main/org/h2/store/fs/FileSystemDatabase.java
+2
-2
FileSystemZip.java
h2/src/main/org/h2/store/fs/FileSystemZip.java
+6
-6
FunctionTable.java
h2/src/main/org/h2/table/FunctionTable.java
+6
-6
MetaTable.java
h2/src/main/org/h2/table/MetaTable.java
+7
-7
RangeTable.java
h2/src/main/org/h2/table/RangeTable.java
+6
-6
TableLink.java
h2/src/main/org/h2/table/TableLink.java
+3
-3
TableView.java
h2/src/main/org/h2/table/TableView.java
+5
-6
DataType.java
h2/src/main/org/h2/value/DataType.java
+3
-3
Value.java
h2/src/main/org/h2/value/Value.java
+16
-6
ValueArray.java
h2/src/main/org/h2/value/ValueArray.java
+1
-3
ValueResultSet.java
h2/src/main/org/h2/value/ValueResultSet.java
+2
-2
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+0
-4
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
723d005e
...
...
@@ -18,7 +18,10 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
Some internal caches did not use the LRU mechanism. Fixed
<ul><li>
Improved error message for unsupported features:
now the message says what exactly is not supported.
</li><li>
Improved OSGi support.
</li><li>
Some internal caches did not use the LRU mechanism. Fixed
(LOB file list, optimizer cost cache, trace system, view indexes, collection keys,
compressed in-memory file system).
</li><li>
Command line help of the tools now match the javadocs.
...
...
@@ -34,7 +37,8 @@ Change Log
Getting a connection using the built-in JdbcConnectionPool is now about 70 times faster
than opening connections using DriverManager.getConnection.
</li><li>
More bugs in the server-less multi-connection mode have been fixed:
if a process terminated while writing, other open connections were blocked.
If a process terminated while writing, other open connections were blocked.
If two processes were writing to the database, sometimes the database was corrupt after closing.
</li><li>
Linked tables to SQLite database can now be created.
</li><li>
Nested IN(IN(...)) didn't work.
</li><li>
NIO storage: the nio: prefix was using memory mapped files instead of FileChannel.
...
...
h2/src/docsrc/textbase/_messages_en.properties
浏览文件 @
723d005e
...
...
@@ -163,5 +163,5 @@
90139
=
The public static Java method was not found
\:
{0}
HY000
=
General error
\:
{0}
HY004
=
Unknown data type
\:
{0}
HYC00
=
Feature not supported
HYC00
=
Feature not supported
\:
{0}
HYT00
=
Timeout trying to lock table {0}
h2/src/main/org/h2/command/ddl/AlterTableRename.java
浏览文件 @
723d005e
...
...
@@ -45,7 +45,7 @@ public class AlterTableRename extends SchemaCommand {
}
session
.
getUser
().
checkRight
(
oldTable
,
Right
.
ALL
);
if
(
oldTable
.
getTemporary
())
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"TEMP TABLE"
);
}
db
.
renameSchemaObject
(
session
,
oldTable
,
newTableName
);
return
0
;
...
...
h2/src/main/org/h2/constant/ErrorCode.java
浏览文件 @
723d005e
...
...
@@ -296,7 +296,7 @@ public class ErrorCode {
* calling an unsupported JDBC method. See the stack trace
* for details.
*/
public
static
final
int
FEATURE_NOT_SUPPORTED
=
50100
;
public
static
final
int
FEATURE_NOT_SUPPORTED
_1
=
50100
;
/**
* The error with code <code>50200</code> is thrown when
...
...
@@ -1900,7 +1900,7 @@ public class ErrorCode {
case
GENERAL_ERROR_1:
return
"HY000"
;
case
UNKNOWN_DATA_TYPE_1:
return
"HY004"
;
case
FEATURE_NOT_SUPPORTED:
return
"HYC00"
;
case
FEATURE_NOT_SUPPORTED
_1
:
return
"HYC00"
;
case
LOCK_TIMEOUT_1:
return
"HYT00"
;
default
:
return
""
+
errorCode
;
...
...
h2/src/main/org/h2/engine/FunctionAlias.java
浏览文件 @
723d005e
...
...
@@ -152,7 +152,7 @@ public class FunctionAlias extends DbObjectBase {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"RENAME"
);
}
/**
...
...
h2/src/main/org/h2/engine/SessionRemote.java
浏览文件 @
723d005e
...
...
@@ -219,7 +219,7 @@ public class SessionRemote extends SessionWithState implements SessionFactory, D
}
public
void
setPowerOffCount
(
int
count
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"remote"
);
}
public
SessionInterface
createSession
(
ConnectionInfo
ci
)
throws
SQLException
{
...
...
@@ -307,7 +307,7 @@ public class SessionRemote extends SessionWithState implements SessionFactory, D
// AUTO_SERVER implies AUTO_RECONNECT
autoReconnect
|=
Boolean
.
valueOf
(
ci
.
getProperty
(
"AUTO_SERVER"
,
"false"
)).
booleanValue
();
if
(
autoReconnect
&&
serverList
!=
null
)
{
throw
Message
.
get
SQLException
(
ErrorCode
.
FEATURE_NOT_SUPPORTED
);
throw
Message
.
get
UnsupportedException
(
"autoReconnect && serverList != null"
);
}
if
(
autoReconnect
)
{
eventListener
=
ci
.
getDatabaseEventListenerObject
();
...
...
h2/src/main/org/h2/engine/Setting.java
浏览文件 @
723d005e
...
...
@@ -71,7 +71,7 @@ public class Setting extends DbObjectBase {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"RENAME"
);
}
}
h2/src/main/org/h2/engine/UserAggregate.java
浏览文件 @
723d005e
...
...
@@ -74,7 +74,7 @@ public class UserAggregate extends DbObjectBase {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"AGGREGATE"
);
}
public
String
getJavaClassName
()
{
...
...
h2/src/main/org/h2/index/FunctionIndex.java
浏览文件 @
723d005e
...
...
@@ -36,11 +36,11 @@ public class FunctionIndex extends BaseIndex {
}
public
void
add
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
void
remove
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
throws
SQLException
{
...
...
@@ -52,7 +52,7 @@ public class FunctionIndex extends BaseIndex {
public
double
getCost
(
Session
session
,
int
[]
masks
)
throws
SQLException
{
if
(
masks
!=
null
)
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
long
expectedRows
;
if
(
functionTable
.
canGetRowCount
())
{
...
...
@@ -64,11 +64,11 @@ public class FunctionIndex extends BaseIndex {
}
public
void
remove
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
boolean
needRebuild
()
{
...
...
@@ -76,7 +76,7 @@ public class FunctionIndex extends BaseIndex {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
boolean
canGetFirstOrLast
()
{
...
...
@@ -84,7 +84,7 @@ public class FunctionIndex extends BaseIndex {
}
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
long
getRowCount
(
Session
session
)
{
...
...
h2/src/main/org/h2/index/HashIndex.java
浏览文件 @
723d005e
...
...
@@ -150,7 +150,7 @@ public class HashIndex extends BaseIndex {
}
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"HASH"
);
}
public
long
getRowCount
(
Session
session
)
{
...
...
h2/src/main/org/h2/index/LinkedIndex.java
浏览文件 @
723d005e
...
...
@@ -169,7 +169,7 @@ public class LinkedIndex extends BaseIndex {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LINKED"
);
}
public
boolean
needRebuild
()
{
...
...
@@ -183,7 +183,7 @@ public class LinkedIndex extends BaseIndex {
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
throws
SQLException
{
// TODO optimization: could get the first or last value (in any case;
// maybe not optimized)
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LINKED"
);
}
public
void
remove
(
Session
session
,
Row
row
)
throws
SQLException
{
...
...
h2/src/main/org/h2/index/MetaIndex.java
浏览文件 @
723d005e
...
...
@@ -35,11 +35,11 @@ public class MetaIndex extends BaseIndex {
}
public
void
add
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
void
remove
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
throws
SQLException
{
...
...
@@ -55,11 +55,11 @@ public class MetaIndex extends BaseIndex {
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
void
remove
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
int
getColumnIndex
(
Column
col
)
{
...
...
@@ -71,7 +71,7 @@ public class MetaIndex extends BaseIndex {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
boolean
needRebuild
()
{
...
...
@@ -87,7 +87,7 @@ public class MetaIndex extends BaseIndex {
}
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
long
getRowCount
(
Session
session
)
{
...
...
h2/src/main/org/h2/index/PageBtreeIndex.java
浏览文件 @
723d005e
...
...
@@ -171,7 +171,7 @@ public class PageBtreeIndex extends BaseIndex {
}
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"PAGE"
);
}
public
double
getCost
(
Session
session
,
int
[]
masks
)
{
...
...
h2/src/main/org/h2/index/PageScanIndex.java
浏览文件 @
723d005e
...
...
@@ -182,7 +182,7 @@ public class PageScanIndex extends BaseIndex implements RowIndex {
}
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"PAGE"
);
}
public
double
getCost
(
Session
session
,
int
[]
masks
)
throws
SQLException
{
...
...
@@ -256,7 +256,7 @@ public class PageScanIndex extends BaseIndex implements RowIndex {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"PAGE"
);
}
public
Row
getRow
(
Session
session
,
int
key
)
throws
SQLException
{
...
...
h2/src/main/org/h2/index/RangeIndex.java
浏览文件 @
723d005e
...
...
@@ -33,11 +33,11 @@ public class RangeIndex extends BaseIndex {
}
public
void
add
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
void
remove
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
throws
SQLException
{
...
...
@@ -57,11 +57,11 @@ public class RangeIndex extends BaseIndex {
}
public
void
remove
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
boolean
needRebuild
()
{
...
...
@@ -69,7 +69,7 @@ public class RangeIndex extends BaseIndex {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
boolean
canGetFirstOrLast
()
{
...
...
h2/src/main/org/h2/index/ScanIndex.java
浏览文件 @
723d005e
...
...
@@ -264,7 +264,7 @@ public class ScanIndex extends BaseIndex implements RowIndex {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SCAN"
);
}
public
boolean
needRebuild
()
{
...
...
@@ -276,7 +276,7 @@ public class ScanIndex extends BaseIndex implements RowIndex {
}
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SCAN"
);
}
public
Iterator
getDelta
()
{
...
...
h2/src/main/org/h2/index/ViewIndex.java
浏览文件 @
723d005e
...
...
@@ -74,11 +74,11 @@ public class ViewIndex extends BaseIndex {
}
public
void
add
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
void
remove
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
/**
...
...
@@ -246,15 +246,15 @@ public class ViewIndex extends BaseIndex {
}
public
void
remove
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
boolean
needRebuild
()
{
...
...
@@ -266,7 +266,7 @@ public class ViewIndex extends BaseIndex {
}
public
Cursor
findFirstOrLast
(
Session
session
,
boolean
first
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
void
setRecursive
(
boolean
value
)
{
...
...
h2/src/main/org/h2/jdbc/JdbcArray.java
浏览文件 @
723d005e
...
...
@@ -280,7 +280,7 @@ public class JdbcArray extends TraceObject implements Array {
private
void
checkMap
(
Map
map
)
throws
SQLException
{
if
(
map
!=
null
&&
map
.
size
()
>
0
)
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"map.size > 0"
);
}
}
...
...
h2/src/main/org/h2/jdbc/JdbcBlob.java
浏览文件 @
723d005e
...
...
@@ -81,7 +81,7 @@ public class JdbcBlob extends TraceObject implements Blob {
*/
public
void
truncate
(
long
len
)
throws
SQLException
{
debugCodeCall
(
"truncate"
,
len
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -127,7 +127,7 @@ public class JdbcBlob extends TraceObject implements Blob {
*/
public
int
setBytes
(
long
pos
,
byte
[]
bytes
)
throws
SQLException
{
debugCode
(
"setBytes("
+
pos
+
", bytes);"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -142,7 +142,7 @@ public class JdbcBlob extends TraceObject implements Blob {
*/
public
int
setBytes
(
long
pos
,
byte
[]
bytes
,
int
offset
,
int
len
)
throws
SQLException
{
debugCode
(
"setBytes("
+
pos
+
", bytes, "
+
offset
+
", "
+
len
+
");"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -170,7 +170,7 @@ public class JdbcBlob extends TraceObject implements Blob {
*/
public
OutputStream
setBinaryStream
(
long
pos
)
throws
SQLException
{
debugCodeCall
(
"setBinaryStream"
,
pos
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -223,7 +223,7 @@ public class JdbcBlob extends TraceObject implements Blob {
throw
logAndConvert
(
e
);
}
}
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB search"
);
}
/**
...
...
@@ -256,7 +256,7 @@ public class JdbcBlob extends TraceObject implements Blob {
throw
logAndConvert
(
e
);
}
}
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB subset"
);
}
/**
...
...
@@ -277,7 +277,7 @@ public class JdbcBlob extends TraceObject implements Blob {
*/
public
InputStream
getBinaryStream
(
long
pos
,
long
length
)
throws
SQLException
{
debugCode
(
"getBinaryStream("
+
pos
+
", "
+
length
+
");"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
private
void
checkClosed
()
throws
SQLException
{
...
...
h2/src/main/org/h2/jdbc/JdbcCallableStatement.java
浏览文件 @
723d005e
差异被折叠。
点击展开。
h2/src/main/org/h2/jdbc/JdbcClob.java
浏览文件 @
723d005e
...
...
@@ -85,7 +85,7 @@ public class JdbcClob extends TraceObject implements Clob
*/
public
void
truncate
(
long
len
)
throws
SQLException
{
debugCodeCall
(
"truncate"
,
len
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -109,7 +109,7 @@ public class JdbcClob extends TraceObject implements Clob
*/
public
OutputStream
setAsciiStream
(
long
pos
)
throws
SQLException
{
debugCodeCall
(
"setAsciiStream"
,
pos
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -132,7 +132,7 @@ public class JdbcClob extends TraceObject implements Clob
*/
public
Writer
setCharacterStream
(
long
pos
)
throws
SQLException
{
debugCodeCall
(
"setCharacterStream"
,
pos
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -177,7 +177,7 @@ public class JdbcClob extends TraceObject implements Clob
*/
public
int
setString
(
long
pos
,
String
str
)
throws
SQLException
{
debugCode
(
"setString("
+
pos
+
", "
+
quote
(
str
)+
");"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -185,7 +185,7 @@ public class JdbcClob extends TraceObject implements Clob
*/
public
int
setString
(
long
pos
,
String
str
,
int
offset
,
int
len
)
throws
SQLException
{
debugCode
(
"setString("
+
pos
+
", "
+
quote
(
str
)+
", "
+
offset
+
", "
+
len
+
");"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB update"
);
}
/**
...
...
@@ -193,7 +193,7 @@ public class JdbcClob extends TraceObject implements Clob
*/
public
long
position
(
String
pattern
,
long
start
)
throws
SQLException
{
debugCode
(
"position("
+
quote
(
pattern
)+
", "
+
start
+
");"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB search"
);
}
/**
...
...
@@ -201,7 +201,7 @@ public class JdbcClob extends TraceObject implements Clob
*/
public
long
position
(
Clob
clobPattern
,
long
start
)
throws
SQLException
{
debugCode
(
"position(clobPattern, "
+
start
+
");"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB search"
);
}
/**
...
...
@@ -217,7 +217,7 @@ public class JdbcClob extends TraceObject implements Clob
*/
public
Reader
getCharacterStream
(
long
pos
,
long
length
)
throws
SQLException
{
debugCode
(
"getCharacterStream("
+
pos
+
", "
+
length
+
");"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LOB subset"
);
}
private
void
checkClosed
()
throws
SQLException
{
...
...
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
723d005e
...
...
@@ -1254,6 +1254,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Check if this connection is closed.
*
* @return true if the session was re-connected
* @throws SQLException if the connection or session is closed
*/
boolean
checkClosed
()
throws
SQLException
{
...
...
@@ -1390,7 +1391,7 @@ public class JdbcConnection extends TraceObject implements Connection {
*/
/*## Java 1.6 begin ##
public SQLXML createSQLXML() throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"SQLXML"
);
}
## Java 1.6 end ##*/
...
...
@@ -1400,7 +1401,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/*## Java 1.6 begin ##
public Array createArrayOf(String typeName, Object[] elements)
throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"createArray"
);
}
## Java 1.6 end ##*/
...
...
@@ -1410,7 +1411,7 @@ public class JdbcConnection extends TraceObject implements Connection {
/*## Java 1.6 begin ##
public Struct createStruct(String typeName, Object[] attributes)
throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"Struct"
);
}
## Java 1.6 end ##*/
...
...
@@ -1470,7 +1471,7 @@ public class JdbcConnection extends TraceObject implements Connection {
*/
/*## Java 1.6 begin ##
public String getClientInfo(String name) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"clientInfo"
);
}
## Java 1.6 end ##*/
...
...
@@ -1481,7 +1482,7 @@ public class JdbcConnection extends TraceObject implements Connection {
*/
/*## Java 1.6 begin ##
public <T> T unwrap(Class<T> iface) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"unwrap"
);
}
## Java 1.6 end ##*/
...
...
@@ -1492,7 +1493,7 @@ public class JdbcConnection extends TraceObject implements Connection {
*/
/*## Java 1.6 begin ##
public boolean isWrapperFor(Class< ? > iface) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"isWrapperFor"
);
}
## Java 1.6 end ##*/
...
...
@@ -1536,7 +1537,7 @@ public class JdbcConnection extends TraceObject implements Connection {
private
void
checkMap
(
Map
map
)
throws
SQLException
{
if
(
map
!=
null
&&
map
.
size
()
>
0
)
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"map.size > 0"
);
}
}
...
...
h2/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
浏览文件 @
723d005e
...
...
@@ -2550,7 +2550,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+
quote
(
schemaPattern
)+
", "
+
quote
(
typeNamePattern
)+
");"
);
}
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"superTypes"
);
}
catch
(
Exception
e
)
{
throw
logAndConvert
(
e
);
}
...
...
@@ -2610,7 +2610,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+
quote
(
typeNamePattern
)+
", "
+
quote
(
attributeNamePattern
)+
");"
);
}
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"attributes"
);
}
catch
(
Exception
e
)
{
throw
logAndConvert
(
e
);
}
...
...
@@ -2752,7 +2752,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
public ResultSet getSchemas(String catalog, String schemaPattern)
throws SQLException {
debugCodeCall("getSchemas");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"getSchemas(., .)"
);
}
## Java 1.6 end ##*/
...
...
@@ -2781,7 +2781,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
*/
public
ResultSet
getClientInfoProperties
()
throws
SQLException
{
debugCodeCall
(
"getClientInfoProperties"
);
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"clientInfoProperties"
);
}
/**
...
...
@@ -2790,7 +2790,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/*## Java 1.6 begin ##
public <T> T unwrap(Class<T> iface) throws SQLException {
debugCodeCall("unwrap");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"unwrap"
);
}
## Java 1.6 end ##*/
...
...
@@ -2800,7 +2800,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/*## Java 1.6 begin ##
public boolean isWrapperFor(Class< ? > iface) throws SQLException {
debugCodeCall("isWrapperFor");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"isWrapperFor"
);
}
## Java 1.6 end ##*/
...
...
@@ -2812,7 +2812,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
String functionNamePattern, String columnNamePattern)
throws SQLException {
debugCodeCall("getFunctionColumns");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"getFunctionColumns"
);
}
## Java 1.6 end ##*/
...
...
@@ -2823,7 +2823,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
public ResultSet getFunctions(String catalog, String schemaPattern,
String functionNamePattern) throws SQLException {
debugCodeCall("getFunctions");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"getFunctions"
);
}
## Java 1.6 end ##*/
...
...
h2/src/main/org/h2/jdbc/JdbcParameterMetaData.java
浏览文件 @
723d005e
...
...
@@ -221,7 +221,7 @@ implements ParameterMetaData
/*## Java 1.6 begin ##
public <T> T unwrap(Class<T> iface) throws SQLException {
debugCodeCall("unwrap");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"unwrap"
);
}
## Java 1.6 end ##*/
...
...
@@ -231,7 +231,7 @@ implements ParameterMetaData
/*## Java 1.6 begin ##
public boolean isWrapperFor(Class< ? > iface) throws SQLException {
debugCodeCall("isWrapperFor");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"isWrapperFor"
);
}
## Java 1.6 end ##*/
...
...
h2/src/main/org/h2/jdbc/JdbcPreparedStatement.java
浏览文件 @
723d005e
...
...
@@ -579,7 +579,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
if
(
isDebugEnabled
())
{
debugCode
(
"setRef("
+
parameterIndex
+
", x);"
);
}
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ref"
);
}
catch
(
Exception
e
)
{
throw
logAndConvert
(
e
);
}
...
...
@@ -666,7 +666,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
if
(
isDebugEnabled
())
{
debugCode
(
"setUnicodeStream("
+
parameterIndex
+
", x, "
+
length
+
");"
);
}
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"unicodeStream"
);
}
catch
(
Exception
e
)
{
throw
logAndConvert
(
e
);
}
...
...
@@ -794,7 +794,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
if
(
isDebugEnabled
())
{
debugCode
(
"setArray("
+
parameterIndex
+
", x);"
);
}
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"setArray"
);
}
catch
(
Exception
e
)
{
throw
logAndConvert
(
e
);
}
...
...
@@ -959,7 +959,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
if
(
isDebugEnabled
())
{
debugCode
(
"setURL("
+
parameterIndex
+
", x);"
);
}
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"url"
);
}
catch
(
Exception
e
)
{
throw
logAndConvert
(
e
);
}
...
...
@@ -1235,7 +1235,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*/
/*## Java 1.6 begin ##
public void setRowId(int parameterIndex, RowId x) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"rowId"
);
}
## Java 1.6 end ##*/
...
...
@@ -1402,7 +1402,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
*/
/*## Java 1.6 begin ##
public void setSQLXML(int parameterIndex, SQLXML x) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"SQLXML"
);
}
## Java 1.6 end ##*/
...
...
h2/src/main/org/h2/jdbc/JdbcResultSet.java
浏览文件 @
723d005e
差异被折叠。
点击展开。
h2/src/main/org/h2/jdbc/JdbcResultSetMetaData.java
浏览文件 @
723d005e
...
...
@@ -434,7 +434,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
/*## Java 1.6 begin ##
public <T> T unwrap(Class<T> iface) throws SQLException {
debugCodeCall("unwrap");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"unwrap"
);
}
## Java 1.6 end ##*/
...
...
@@ -444,7 +444,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
/*## Java 1.6 begin ##
public boolean isWrapperFor(Class< ? > iface) throws SQLException {
debugCodeCall("isWrapperFor");
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"isWrapperFor"
);
}
## Java 1.6 end ##*/
...
...
h2/src/main/org/h2/jdbc/JdbcStatement.java
浏览文件 @
723d005e
...
...
@@ -901,7 +901,7 @@ public class JdbcStatement extends TraceObject implements Statement {
*/
/*## Java 1.6 begin ##
public <T> T unwrap(Class<T> iface) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"unwrap"
);
}
## Java 1.6 end ##*/
...
...
@@ -910,7 +910,7 @@ public class JdbcStatement extends TraceObject implements Statement {
*/
/*## Java 1.6 begin ##
public boolean isWrapperFor(Class< ? > iface) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"isWrapperFor"
);
}
## Java 1.6 end ##*/
...
...
h2/src/main/org/h2/jdbcx/JdbcConnectionPool.java
浏览文件 @
723d005e
...
...
@@ -351,7 +351,7 @@ public class JdbcConnectionPool implements DataSource {
*/
/*## Java 1.6 begin ##
public <T> T unwrap(Class<T> iface) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"unwrap"
);
}
## Java 1.6 end ##*/
...
...
@@ -362,7 +362,7 @@ public class JdbcConnectionPool implements DataSource {
*/
/*## Java 1.6 begin ##
public boolean isWrapperFor(Class< ? > iface) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"isWrapperFor"
);
}
## Java 1.6 end ##*/
...
...
h2/src/main/org/h2/jdbcx/JdbcDataSource.java
浏览文件 @
723d005e
...
...
@@ -343,7 +343,7 @@ implements XADataSource, DataSource, ConnectionPoolDataSource, Serializable, Ref
*/
/*## Java 1.6 begin ##
public <T> T unwrap(Class<T> iface) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"unwrap"
);
}
## Java 1.6 end ##*/
...
...
@@ -354,7 +354,7 @@ implements XADataSource, DataSource, ConnectionPoolDataSource, Serializable, Ref
*/
/*## Java 1.6 begin ##
public boolean isWrapperFor(Class< ? > iface) throws SQLException {
throw Message.getUnsupportedException();
throw Message.getUnsupportedException(
"isWrapperFor"
);
}
## Java 1.6 end ##*/
...
...
h2/src/main/org/h2/message/Message.java
浏览文件 @
723d005e
...
...
@@ -158,8 +158,8 @@ public class Message {
*
* @return the SQLException object
*/
public
static
JdbcSQLException
getUnsupportedException
()
{
return
getSQLException
(
ErrorCode
.
FEATURE_NOT_SUPPORTED
);
public
static
JdbcSQLException
getUnsupportedException
(
String
message
)
{
return
getSQLException
(
ErrorCode
.
FEATURE_NOT_SUPPORTED
_1
,
message
);
}
/**
...
...
h2/src/main/org/h2/res/_messages_de.properties
浏览文件 @
723d005e
...
...
@@ -163,5 +163,5 @@
90139
=
Die (public static) Java Funktion wurde nicht gefunden
\:
{0}
HY000
=
Allgemeiner Fehler
\:
{0}
HY004
=
Unbekannter Datentyp
\:
{0}
HYC00
=
Dieses Feature wird unterst
\u
00FCtzt
HYC00
=
Dieses Feature wird unterst
\u
00FCtzt
\:
{0}
HYT00
=
Zeit
\u
00FCberschreitung beim Versuch die Tabelle {0} zu sperren
h2/src/main/org/h2/res/_messages_en.properties
浏览文件 @
723d005e
...
...
@@ -163,5 +163,5 @@
90139
=
The public static Java method was not found
\:
{0}
HY000
=
General error
\:
{0}
HY004
=
Unknown data type
\:
{0}
HYC00
=
Feature not supported
HYC00
=
Feature not supported
\:
{0}
HYT00
=
Timeout trying to lock table {0}
h2/src/main/org/h2/res/_messages_es.properties
浏览文件 @
723d005e
...
...
@@ -163,5 +163,5 @@
90139
=
El metodo Java (publico y estatico)
\:
{0} no fue encontrado
HY000
=
Error General
\:
{0}
HY004
=
Tipo de dato desconocido
\:
{0}
HYC00
=
Caracteristica no soportada
HYC00
=
Caracteristica no soportada
\:
{0}
HYT00
=
Tiempo vencido intentando trabar (lock) la tabla {0}
h2/src/main/org/h2/res/_messages_ja.properties
浏览文件 @
723d005e
...
...
@@ -163,5 +163,5 @@
90139
=
public static
\u3067\u3042\u
308BJava
\u
30E1
\u
30BD
\u
30C3
\u
30C9
\u
304C
\u
898B
\u3064\u
304B
\u
308A
\u
307E
\u
305B
\u3093\:
{0}
HY000
=
\u
4E00
\u
822C
\u
30A8
\u
30E9
\u
30FC
\:
{0}
HY004
=
\u
4E0D
\u
660E
\u
306A
\u
30C7
\u
30FC
\u
30BF
\u
578B
\:
{0}
HYC00
=
\u
6A5F
\u
80FD
\u
306F
\u
30B5
\u
30DD
\u
30FC
\u
30C8
\u3055\u
308C
\u3066\u3044\u
307E
\u
305B
\u3093
HYC00
=
\u
6A5F
\u
80FD
\u
306F
\u
30B5
\u
30DD
\u
30FC
\u
30C8
\u3055\u
308C
\u3066\u3044\u
307E
\u
305B
\u3093
\:
{0}
HYT00
=
\u
30C6
\u
30FC
\u
30D6
\u
30EB {0}
\u
306E
\u
30ED
\u
30C3
\u
30AF
\u
8A66
\u
884C
\u
304C
\u
30BF
\u
30A4
\u
30E0
\u
30A2
\u
30A6
\u
30C8
\u3057\u
307E
\u3057\u
305F
h2/src/main/org/h2/res/_messages_pl.properties
浏览文件 @
723d005e
...
...
@@ -163,5 +163,5 @@
90139
=
\#
The public static Java method was not found
\:
{0}
HY000
=
Blad ogolny
\:
{0}
HY004
=
Nieznany typ danyche
\:
{0}
HYC00
=
Cecha nie jest wspierana
HYC00
=
Cecha nie jest wspierana
\:
{0}
HYT00
=
Czas oczekiwania na blokade tabeli {0} sie skonczyl
h2/src/main/org/h2/res/_messages_pt_br.properties
浏览文件 @
723d005e
...
...
@@ -163,5 +163,5 @@
90139
=
\#
The public static Java method was not found
\:
{0}
HY000
=
Erro geral
\:
{0}
HY004
=
Tipo de dados desconhecido
\:
{0}
HYC00
=
Recurso n
\u
00E3o suportado
HYC00
=
Recurso n
\u
00E3o suportado
\:
{0}
HYT00
=
Timeout ao tentar bloquear a tabela {0}
h2/src/main/org/h2/store/fs/FileSystemDatabase.java
浏览文件 @
723d005e
...
...
@@ -269,7 +269,7 @@ public class FileSystemDatabase extends FileSystem {
}
public
void
deleteRecursive
(
String
fileName
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"db"
);
}
public
boolean
exists
(
String
fileName
)
{
...
...
@@ -407,7 +407,7 @@ public class FileSystemDatabase extends FileSystem {
long
parentOld
=
getId
(
oldName
,
true
);
long
parentNew
=
getId
(
newName
,
true
);
if
(
parentOld
!=
parentNew
)
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"different parents"
);
}
newName
=
getFileName
(
newName
);
long
id
=
getId
(
oldName
,
false
);
...
...
h2/src/main/org/h2/store/fs/FileSystemZip.java
浏览文件 @
723d005e
...
...
@@ -39,7 +39,7 @@ public class FileSystemZip extends FileSystem {
}
public
void
copy
(
String
original
,
String
copy
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"write"
);
}
public
void
createDirs
(
String
fileName
)
{
...
...
@@ -47,7 +47,7 @@ public class FileSystemZip extends FileSystem {
}
public
boolean
createNewFile
(
String
fileName
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"write"
);
}
public
String
createTempFile
(
String
prefix
,
String
suffix
,
boolean
deleteOnExit
,
boolean
inTempDir
)
throws
IOException
{
...
...
@@ -58,11 +58,11 @@ public class FileSystemZip extends FileSystem {
}
public
void
delete
(
String
fileName
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"write"
);
}
public
void
deleteRecursive
(
String
fileName
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"write"
);
}
public
boolean
exists
(
String
fileName
)
{
...
...
@@ -209,11 +209,11 @@ public class FileSystemZip extends FileSystem {
}
public
OutputStream
openFileOutputStream
(
String
fileName
,
boolean
append
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"write"
);
}
public
void
rename
(
String
oldName
,
String
newName
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"write"
);
}
public
boolean
tryDelete
(
String
fileName
)
{
...
...
h2/src/main/org/h2/table/FunctionTable.java
浏览文件 @
723d005e
...
...
@@ -93,15 +93,15 @@ public class FunctionTable extends Table {
public
Index
addIndex
(
Session
session
,
String
indexName
,
int
indexId
,
IndexColumn
[]
cols
,
IndexType
indexType
,
int
headPos
,
String
comment
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
void
removeRow
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
boolean
canDrop
()
{
...
...
@@ -109,11 +109,11 @@ public class FunctionTable extends Table {
}
public
void
addRow
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
void
checkSupportAlter
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
public
String
getTableType
()
{
...
...
@@ -145,7 +145,7 @@ public class FunctionTable extends Table {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"ALIAS"
);
}
/**
...
...
h2/src/main/org/h2/table/MetaTable.java
浏览文件 @
723d005e
...
...
@@ -548,7 +548,7 @@ public class MetaTable extends Table {
public
Index
addIndex
(
Session
session
,
String
indexName
,
int
indexId
,
IndexColumn
[]
cols
,
IndexType
indexType
,
int
headPos
,
String
comment
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
void
lock
(
Session
session
,
boolean
exclusive
,
boolean
force
)
{
...
...
@@ -1641,15 +1641,15 @@ public class MetaTable extends Table {
}
public
void
removeRow
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
void
addRow
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
void
removeChildrenAndResources
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
void
close
(
Session
session
)
{
...
...
@@ -1740,15 +1740,15 @@ public class MetaTable extends Table {
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
void
checkSupportAlter
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"META"
);
}
public
long
getRowCount
(
Session
session
)
{
...
...
h2/src/main/org/h2/table/RangeTable.java
浏览文件 @
723d005e
...
...
@@ -79,23 +79,23 @@ public class RangeTable extends Table {
}
public
Index
addIndex
(
Session
session
,
String
indexName
,
int
indexId
,
IndexColumn
[]
cols
,
IndexType
indexType
,
int
headPos
,
String
comment
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
void
removeRow
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
void
addRow
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
void
checkSupportAlter
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
void
checkRename
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
boolean
canGetRowCount
()
{
...
...
@@ -153,7 +153,7 @@ public class RangeTable extends Table {
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"SYSTEM_RANGE"
);
}
public
long
getMaxDataModificationId
()
{
...
...
h2/src/main/org/h2/table/TableLink.java
浏览文件 @
723d005e
...
...
@@ -331,7 +331,7 @@ public class TableLink extends Table {
public
Index
addIndex
(
Session
session
,
String
indexName
,
int
indexId
,
IndexColumn
[]
cols
,
IndexType
indexType
,
int
headPos
,
String
comment
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LINK"
);
}
public
void
lock
(
Session
session
,
boolean
exclusive
,
boolean
force
)
{
...
...
@@ -438,11 +438,11 @@ public class TableLink extends Table {
}
public
void
checkSupportAlter
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LINK"
);
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"LINK"
);
}
public
boolean
canGetRowCount
()
{
...
...
h2/src/main/org/h2/table/TableView.java
浏览文件 @
723d005e
...
...
@@ -205,24 +205,23 @@ public class TableView extends Table {
public
Index
addIndex
(
Session
session
,
String
indexName
,
int
indexId
,
IndexColumn
[]
cols
,
IndexType
indexType
,
int
headPos
,
String
comment
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
void
removeRow
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
void
addRow
(
Session
session
,
Row
row
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
void
checkSupportAlter
()
throws
SQLException
{
// TODO view: alter what? rename is ok
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
void
truncate
(
Session
session
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
Message
.
getUnsupportedException
(
"VIEW"
);
}
public
long
getRowCount
(
Session
session
)
{
...
...
h2/src/main/org/h2/value/DataType.java
浏览文件 @
723d005e
...
...
@@ -11,6 +11,7 @@ import java.io.InputStream;
import
java.io.Reader
;
import
java.math.BigDecimal
;
import
java.sql.Array
;
import
java.sql.Blob
;
import
java.sql.Clob
;
import
java.sql.Date
;
import
java.sql.ResultSet
;
...
...
@@ -956,13 +957,12 @@ public class DataType {
*/
public
static
Object
convertTo
(
SessionInterface
session
,
JdbcConnection
conn
,
Value
v
,
Class
paramClass
)
throws
SQLException
{
if
(
paramClass
==
java
.
sql
.
Blob
.
class
)
{
if
(
paramClass
==
Blob
.
class
)
{
return
new
JdbcBlob
(
conn
,
v
,
0
);
}
else
if
(
paramClass
==
Clob
.
class
)
{
return
new
JdbcClob
(
conn
,
v
,
0
);
}
else
{
throw
Message
.
getUnsupportedException
();
}
throw
Message
.
getUnsupportedException
(
paramClass
.
getName
());
}
}
h2/src/main/org/h2/value/Value.java
浏览文件 @
723d005e
...
...
@@ -433,11 +433,11 @@ public abstract class Value {
* @return the result
*/
public
Value
add
(
Value
v
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
public
int
getSignum
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
/**
...
...
@@ -446,7 +446,7 @@ public abstract class Value {
* @return the negative
*/
public
Value
negate
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
/**
...
...
@@ -456,7 +456,7 @@ public abstract class Value {
* @return the result
*/
public
Value
subtract
(
Value
v
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
/**
...
...
@@ -466,7 +466,7 @@ public abstract class Value {
* @return the result
*/
public
Value
divide
(
Value
v
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
/**
...
...
@@ -476,7 +476,7 @@ public abstract class Value {
* @return the result
*/
public
Value
multiply
(
Value
v
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
/**
...
...
@@ -988,4 +988,14 @@ public abstract class Value {
return
getTraceSQL
();
}
/**
* Throw the exception that the feature is not support for the given data type.
*
* @return the exception
* @throws SQLException
*/
protected
SQLException
throwUnsupportedExceptionForType
()
throws
SQLException
{
throw
Message
.
getUnsupportedException
(
DataType
.
getDataType
(
getType
()).
name
);
}
}
h2/src/main/org/h2/value/ValueArray.java
浏览文件 @
723d005e
...
...
@@ -8,8 +8,6 @@ package org.h2.value;
import
java.sql.PreparedStatement
;
import
java.sql.SQLException
;
import
org.h2.message.Message
;
import
org.h2.util.MathUtils
;
/**
...
...
@@ -99,7 +97,7 @@ public class ValueArray extends Value {
}
public
void
set
(
PreparedStatement
prep
,
int
parameterIndex
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
public
String
getSQL
()
{
...
...
h2/src/main/org/h2/value/ValueResultSet.java
浏览文件 @
723d005e
...
...
@@ -112,7 +112,7 @@ public class ValueResultSet extends Value {
}
protected
int
compareSecure
(
Value
v
,
CompareMode
mode
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
public
boolean
equals
(
Object
other
)
{
...
...
@@ -132,7 +132,7 @@ public class ValueResultSet extends Value {
}
public
void
set
(
PreparedStatement
prep
,
int
parameterIndex
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
throw
throwUnsupportedExceptionForType
();
}
public
String
getSQL
()
{
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
723d005e
...
...
@@ -284,10 +284,6 @@ java org.h2.test.TestAll timer
Console, Server, and Shell do not extend Tool yet.
DatabaseH2PoolTest.java
file_lock=serialized and then go back to auto_server=true
throws an exception "method not supported".
documentation: rolling review at roadmap.html:312
create a short 4 pages documentation
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论