Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
22dc3316
提交
22dc3316
authored
1月 29, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Less classes are loaded when using the database in embedded mode.
上级
bd83d25e
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
13 行删除
+18
-13
SysProperties.java
h2/src/main/org/h2/constant/SysProperties.java
+3
-6
CompareLike.java
h2/src/main/org/h2/expression/CompareLike.java
+7
-2
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+7
-2
JdbcStatement.java
h2/src/main/org/h2/jdbc/JdbcStatement.java
+1
-3
没有找到文件。
h2/src/main/org/h2/constant/SysProperties.java
浏览文件 @
22dc3316
...
@@ -184,7 +184,7 @@ public class SysProperties {
...
@@ -184,7 +184,7 @@ public class SysProperties {
* The default escape character for LIKE comparisons. To select no escape
* The default escape character for LIKE comparisons. To select no escape
* character, use an empty string.
* character, use an empty string.
*/
*/
public
static
final
Character
DEFAULT_ESCAPE_CHAR
=
getEscapeChar
(
getStringSetting
(
"h2.defaultEscape"
,
"\\"
)
);
public
static
final
String
DEFAULT_ESCAPE
=
getStringSetting
(
"h2.defaultEscape"
,
"\\"
);
/**
/**
* System property <code>h2.defaultMaxOperationMemory</code> (default:
* System property <code>h2.defaultMaxOperationMemory</code> (default:
...
@@ -743,7 +743,8 @@ public class SysProperties {
...
@@ -743,7 +743,8 @@ public class SysProperties {
private
static
String
getProperty
(
String
name
)
{
private
static
String
getProperty
(
String
name
)
{
try
{
try
{
return
System
.
getProperty
(
name
);
return
System
.
getProperty
(
name
);
}
catch
(
SecurityException
e
)
{
}
catch
(
Exception
e
)
{
// SecurityException
// applets may not do that - ignore
// applets may not do that - ignore
return
null
;
return
null
;
}
}
...
@@ -835,8 +836,4 @@ public class SysProperties {
...
@@ -835,8 +836,4 @@ public class SysProperties {
return
getBooleanSetting
(
H2_PAGE_STORE
,
PAGE_STORE
);
return
getBooleanSetting
(
H2_PAGE_STORE
,
PAGE_STORE
);
}
}
private
static
Character
getEscapeChar
(
String
s
)
{
return
s
==
null
||
s
.
length
()
==
0
?
null
:
s
.
charAt
(
0
);
}
}
}
h2/src/main/org/h2/expression/CompareLike.java
浏览文件 @
22dc3316
...
@@ -29,6 +29,7 @@ import org.h2.value.ValueString;
...
@@ -29,6 +29,7 @@ import org.h2.value.ValueString;
public
class
CompareLike
extends
Condition
{
public
class
CompareLike
extends
Condition
{
private
static
final
int
MATCH
=
0
,
ONE
=
1
,
ANY
=
2
;
private
static
final
int
MATCH
=
0
,
ONE
=
1
,
ANY
=
2
;
private
static
final
Character
DEFAULT_ESCAPE_CHAR
=
getEscapeChar
(
SysProperties
.
DEFAULT_ESCAPE
);
private
final
CompareMode
compareMode
;
private
final
CompareMode
compareMode
;
private
Expression
left
;
private
Expression
left
;
...
@@ -57,6 +58,10 @@ public class CompareLike extends Condition {
...
@@ -57,6 +58,10 @@ public class CompareLike extends Condition {
this
.
escape
=
escape
;
this
.
escape
=
escape
;
}
}
private
static
Character
getEscapeChar
(
String
s
)
{
return
s
==
null
||
s
.
length
()
==
0
?
null
:
s
.
charAt
(
0
);
}
public
String
getSQL
()
{
public
String
getSQL
()
{
String
sql
;
String
sql
;
if
(
regexp
)
{
if
(
regexp
)
{
...
@@ -121,12 +126,12 @@ public class CompareLike extends Condition {
...
@@ -121,12 +126,12 @@ public class CompareLike extends Condition {
private
Character
getEscapeChar
(
Value
e
)
throws
SQLException
{
private
Character
getEscapeChar
(
Value
e
)
throws
SQLException
{
if
(
e
==
null
)
{
if
(
e
==
null
)
{
return
SysProperties
.
DEFAULT_ESCAPE_CHAR
;
return
DEFAULT_ESCAPE_CHAR
;
}
}
String
es
=
e
.
getString
();
String
es
=
e
.
getString
();
Character
esc
;
Character
esc
;
if
(
es
==
null
)
{
if
(
es
==
null
)
{
esc
=
SysProperties
.
DEFAULT_ESCAPE_CHAR
;
esc
=
DEFAULT_ESCAPE_CHAR
;
}
else
if
(
es
.
length
()
==
0
)
{
}
else
if
(
es
.
length
()
==
0
)
{
esc
=
null
;
esc
=
null
;
}
else
if
(
es
.
length
()
>
1
)
{
}
else
if
(
es
.
length
()
>
1
)
{
...
...
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
22dc3316
...
@@ -1419,9 +1419,14 @@ public class JdbcConnection extends TraceObject implements Connection {
...
@@ -1419,9 +1419,14 @@ public class JdbcConnection extends TraceObject implements Connection {
executingStatement
=
stat
;
executingStatement
=
stat
;
}
}
ResultInterface
getGeneratedKeys
()
throws
SQLException
{
/**
* INTERNAL
*/
ResultSet
getGeneratedKeys
(
JdbcStatement
stat
,
int
id
)
throws
SQLException
{
getGeneratedKeys
=
prepareCommand
(
"CALL SCOPE_IDENTITY()"
,
getGeneratedKeys
);
getGeneratedKeys
=
prepareCommand
(
"CALL SCOPE_IDENTITY()"
,
getGeneratedKeys
);
return
getGeneratedKeys
.
executeQuery
(
0
,
false
);
ResultInterface
result
=
getGeneratedKeys
.
executeQuery
(
0
,
false
);
ResultSet
rs
=
new
JdbcResultSet
(
this
,
stat
,
result
,
id
,
false
,
true
,
false
);
return
rs
;
}
}
/**
/**
...
...
h2/src/main/org/h2/jdbc/JdbcStatement.java
浏览文件 @
22dc3316
...
@@ -661,9 +661,7 @@ public class JdbcStatement extends TraceObject implements Statement {
...
@@ -661,9 +661,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeAssign
(
"ResultSet"
,
TraceObject
.
RESULT_SET
,
id
,
"getGeneratedKeys()"
);
debugCodeAssign
(
"ResultSet"
,
TraceObject
.
RESULT_SET
,
id
,
"getGeneratedKeys()"
);
}
}
checkClosed
();
checkClosed
();
ResultInterface
result
=
conn
.
getGeneratedKeys
();
return
conn
.
getGeneratedKeys
(
this
,
id
);
ResultSet
rs
=
new
JdbcResultSet
(
conn
,
this
,
result
,
id
,
false
,
true
,
false
);
return
rs
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
logAndConvert
(
e
);
throw
logAndConvert
(
e
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论