Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c9dd1fe3
提交
c9dd1fe3
authored
1月 24, 2007
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
8f8e77d1
全部展开
显示空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
372 行增加
和
682 行删除
+372
-682
BtreeLeaf.java
h2/src/main/org/h2/index/BtreeLeaf.java
+6
-6
BtreeNode.java
h2/src/main/org/h2/index/BtreeNode.java
+4
-4
Index.java
h2/src/main/org/h2/index/Index.java
+1
-1
JdbcBlob.java
h2/src/main/org/h2/jdbc/JdbcBlob.java
+7
-21
JdbcCallableStatement.java
h2/src/main/org/h2/jdbc/JdbcCallableStatement.java
+130
-318
JdbcClob.java
h2/src/main/org/h2/jdbc/JdbcClob.java
+11
-24
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+49
-62
JdbcDatabaseMetaData.java
h2/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
+14
-26
JdbcParameterMetaData.java
h2/src/main/org/h2/jdbc/JdbcParameterMetaData.java
+6
-8
JdbcPreparedStatement.java
h2/src/main/org/h2/jdbc/JdbcPreparedStatement.java
+23
-35
JdbcResultSet.java
h2/src/main/org/h2/jdbc/JdbcResultSet.java
+73
-124
JdbcResultSetMetaData.java
h2/src/main/org/h2/jdbc/JdbcResultSetMetaData.java
+6
-8
JdbcStatement.java
h2/src/main/org/h2/jdbc/JdbcStatement.java
+16
-19
JdbcConnectionListener.java
h2/src/main/org/h2/jdbcx/JdbcConnectionListener.java
+2
-2
JdbcDataSource.java
h2/src/main/org/h2/jdbcx/JdbcDataSource.java
+4
-4
JdbcXAConnection.java
h2/src/main/org/h2/jdbcx/JdbcXAConnection.java
+3
-3
Message.java
h2/src/main/org/h2/message/Message.java
+9
-8
TraceObject.java
h2/src/main/org/h2/message/TraceObject.java
+1
-6
TraceSystem.java
h2/src/main/org/h2/message/TraceSystem.java
+1
-1
help.csv
h2/src/main/org/h2/res/help.csv
+5
-2
messages.properties
h2/src/main/org/h2/res/messages.properties
+1
-0
没有找到文件。
h2/src/main/org/h2/index/BtreeLeaf.java
浏览文件 @
c9dd1fe3
...
...
@@ -83,7 +83,7 @@ public class BtreeLeaf extends BtreePage {
public
SearchRow
remove
(
Session
session
,
Row
oldRow
,
int
level
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(
r
==
0
)
{
if
(!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
!
root
)
{
if
(!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
!
root
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
}
...
...
@@ -91,7 +91,7 @@ public class BtreeLeaf extends BtreePage {
int
i
=
(
l
+
r
)
>>>
1
;
SearchRow
row
=
(
SearchRow
)
pageData
.
get
(
i
);
if
(
Constants
.
CHECK
&&
row
==
null
)
{
throw
Message
.
getInternalError
(
"btree c
urrupted
"
);
throw
Message
.
getInternalError
(
"btree c
orrupt
"
);
}
int
comp
=
index
.
compareRows
(
row
,
oldRow
);
if
(
comp
==
0
)
{
...
...
@@ -142,7 +142,7 @@ public class BtreeLeaf extends BtreePage {
public
boolean
findFirst
(
BtreeCursor
cursor
,
SearchRow
compare
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(
r
==
0
&&
!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
!
root
)
{
if
(
r
==
0
&&
!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
!
root
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
while
(
l
<
r
)
{
...
...
@@ -178,7 +178,7 @@ public class BtreeLeaf extends BtreePage {
public
void
first
(
BtreeCursor
cursor
)
throws
SQLException
{
if
(
pageData
.
size
()
==
0
)
{
if
(!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
!
root
)
{
if
(!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
!
root
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
nextUpper
(
cursor
);
...
...
@@ -258,7 +258,7 @@ public class BtreeLeaf extends BtreePage {
SearchRow
getLast
()
throws
SQLException
{
if
(
pageData
.
size
()==
0
)
{
if
(!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
!
root
)
{
if
(!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
!
root
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
return
null
;
...
...
@@ -268,7 +268,7 @@ public class BtreeLeaf extends BtreePage {
SearchRow
getFirst
()
throws
SQLException
{
if
(
pageData
.
size
()==
0
)
{
if
(!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
!
root
)
{
if
(!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
!
root
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
return
null
;
...
...
h2/src/main/org/h2/index/BtreeNode.java
浏览文件 @
c9dd1fe3
...
...
@@ -68,7 +68,7 @@ public class BtreeNode extends BtreePage {
public
int
add
(
Row
newRow
,
Session
session
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
pageChildren
.
size
()
==
0
)
{
if
(!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
pageChildren
.
size
()
==
0
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
while
(
l
<
r
)
{
...
...
@@ -110,7 +110,7 @@ public class BtreeNode extends BtreePage {
public
SearchRow
remove
(
Session
session
,
Row
oldRow
,
int
level
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
pageChildren
.
size
()
==
0
)
{
if
(!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
pageChildren
.
size
()
==
0
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
int
comp
=
0
;
...
...
@@ -201,7 +201,7 @@ public class BtreeNode extends BtreePage {
public
boolean
findFirst
(
BtreeCursor
cursor
,
SearchRow
compare
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
pageChildren
.
size
()
==
0
)
{
if
(!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
pageChildren
.
size
()
==
0
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
while
(
l
<
r
)
{
...
...
@@ -331,7 +331,7 @@ public class BtreeNode extends BtreePage {
}
SearchRow
getLast
()
throws
SQLException
{
if
(!
Constants
.
ALLOW_EM
TP
Y_BTREE_PAGES
&&
pageChildren
.
size
()
==
0
)
{
if
(!
Constants
.
ALLOW_EM
PT
Y_BTREE_PAGES
&&
pageChildren
.
size
()
==
0
)
{
throw
Message
.
getInternalError
(
"Empty btree page"
);
}
for
(
int
i
=
pageChildren
.
size
()-
1
;
i
>=
0
;
i
--)
{
...
...
h2/src/main/org/h2/index/Index.java
浏览文件 @
c9dd1fe3
...
...
@@ -129,7 +129,7 @@ public abstract class Index extends SchemaObject {
int
index
=
columnIndex
[
i
];
Value
v
=
compare
.
getValue
(
index
);
if
(
v
==
null
)
{
// can't compare futher
// can't compare fu
r
ther
return
0
;
}
int
c
=
compareValues
(
rowData
.
getValue
(
index
),
v
);
...
...
h2/src/main/org/h2/jdbc/JdbcBlob.java
浏览文件 @
c9dd1fe3
...
...
@@ -70,9 +70,7 @@ public class JdbcBlob extends TraceObject implements Blob {
}
/**
* Truncates the object.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Truncates the object.
*/
public
void
truncate
(
long
len
)
throws
SQLException
{
debugCodeCall
(
"truncate"
,
len
);
...
...
@@ -112,9 +110,7 @@ public class JdbcBlob extends TraceObject implements Blob {
}
/**
* Sets some bytes of the object.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Sets some bytes of the object.
*/
public
int
setBytes
(
long
pos
,
byte
[]
bytes
)
throws
SQLException
{
debugCode
(
"setBytes("
+
pos
+
", bytes);"
);
...
...
@@ -122,9 +118,7 @@ public class JdbcBlob extends TraceObject implements Blob {
}
/**
* Sets some bytes of the object.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Sets some bytes of the object.
*/
public
int
setBytes
(
long
pos
,
byte
[]
bytes
,
int
offset
,
int
len
)
throws
SQLException
{
debugCode
(
"setBytes("
+
pos
+
", bytes, "
+
offset
+
", "
+
len
+
");"
);
...
...
@@ -142,9 +136,7 @@ public class JdbcBlob extends TraceObject implements Blob {
}
/**
* Returns an output stream.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Returns an output stream.
*/
public
OutputStream
setBinaryStream
(
long
pos
)
throws
SQLException
{
debugCodeCall
(
"setBinaryStream"
,
pos
);
...
...
@@ -152,9 +144,7 @@ public class JdbcBlob extends TraceObject implements Blob {
}
/**
* Searches a pattern and return the position.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Searches a pattern and return the position.
*/
public
long
position
(
byte
[]
pattern
,
long
start
)
throws
SQLException
{
debugCode
(
"position(pattern, "
+
start
+
");"
);
...
...
@@ -205,9 +195,7 @@ public class JdbcBlob extends TraceObject implements Blob {
}
/**
* Searches a pattern and return the position.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Searches a pattern and return the position.
*/
public
long
position
(
Blob
blobPattern
,
long
start
)
throws
SQLException
{
debugCode
(
"position(blobPattern, "
+
start
+
");"
);
...
...
@@ -246,9 +234,7 @@ public class JdbcBlob extends TraceObject implements Blob {
}
/**
* Returns the input stream, starting from an offset.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Returns the input stream, starting from an offset.
*/
public
InputStream
getBinaryStream
(
long
pos
,
long
length
)
throws
SQLException
{
debugCode
(
"getBinaryStream("
+
pos
+
", "
+
length
+
");"
);
...
...
h2/src/main/org/h2/jdbc/JdbcCallableStatement.java
浏览文件 @
c9dd1fe3
差异被折叠。
点击展开。
h2/src/main/org/h2/jdbc/JdbcClob.java
浏览文件 @
c9dd1fe3
...
...
@@ -38,6 +38,9 @@ public class JdbcClob extends TraceObject implements Clob
private
Value
value
;
private
JdbcConnection
conn
;
/**
* INTERNAL
*/
public
JdbcClob
(
SessionInterface
session
,
JdbcConnection
conn
,
Value
value
,
int
id
)
{
setTrace
(
session
.
getTrace
(),
TraceObject
.
CLOB
,
id
);
this
.
conn
=
conn
;
...
...
@@ -80,9 +83,7 @@ public class JdbcClob extends TraceObject implements Clob
}
/**
* Truncates the object.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Truncates the object.
*/
public
void
truncate
(
long
len
)
throws
SQLException
{
debugCodeCall
(
"truncate"
,
len
);
...
...
@@ -106,9 +107,7 @@ public class JdbcClob extends TraceObject implements Clob
}
/**
* Returns an output stream.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Returns an output stream.
*/
public
OutputStream
setAsciiStream
(
long
pos
)
throws
SQLException
{
debugCodeCall
(
"setAsciiStream"
,
pos
);
...
...
@@ -131,9 +130,7 @@ public class JdbcClob extends TraceObject implements Clob
}
/**
* Returns a writer.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Returns a writer starting from a given position.
*/
public
Writer
setCharacterStream
(
long
pos
)
throws
SQLException
{
debugCodeCall
(
"setCharacterStream"
,
pos
);
...
...
@@ -178,9 +175,7 @@ public class JdbcClob extends TraceObject implements Clob
}
/**
* Sets a substring.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Sets a substring.
*/
public
int
setString
(
long
pos
,
String
str
)
throws
SQLException
{
debugCode
(
"setString("
+
pos
+
", "
+
quote
(
str
)+
");"
);
...
...
@@ -188,9 +183,7 @@ public class JdbcClob extends TraceObject implements Clob
}
/**
* Sets a substring.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Sets a substring.
*/
public
int
setString
(
long
pos
,
String
str
,
int
offset
,
int
len
)
throws
SQLException
{
debugCode
(
"setString("
+
pos
+
", "
+
quote
(
str
)+
", "
+
offset
+
", "
+
len
+
");"
);
...
...
@@ -198,9 +191,7 @@ public class JdbcClob extends TraceObject implements Clob
}
/**
* Searches a pattern and return the position.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Searches a pattern and return the position.
*/
public
long
position
(
String
pattern
,
long
start
)
throws
SQLException
{
debugCode
(
"position("
+
quote
(
pattern
)+
", "
+
start
+
");"
);
...
...
@@ -208,9 +199,7 @@ public class JdbcClob extends TraceObject implements Clob
}
/**
* Searches a pattern and return the position.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Searches a pattern and return the position.
*/
public
long
position
(
Clob
clobPattern
,
long
start
)
throws
SQLException
{
debugCode
(
"position(clobPattern, "
+
start
+
");"
);
...
...
@@ -226,9 +215,7 @@ public class JdbcClob extends TraceObject implements Clob
}
/**
* Returns the reader, starting from an offset.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Returns the reader, starting from an offset.
*/
public
Reader
getCharacterStream
(
long
pos
,
long
length
)
throws
SQLException
{
debugCode
(
"getCharacterStream("
+
pos
+
", "
+
length
+
");"
);
...
...
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
c9dd1fe3
...
...
@@ -85,8 +85,7 @@ public class JdbcConnection extends TraceObject implements Connection {
* Creates a new statement.
*
* @return the new statement
* @throws SQLException
* if the connection is closed
* @throws SQLException if the connection is closed
*/
public
Statement
createStatement
()
throws
SQLException
{
try
{
...
...
@@ -307,22 +306,22 @@ public class JdbcConnection extends TraceObject implements Connection {
* if the connection is closed
*/
public
synchronized
boolean
getAutoCommit
()
throws
SQLException
{
try
{
checkClosed
();
debugCodeCall
(
"getAutoCommit"
);
return
getInternalAutoCommit
();
}
catch
(
Throwable
e
)
{
throw
logAndConvert
(
e
);
}
}
private
boolean
getInternalAutoCommit
()
throws
SQLException
{
try
{
checkClosed
();
getAutoCommit
=
prepareCommand
(
"CALL AUTOCOMMIT()"
,
getAutoCommit
);
ResultInterface
result
=
getAutoCommit
.
executeQuery
(
0
,
false
);
result
.
next
();
boolean
autocommit
=
result
.
currentRow
()[
0
].
getBoolean
().
booleanValue
();
result
.
close
();
return
autocommit
;
}
catch
(
Throwable
e
)
{
throw
logAndConvert
(
e
);
}
}
/**
...
...
@@ -374,7 +373,6 @@ public class JdbcConnection extends TraceObject implements Connection {
}
}
/**
* Translates a SQL statement into the database grammar.
*
...
...
@@ -652,9 +650,7 @@ public class JdbcConnection extends TraceObject implements Connection {
}
/**
* Sets the type map.
*
* @throws SQLException Unsupported Feature (SQL State 0A000) if the map is not empty
* [Partially supported] Sets the type map. This is only supported if the map is empty or null.
*/
public
void
setTypeMap
(
Map
map
)
throws
SQLException
{
try
{
...
...
@@ -771,7 +767,7 @@ public class JdbcConnection extends TraceObject implements Connection {
*
* @return the new savepoint
*/
//#ifdef JDK14
//#ifdef JDK14
public
Savepoint
setSavepoint
()
throws
SQLException
{
try
{
int
id
=
getNextId
(
TraceObject
.
SAVEPOINT
);
...
...
@@ -789,14 +785,14 @@ public class JdbcConnection extends TraceObject implements Connection {
throw
logAndConvert
(
e
);
}
}
//#endif
//#endif
/**
* Creates a new named savepoint.
*
* @return the new savepoint
*/
//#ifdef JDK14
//#ifdef JDK14
public
Savepoint
setSavepoint
(
String
name
)
throws
SQLException
{
try
{
int
id
=
getNextId
(
TraceObject
.
SAVEPOINT
);
...
...
@@ -813,12 +809,12 @@ public class JdbcConnection extends TraceObject implements Connection {
throw
logAndConvert
(
e
);
}
}
//#endif
//#endif
/**
* Rolls back to a savepoint.
*/
//#ifdef JDK14
//#ifdef JDK14
public
void
rollback
(
Savepoint
savepoint
)
throws
SQLException
{
try
{
JdbcSavepoint
sp
=
convertSavepoint
(
savepoint
);
...
...
@@ -829,12 +825,12 @@ public class JdbcConnection extends TraceObject implements Connection {
throw
logAndConvert
(
e
);
}
}
//#endif
//#endif
/**
* Releases a savepoint.
*/
//#ifdef JDK14
//#ifdef JDK14
public
void
releaseSavepoint
(
Savepoint
savepoint
)
throws
SQLException
{
try
{
debugCode
(
"releaseSavepoint(savepoint);"
);
...
...
@@ -851,7 +847,7 @@ public class JdbcConnection extends TraceObject implements Connection {
}
return
(
JdbcSavepoint
)
savepoint
;
}
//#endif
//#endif
/**
* Creates a prepared statement with the specified result set type, concurrency, and holdability.
...
...
@@ -1210,7 +1206,7 @@ public class JdbcConnection extends TraceObject implements Connection {
}
protected
void
finalize
()
{
if
(!
Constants
.
RUN_FINALIZE
RS
)
{
if
(!
Constants
.
RUN_FINALIZE
)
{
return
;
}
if
(
isInternal
)
{
...
...
@@ -1308,7 +1304,7 @@ public class JdbcConnection extends TraceObject implements Connection {
*
* @return the object
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public NClob createNClob() throws SQLException {
try {
...
...
@@ -1323,43 +1319,40 @@ public class JdbcConnection extends TraceObject implements Connection {
}
}
*/
//#endif
//#endif
/**
* Create a new empty SQLXML object.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Create a new empty SQLXML object.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public SQLXML createSQLXML() throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Create a new empty Array object.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Create a new empty Array object.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Create a new empty Struct object.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Create a new empty Struct object.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Returns true if this connection is still valid.
...
...
@@ -1380,72 +1373,66 @@ public class JdbcConnection extends TraceObject implements Connection {
}
/**
* Set a client property.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Set a client property.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public void setClientInfo(String name, String value) throws SQLClientInfoException {
throw new SQLClientInfoException();
}
*/
//#endif
//#endif
/**
* Set the client properties.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Set the client properties.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public void setClientInfo(Properties properties) throws SQLClientInfoException {
throw new SQLClientInfoException();
}
*/
//#endif
//#endif
/**
* Get the client properties.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Get the client properties.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public Properties getClientInfo() throws SQLClientInfoException {
throw new SQLClientInfoException();
}
*/
//#endif
//#endif
/**
* Set a client property.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Set a client property.
*/
public
String
getClientInfo
(
String
name
)
throws
SQLException
{
throw
Message
.
getUnsupportedException
();
}
/**
* Return an object of this class if possible.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Return an object of this class if possible.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public <T> T unwrap(Class<T> iface) throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Checks if unwrap can return an object of this class.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Checks if unwrap can return an object of this class.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
Value
createClob
(
Reader
x
,
long
length
)
throws
SQLException
{
if
(
x
==
null
)
{
...
...
h2/src/main/org/h2/jdbc/JdbcDatabaseMetaData.java
浏览文件 @
c9dd1fe3
...
...
@@ -2403,10 +2403,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* THIS FEATURE IS NOT SUPPORTED.
*
* @throws SQLException
* Unsupported Feature (SQL State 0A000)
* [Not supported]
*/
public
ResultSet
getSuperTypes
(
String
catalog
,
String
schemaPattern
,
String
typeNamePattern
)
throws
SQLException
{
...
...
@@ -2460,10 +2457,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* THIS FEATURE IS NOT SUPPORTED.
*
* @throws SQLException
* Unsupported Feature (SQL State 0A000)
* [Not supported]
*/
public
ResultSet
getAttributes
(
String
catalog
,
String
schemaPattern
,
String
typeNamePattern
,
String
attributeNamePattern
)
...
...
@@ -2599,18 +2593,17 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* Get the lifetime of a rowid.
* @return ROWID_UNSUPPORTED
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public RowIdLifetime getRowIdLifetime() {
debugCodeCall("getRowIdLifetime");
return RowIdLifetime.ROWID_UNSUPPORTED;
}
*/
//#endif
//#endif
/**
* Gets the list of schemas.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Gets the list of schemas.
*/
public
ResultSet
getSchemas
(
String
catalog
,
String
schemaPattern
)
throws
SQLException
{
debugCodeCall
(
"getSchemas"
);
...
...
@@ -2636,8 +2629,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* Returns the client info properties.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Returns the client info properties.
*/
public
ResultSet
getClientInfoProperties
()
throws
SQLException
{
debugCodeCall
(
"getClientInfoProperties"
);
...
...
@@ -2645,34 +2637,31 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* Return an object of this class if possible.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Return an object of this class if possible.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public <T> T unwrap(Class<T> iface) throws SQLException {
debugCodeCall("unwrap");
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Checks if unwrap can return an object of this class.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Checks if unwrap can return an object of this class.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public boolean isWrapperFor(Class<?> iface) throws SQLException {
debugCodeCall("isWrapperFor");
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Gets the list of function columns.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Gets the list of function columns.
*/
public
ResultSet
getFunctionColumns
(
String
catalog
,
String
schemaPattern
,
String
functionNamePattern
,
String
columnNamePattern
)
throws
SQLException
{
debugCodeCall
(
"getFunctionColumns"
);
...
...
@@ -2680,8 +2669,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
}
/**
* Gets the list of functions.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Gets the list of functions.
*/
public
ResultSet
getFunctions
(
String
arg0
,
String
arg1
,
String
arg2
)
throws
SQLException
{
debugCodeCall
(
"getFunctions"
);
...
...
h2/src/main/org/h2/jdbc/JdbcParameterMetaData.java
浏览文件 @
c9dd1fe3
...
...
@@ -186,29 +186,27 @@ implements ParameterMetaData
}
/**
* Return an object of this class if possible.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Return an object of this class if possible.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public <T> T unwrap(Class<T> iface) throws SQLException {
debugCodeCall("unwrap");
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Checks if unwrap can return an object of this class.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Checks if unwrap can return an object of this class.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public boolean isWrapperFor(Class<?> iface) throws SQLException {
debugCodeCall("isWrapperFor");
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
}
h2/src/main/org/h2/jdbc/JdbcPreparedStatement.java
浏览文件 @
c9dd1fe3
...
...
@@ -192,7 +192,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
ResultSet
executeQuery
(
String
sql
)
throws
SQLException
{
try
{
...
...
@@ -206,7 +206,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
void
addBatch
(
String
sql
)
throws
SQLException
{
try
{
...
...
@@ -220,7 +220,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
int
executeUpdate
(
String
sql
)
throws
SQLException
{
try
{
...
...
@@ -234,7 +234,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
boolean
execute
(
String
sql
)
throws
SQLException
{
try
{
...
...
@@ -557,9 +557,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
/**
* Sets the value of a column as a reference.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Sets the value of a column as a reference.
*/
public
void
setRef
(
int
parameterIndex
,
Ref
x
)
throws
SQLException
{
try
{
...
...
@@ -642,11 +640,8 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
/**
* This feature is deprecated and not supported.
*
* [Not supported] This feature is deprecated and not supported.
* @deprecated
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
*/
public
void
setUnicodeStream
(
int
parameterIndex
,
InputStream
x
,
int
length
)
throws
SQLException
{
try
{
...
...
@@ -774,9 +769,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
/**
* Sets the value of a parameter as a Array.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Sets the value of a parameter as a Array.
*/
public
void
setArray
(
int
parameterIndex
,
Array
x
)
throws
SQLException
{
try
{
...
...
@@ -943,9 +936,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
/**
* THIS FEATURE IS NOT SUPPORTED.
*
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported]
*/
public
void
setURL
(
int
parameterIndex
,
URL
x
)
throws
SQLException
{
try
{
...
...
@@ -959,7 +950,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
/**
* Gets the result set metadata of the query returned when the statement is executed.
*
[Not supported]
Gets the result set metadata of the query returned when the statement is executed.
*
* @return null as the method is not supported
* @throws SQLException if this object is closed
...
...
@@ -974,7 +965,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
}
/**
* Clears the batch.
*/
...
...
@@ -1083,7 +1073,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
int
executeUpdate
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
{
try
{
...
...
@@ -1100,7 +1090,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
int
executeUpdate
(
String
sql
,
int
[]
columnIndexes
)
throws
SQLException
{
try
{
...
...
@@ -1116,7 +1106,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
int
executeUpdate
(
String
sql
,
String
[]
columnNames
)
throws
SQLException
{
try
{
...
...
@@ -1132,7 +1122,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
boolean
execute
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
{
try
{
...
...
@@ -1148,7 +1138,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
boolean
execute
(
String
sql
,
int
[]
columnIndexes
)
throws
SQLException
{
try
{
...
...
@@ -1164,7 +1154,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/**
* Calling this method is not legal on a PreparedStatement.
*
* @throws SQLException Unsupported Feature
(SQL State 0A000)
* @throws SQLException Unsupported Feature
*/
public
boolean
execute
(
String
sql
,
String
[]
columnNames
)
throws
SQLException
{
try
{
...
...
@@ -1219,16 +1209,15 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
/**
* Sets the value of a parameter as a row id.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Sets the value of a parameter as a row id.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public void setRowId(int parameterIndex, RowId x) throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Sets the value of a parameter.
...
...
@@ -1288,7 +1277,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* @param x the value
* @throws SQLException if this object is closed
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public void setNClob(int parameterIndex, NClob x) throws SQLException {
try {
...
...
@@ -1308,7 +1297,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
}
*/
//#endif
//#endif
/**
* Sets the value of a parameter as a Clob.
...
...
@@ -1391,15 +1380,14 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
}
/**
* Sets the value of a parameter as a SQLXML object.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Sets the value of a parameter as a SQLXML object.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public void setSQLXML(int parameterIndex, SQLXML x) throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
}
h2/src/main/org/h2/jdbc/JdbcResultSet.java
浏览文件 @
c9dd1fe3
差异被折叠。
点击展开。
h2/src/main/org/h2/jdbc/JdbcResultSetMetaData.java
浏览文件 @
c9dd1fe3
...
...
@@ -406,29 +406,27 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
}
/**
* Return an object of this class if possible.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Return an object of this class if possible.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public <T> T unwrap(Class<T> iface) throws SQLException {
debugCodeCall("unwrap");
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Checks if unwrap can return an object of this class.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Checks if unwrap can return an object of this class.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public boolean isWrapperFor(Class<?> iface) throws SQLException {
debugCodeCall("isWrapperFor");
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
}
h2/src/main/org/h2/jdbc/JdbcStatement.java
浏览文件 @
c9dd1fe3
...
...
@@ -91,7 +91,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occured or a
* @throws SQLException if a database error occur
r
ed or a
* select statement was executed
*/
public
int
executeUpdate
(
String
sql
)
throws
SQLException
{
...
...
@@ -487,7 +487,7 @@ public class JdbcStatement extends TraceObject implements Statement {
}
/**
* Cancels a currently running statement.
*
[Partially supported]
Cancels a currently running statement.
* This method must be called from within another
* thread than the execute method.
* This method is not supported in the server mode.
...
...
@@ -636,8 +636,7 @@ public class JdbcStatement extends TraceObject implements Statement {
}
/**
* THIS FEATURE IS NOT SUPPORTED.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported]
*/
public
boolean
getMoreResults
(
int
current
)
throws
SQLException
{
try
{
...
...
@@ -656,7 +655,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occured or a
* @throws SQLException if a database error occur
r
ed or a
* select statement was executed
*/
public
int
executeUpdate
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
{
...
...
@@ -678,7 +677,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occured or a
* @throws SQLException if a database error occur
r
ed or a
* select statement was executed
*/
public
int
executeUpdate
(
String
sql
,
int
[]
columnIndexes
)
throws
SQLException
{
...
...
@@ -700,7 +699,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occured or a
* @throws SQLException if a database error occur
r
ed or a
* select statement was executed
*/
public
int
executeUpdate
(
String
sql
,
String
[]
columnNames
)
throws
SQLException
{
...
...
@@ -722,7 +721,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occured or a
* @throws SQLException if a database error occur
r
ed or a
* select statement was executed
*/
public
boolean
execute
(
String
sql
,
int
autoGeneratedKeys
)
throws
SQLException
{
...
...
@@ -744,7 +743,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occured or a
* @throws SQLException if a database error occur
r
ed or a
* select statement was executed
*/
public
boolean
execute
(
String
sql
,
int
[]
columnIndexes
)
throws
SQLException
{
...
...
@@ -766,7 +765,7 @@ public class JdbcStatement extends TraceObject implements Statement {
* @return the update count (number of row affected by an insert,
* update or delete, or 0 if no rows or the statement was a
* create, drop, commit or rollback)
* @throws SQLException if a database error occured or a
* @throws SQLException if a database error occur
r
ed or a
* select statement was executed
*/
public
boolean
execute
(
String
sql
,
String
[]
columnNames
)
throws
SQLException
{
...
...
@@ -847,28 +846,26 @@ public class JdbcStatement extends TraceObject implements Statement {
}
/**
* Return an object of this class if possible.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Return an object of this class if possible.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public <T> T unwrap(Class<T> iface) throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Checks if unwrap can return an object of this class.
* @throws SQLException Unsupported Feature (SQL State 0A000)
* [Not supported] Checks if unwrap can return an object of this class.
*/
//#ifdef JDK16
//#ifdef JDK16
/*
public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw Message.getUnsupportedException();
}
*/
//#endif
//#endif
/**
* Returns whether this object is poolable.
...
...
@@ -892,7 +889,7 @@ public class JdbcStatement extends TraceObject implements Statement {
}
// public void finalize() {
// if(!
Database.RUN_FINALIZERS
) {
// if(!
Constants.RUN_FINALIZE
) {
// return;
// }
// closeOld();
...
...
h2/src/main/org/h2/jdbcx/JdbcConnectionListener.java
浏览文件 @
c9dd1fe3
...
...
@@ -10,8 +10,8 @@ import org.h2.jdbc.JdbcConnection;
public
interface
JdbcConnectionListener
{
// TODO pooled connection: make sure fatalErrorOccured is called in the right situations
void
fatalErrorOccured
(
JdbcConnection
conn
,
SQLException
e
)
throws
SQLException
;
// TODO pooled connection: make sure fatalErrorOccur
r
ed is called in the right situations
void
fatalErrorOccur
r
ed
(
JdbcConnection
conn
,
SQLException
e
)
throws
SQLException
;
void
closed
(
JdbcConnection
conn
);
}
h2/src/main/org/h2/jdbcx/JdbcDataSource.java
浏览文件 @
c9dd1fe3
...
...
@@ -52,8 +52,8 @@ Serializable, Referenceable {
private
String
url
=
""
;
public
JdbcDataSource
()
{
int
id
=
getNextId
(
TraceObject
.
DATASOURCE
);
setTrace
(
factory
.
getTrace
(),
TraceObject
.
DATASOURCE
,
id
);
int
id
=
getNextId
(
TraceObject
.
DATA
_
SOURCE
);
setTrace
(
factory
.
getTrace
(),
TraceObject
.
DATA
_
SOURCE
,
id
);
}
public
int
getLoginTimeout
()
throws
SQLException
{
...
...
@@ -138,13 +138,13 @@ Serializable, Referenceable {
//#ifdef JDK14
public
XAConnection
getXAConnection
()
throws
SQLException
{
debugCodeCall
(
"getXAConnection"
);
int
id
=
getNextId
(
XA_DATASOURCE
);
int
id
=
getNextId
(
XA_DATA
_
SOURCE
);
return
new
JdbcXAConnection
(
factory
,
id
,
url
,
user
,
password
);
}
public
XAConnection
getXAConnection
(
String
user
,
String
password
)
throws
SQLException
{
debugCode
(
"getXAConnection("
+
quote
(
user
)+
", "
+
quote
(
password
)+
");"
);
int
id
=
getNextId
(
XA_DATASOURCE
);
int
id
=
getNextId
(
XA_DATA
_
SOURCE
);
return
new
JdbcXAConnection
(
factory
,
id
,
url
,
user
,
password
);
}
...
...
h2/src/main/org/h2/jdbcx/JdbcXAConnection.java
浏览文件 @
c9dd1fe3
...
...
@@ -45,7 +45,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
JdbcXAConnection
(
JdbcDataSourceFactory
factory
,
int
id
,
String
url
,
String
user
,
String
password
)
{
this
.
factory
=
factory
;
setTrace
(
factory
.
getTrace
(),
TraceObject
.
XA_DATASOURCE
,
id
);
setTrace
(
factory
.
getTrace
(),
TraceObject
.
XA_DATA
_
SOURCE
,
id
);
this
.
url
=
url
;
this
.
user
=
user
;
this
.
password
=
password
;
...
...
@@ -85,8 +85,8 @@ implements XAConnection, XAResource, JdbcConnectionListener
listeners
.
remove
(
listener
);
}
public
void
fatalErrorOccured
(
JdbcConnection
conn
,
SQLException
e
)
throws
SQLException
{
debugCode
(
"fatalErrorOccured(conn, e)"
);
public
void
fatalErrorOccur
r
ed
(
JdbcConnection
conn
,
SQLException
e
)
throws
SQLException
{
debugCode
(
"fatalErrorOccur
r
ed(conn, e)"
);
for
(
int
i
=
0
;
i
<
listeners
.
size
();
i
++)
{
ConnectionEventListener
listener
=
(
ConnectionEventListener
)
listeners
.
get
(
i
);
ConnectionEvent
event
=
new
ConnectionEvent
(
this
,
e
);
...
...
h2/src/main/org/h2/message/Message.java
浏览文件 @
c9dd1fe3
...
...
@@ -68,12 +68,12 @@ public class Message {
}
public
static
SQLException
getSyntaxError
(
String
sql
,
int
index
)
{
sql
=
StringUtils
.
addAsteri
x
(
sql
,
index
);
sql
=
StringUtils
.
addAsteri
sk
(
sql
,
index
);
return
Message
.
getSQLException
(
Message
.
SYNTAX_ERROR_1
,
sql
);
}
public
static
SQLException
getSyntaxError
(
String
sql
,
int
index
,
String
expected
)
{
sql
=
StringUtils
.
addAsteri
x
(
sql
,
index
);
sql
=
StringUtils
.
addAsteri
sk
(
sql
,
index
);
return
Message
.
getSQLException
(
Message
.
SYNTAX_ERROR_2
,
new
String
[]{
sql
,
expected
},
null
);
}
...
...
@@ -232,7 +232,7 @@ public class Message {
public
static
final
int
MUST_GROUP_BY_COLUMN_1
=
90016
;
public
static
final
int
SECOND_PRIMARY_KEY
=
90017
;
public
static
final
int
TRACE_CONNECTION_NOT_CLOSED
=
90018
;
public
static
final
int
CANT_DROP_CURRENT_USER
=
90019
;
public
static
final
int
CAN
NO
T_DROP_CURRENT_USER
=
90019
;
public
static
final
int
DATABASE_ALREADY_OPEN_1
=
90020
;
public
static
final
int
DATA_CONVERSION_ERROR_1
=
90021
;
public
static
final
int
FUNCTION_NOT_FOUND_1
=
90022
;
...
...
@@ -297,7 +297,7 @@ public class Message {
public
static
final
int
COLUMN_CONTAINS_NULL_VALUES_1
=
90081
;
public
static
final
int
SEQUENCE_BELONGS_TO_A_TABLE_1
=
90082
;
public
static
final
int
COLUMN_MAY_BE_REFERENCED_1
=
90083
;
public
static
final
int
CANT_DROP_LAST_COLUMN
=
90084
;
public
static
final
int
CAN
NO
T_DROP_LAST_COLUMN
=
90084
;
public
static
final
int
INDEX_BELONGS_TO_CONSTRAINT_1
=
90085
;
public
static
final
int
CLASS_NOT_FOUND_1
=
90086
;
public
static
final
int
METHOD_NOT_FOUND_1
=
90087
;
...
...
@@ -319,8 +319,8 @@ public class Message {
public
static
final
int
UNSUPPORTED_COMPRESSION_ALGORITHM_1
=
90103
;
public
static
final
int
COMPRESSION_ERROR
=
90104
;
private
static
final
int
EXCEPTION_IN_FUNCTION
=
90105
;
public
static
final
int
CANT_TRUNCATE_1
=
90106
;
public
static
final
int
CANT_DROP_2
=
90107
;
public
static
final
int
CAN
NO
T_TRUNCATE_1
=
90106
;
public
static
final
int
CAN
NO
T_DROP_2
=
90107
;
public
static
final
int
STACK_OVERFLOW
=
90108
;
public
static
final
int
VIEW_IS_INVALID_1
=
90109
;
public
static
final
int
OVERFLOW_FOR_TYPE_1
=
90110
;
...
...
@@ -331,14 +331,15 @@ public class Message {
public
static
final
int
CONSTANT_NOT_FOUND_1
=
90115
;
public
static
final
int
LITERALS_ARE_NOT_ALLOWED
=
90116
;
public
static
final
int
REMOTE_CONNECTION_NOT_ALLOWED
=
90117
;
public
static
final
int
CANT_DROP_TABLE_1
=
90118
;
public
static
final
int
CAN
NO
T_DROP_TABLE_1
=
90118
;
public
static
final
int
USER_DATA_TYPE_ALREADY_EXISTS_1
=
90119
;
public
static
final
int
USER_DATA_TYPE_NOT_FOUND_1
=
90120
;
public
static
final
int
DATABASE_CALLED_AT_SHUTDOWN
=
90121
;
public
static
final
int
OPERATION_NOT_SUPPORTED_WITH_VIEWS_2
=
90122
;
public
static
final
int
CANT_MIX_INDEXED_AND_UNINDEXED_PARAMS
=
90123
;
public
static
final
int
CAN
NO
T_MIX_INDEXED_AND_UNINDEXED_PARAMS
=
90123
;
public
static
final
int
FILE_NOT_FOUND_1
=
90124
;
public
static
final
int
INVALID_CLASS_2
=
90125
;
public
static
final
int
DATABASE_IS_NOT_PERSISTENT
=
90126
;
public
static
SQLException
addSQL
(
SQLException
e
,
String
sql
)
{
if
(
e
.
getMessage
().
indexOf
(
"SQL"
)>=
0
)
{
...
...
h2/src/main/org/h2/message/TraceObject.java
浏览文件 @
c9dd1fe3
...
...
@@ -13,17 +13,12 @@ import java.sql.SQLException;
import
org.h2.engine.Constants
;
import
org.h2.util.StringUtils
;
/**
*
* @author tgdmuth6
*
*/
public
class
TraceObject
{
public
static
final
int
CALLABLE_STATEMENT
=
0
,
CONNECTION
=
1
,
DATABASE_META_DATA
=
2
,
PREPARED_STATEMENT
=
3
,
RESULT_SET
=
4
,
RESULT_SET_META_DATA
=
5
,
SAVEPOINT
=
6
,
SQL_EXCEPTION
=
7
,
STATEMENT
=
8
,
BLOB
=
9
,
CLOB
=
10
,
PARAMETER_META_DATA
=
11
;
public
static
final
int
DATA
SOURCE
=
12
,
XA_DATA
SOURCE
=
13
,
XID
=
14
;
public
static
final
int
DATA
_SOURCE
=
12
,
XA_DATA_
SOURCE
=
13
,
XID
=
14
;
private
static
int
LAST
=
XID
+
1
;
private
Trace
trace
;
...
...
h2/src/main/org/h2/message/TraceSystem.java
浏览文件 @
c9dd1fe3
...
...
@@ -218,7 +218,7 @@ public class TraceSystem {
}
protected
void
finalize
()
{
if
(!
Constants
.
RUN_FINALIZE
RS
)
{
if
(!
Constants
.
RUN_FINALIZE
)
{
return
;
}
close
();
...
...
h2/src/main/org/h2/res/help.csv
浏览文件 @
c9dd1fe3
...
...
@@ -533,6 +533,7 @@ Removes all rows from a table.
Other than DELETE FROM without where clause, this command can not be rolled back.
This command is faster than DELETE without where clause.
Only regular data tables without foreign key constraints can be truncated.
This command commits an open transaction.
","
TRUNCATE TABLE TEST
"
...
...
@@ -2371,22 +2372,24 @@ CURRVAL('TESTSEQ')
"
"Functions (System)","CSVREAD","
CSVREAD(fileNameString [, columnNamesString [, charsetString]]): resultSet
CSVREAD(fileNameString [, columnNamesString [, charsetString
[, fieldSeparator]
]]): resultSet
","
Returns the result set of reading the CSV (comma separated values) file.
If the column names are specified (a comma separated list of column names),
those are used they are read from the file, otherwise (or if they are set to NULL) the first line
of the file is interpreted as the column names.
The default charset is the default value for this system, and the default field separator is a comma.
Admin rights are required to execute this command.
","
CALL CSVREAD('test.csv')
"
"Functions (System)","CSVWRITE","
CSVWRITE(fileNameString, queryString [, charsetString]): null
CSVWRITE(fileNameString, queryString [, charsetString
[, fieldSeparator]
]): null
","
Writes a CSV (comma separated values).
The file is overwritten if it exists.
The default charset is the default value for this system, and the default field separator is a comma.
Admin rights are required to execute this command.
","
CALL CSVWRITE('test.csv', 'SELECT * FROM TEST')
...
...
h2/src/main/org/h2/res/messages.properties
浏览文件 @
c9dd1fe3
...
...
@@ -146,6 +146,7 @@
90123
=
Cannot mix indexed and non-indexed parameters
90124
=
File not found: {0}
90125
=
Invalid class, expected {0} but got {1}
90126
=
Database is not persistent
HY000
=
General error: {0}
HY004
=
Unknown data type: {0}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论