Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
54385eb0
提交
54385eb0
authored
17 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
b6a44c99
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
28 行增加
和
37 行删除
+28
-37
index.html
h2/src/docsrc/javadoc/index.html
+1
-1
ScriptBase.java
h2/src/main/org/h2/command/dml/ScriptBase.java
+1
-1
WebServer.java
h2/src/main/org/h2/server/web/WebServer.java
+10
-0
main.jsp
h2/src/main/org/h2/server/web/res/main.jsp
+0
-29
Shell.java
h2/src/main/org/h2/tools/Shell.java
+15
-4
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+1
-2
没有找到文件。
h2/src/docsrc/javadoc/index.html
浏览文件 @
54385eb0
...
@@ -9,7 +9,7 @@ Initial Developer: H2 Group
...
@@ -9,7 +9,7 @@ Initial Developer: H2 Group
<title>
H2 Documentation
</title>
<title>
H2 Documentation
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"stylesheet.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"stylesheet.css"
/>
</head>
</head>
<frameset
cols=
"1
85
,*"
rows=
"*"
frameborder=
"2"
framespacing=
"4"
border=
"4"
>
<frameset
cols=
"1
94
,*"
rows=
"*"
frameborder=
"2"
framespacing=
"4"
border=
"4"
>
<frame
frameborder=
"0"
marginheight=
"0"
marginwidth=
"0"
src=
"classes.html"
name=
"classes"
/>
<frame
frameborder=
"0"
marginheight=
"0"
marginwidth=
"0"
src=
"classes.html"
name=
"classes"
/>
<frame
frameborder=
"0"
marginheight=
"0"
marginwidth=
"0"
src=
"overview.html"
name=
"javadoc"
/>
<frame
frameborder=
"0"
marginheight=
"0"
marginwidth=
"0"
src=
"overview.html"
name=
"javadoc"
/>
</frameset>
</frameset>
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/command/dml/ScriptBase.java
浏览文件 @
54385eb0
...
@@ -79,7 +79,7 @@ public abstract class ScriptBase extends Prepared implements DataHandler {
...
@@ -79,7 +79,7 @@ public abstract class ScriptBase extends Prepared implements DataHandler {
}
}
protected
String
getFileName
()
throws
SQLException
{
protected
String
getFileName
()
throws
SQLException
{
if
(
file
!=
null
)
{
if
(
file
Name
!=
null
)
{
fileName
=
file
==
null
?
null
:
file
.
getValue
(
session
).
getString
();
fileName
=
file
==
null
?
null
:
file
.
getValue
(
session
).
getString
();
if
(
fileName
==
null
||
fileName
.
trim
().
length
()
==
0
)
{
if
(
fileName
==
null
||
fileName
.
trim
().
length
()
==
0
)
{
fileName
=
"script.sql"
;
fileName
=
"script.sql"
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/server/web/WebServer.java
浏览文件 @
54385eb0
...
@@ -19,10 +19,12 @@ import java.util.Collections;
...
@@ -19,10 +19,12 @@ import java.util.Collections;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Locale
;
import
java.util.Locale
;
import
java.util.Properties
;
import
java.util.Properties
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.TimeZone
;
import
java.util.TimeZone
;
import
java.util.Map.Entry
;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.constant.SysProperties
;
import
org.h2.constant.SysProperties
;
...
@@ -353,6 +355,14 @@ public class WebServer implements Service {
...
@@ -353,6 +355,14 @@ public class WebServer implements Service {
byte
[]
trans
=
getFile
(
"_text_"
+
language
+
".properties"
);
byte
[]
trans
=
getFile
(
"_text_"
+
language
+
".properties"
);
trace
(
" "
+
new
String
(
trans
));
trace
(
" "
+
new
String
(
trans
));
text
.
load
(
new
ByteArrayInputStream
(
trans
));
text
.
load
(
new
ByteArrayInputStream
(
trans
));
// remove starting # (if not translated yet)
for
(
Iterator
it
=
text
.
entrySet
().
iterator
();
it
.
hasNext
();)
{
Entry
entry
=
(
Entry
)
it
.
next
();
String
value
=
(
String
)
entry
.
getValue
();
if
(
value
.
startsWith
(
"#"
))
{
entry
.
setValue
(
value
.
substring
(
1
));
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
TraceSystem
.
traceThrowable
(
e
);
TraceSystem
.
traceThrowable
(
e
);
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/server/web/res/main.jsp
deleted
100644 → 0
浏览文件 @
b6a44c99
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html><head>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/>
<title>
${text.a.title}
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"stylesheet.css"
/>
<script
type=
"text/javascript"
>
<!--
if
(
self
!=
top
)
{
top
.
location
=
"main.jsp"
;
}
//-->
</script>
</head>
<body
margin=
"10"
>
<h1>
Welcome to H2
</h1>
<h2><a
href=
"index.jsp"
>
Connect
</a></h2>
Login to a database.
<h2><a
href=
"docs.jsp"
>
Documentation
</a></h2>
View the online documentation.
<h2><a
href=
"admin.jsp"
>
Preferences
</a></h2>
Allows to you to view and change server settings.
</body></html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/tools/Shell.java
浏览文件 @
54385eb0
...
@@ -155,8 +155,10 @@ public class Shell {
...
@@ -155,8 +155,10 @@ public class Shell {
if
(
tableName
.
length
()
==
0
)
{
if
(
tableName
.
length
()
==
0
)
{
out
.
println
(
"Usage: describe <table name>"
);
out
.
println
(
"Usage: describe <table name>"
);
}
else
{
}
else
{
PreparedStatement
prep
=
null
;
ResultSet
rs
=
null
;
try
{
try
{
PreparedStatement
prep
=
conn
.
prepareStatement
(
prep
=
conn
.
prepareStatement
(
"SELECT CAST(COLUMN_NAME AS VARCHAR(32)) \"Column Name\", "
+
"SELECT CAST(COLUMN_NAME AS VARCHAR(32)) \"Column Name\", "
+
"CAST(TYPE_NAME AS VARCHAR(14)) \"Type\", "
+
"CAST(TYPE_NAME AS VARCHAR(14)) \"Type\", "
+
"NUMERIC_PRECISION \"Precision\", "
+
"NUMERIC_PRECISION \"Precision\", "
+
...
@@ -165,22 +167,28 @@ public class Shell {
...
@@ -165,22 +167,28 @@ public class Shell {
"FROM INFORMATION_SCHEMA.COLUMNS "
+
"FROM INFORMATION_SCHEMA.COLUMNS "
+
"WHERE UPPER(TABLE_NAME)=? ORDER BY ORDINAL_POSITION"
);
"WHERE UPPER(TABLE_NAME)=? ORDER BY ORDINAL_POSITION"
);
prep
.
setString
(
1
,
tableName
.
toUpperCase
());
prep
.
setString
(
1
,
tableName
.
toUpperCase
());
ResultSet
rs
=
prep
.
executeQuery
();
rs
=
prep
.
executeQuery
();
printResult
(
rs
,
false
);
printResult
(
rs
,
false
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
out
.
println
(
"Exception: "
+
e
.
toString
());
out
.
println
(
"Exception: "
+
e
.
toString
());
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
JdbcUtils
.
closeSilently
(
rs
);
JdbcUtils
.
closeSilently
(
prep
);
}
}
}
}
}
else
if
(
upper
.
startsWith
(
"SHOW"
))
{
}
else
if
(
upper
.
startsWith
(
"SHOW"
))
{
ResultSet
rs
=
null
;
try
{
try
{
ResultSet
rs
=
stat
.
executeQuery
(
rs
=
stat
.
executeQuery
(
"SELECT CAST(TABLE_SCHEMA AS VARCHAR(32)) \"Schema\", TABLE_NAME \"Table Name\" "
+
"SELECT CAST(TABLE_SCHEMA AS VARCHAR(32)) \"Schema\", TABLE_NAME \"Table Name\" "
+
"FROM INFORMATION_SCHEMA.TABLES ORDER BY TABLE_SCHEMA, TABLE_NAME"
);
"FROM INFORMATION_SCHEMA.TABLES ORDER BY TABLE_SCHEMA, TABLE_NAME"
);
printResult
(
rs
,
false
);
printResult
(
rs
,
false
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
out
.
println
(
"Exception: "
+
e
.
toString
());
out
.
println
(
"Exception: "
+
e
.
toString
());
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
JdbcUtils
.
closeSilently
(
rs
);
}
}
}
else
if
(
upper
.
startsWith
(
"MAXWIDTH"
))
{
}
else
if
(
upper
.
startsWith
(
"MAXWIDTH"
))
{
upper
=
upper
.
substring
(
"MAXWIDTH"
.
length
()).
trim
();
upper
=
upper
.
substring
(
"MAXWIDTH"
.
length
()).
trim
();
...
@@ -322,9 +330,10 @@ public class Shell {
...
@@ -322,9 +330,10 @@ public class Shell {
out
.
println
(
"Error: "
+
e
.
toString
());
out
.
println
(
"Error: "
+
e
.
toString
());
return
;
return
;
}
}
ResultSet
rs
=
null
;
try
{
try
{
if
(
result
)
{
if
(
result
)
{
ResultSet
rs
=
stat
.
getResultSet
();
rs
=
stat
.
getResultSet
();
int
rowCount
=
printResult
(
rs
,
listMode
);
int
rowCount
=
printResult
(
rs
,
listMode
);
time
=
System
.
currentTimeMillis
()
-
time
;
time
=
System
.
currentTimeMillis
()
-
time
;
out
.
println
(
"("
+
rowCount
+
(
rowCount
==
1
?
" row, "
:
" rows, "
)
+
time
+
" ms)"
);
out
.
println
(
"("
+
rowCount
+
(
rowCount
==
1
?
" row, "
:
" rows, "
)
+
time
+
" ms)"
);
...
@@ -336,6 +345,8 @@ public class Shell {
...
@@ -336,6 +345,8 @@ public class Shell {
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
out
.
println
(
"Error: "
+
e
.
toString
());
out
.
println
(
"Error: "
+
e
.
toString
());
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
JdbcUtils
.
closeSilently
(
rs
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
54385eb0
...
@@ -159,8 +159,7 @@ java org.h2.test.TestAll timer
...
@@ -159,8 +159,7 @@ java org.h2.test.TestAll timer
/*
/*
Fix ScriptBase.getFileName()
Shell.java 159 (close PreparedStatement)
Fix Shell.java 159 (close PreparedStatement)
Browser problems:
Browser problems:
There has been a reported incompatibility with the
There has been a reported incompatibility with the
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论