Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
54385eb0
提交
54385eb0
authored
3月 31, 2008
作者:
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
<title>
H2 Documentation
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"stylesheet.css"
/>
</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=
"overview.html"
name=
"javadoc"
/>
</frameset>
...
...
h2/src/main/org/h2/command/dml/ScriptBase.java
浏览文件 @
54385eb0
...
...
@@ -79,7 +79,7 @@ public abstract class ScriptBase extends Prepared implements DataHandler {
}
protected
String
getFileName
()
throws
SQLException
{
if
(
file
!=
null
)
{
if
(
file
Name
!=
null
)
{
fileName
=
file
==
null
?
null
:
file
.
getValue
(
session
).
getString
();
if
(
fileName
==
null
||
fileName
.
trim
().
length
()
==
0
)
{
fileName
=
"script.sql"
;
...
...
h2/src/main/org/h2/server/web/WebServer.java
浏览文件 @
54385eb0
...
...
@@ -19,10 +19,12 @@ import java.util.Collections;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Locale
;
import
java.util.Properties
;
import
java.util.Set
;
import
java.util.TimeZone
;
import
java.util.Map.Entry
;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.constant.SysProperties
;
...
...
@@ -353,6 +355,14 @@ public class WebServer implements Service {
byte
[]
trans
=
getFile
(
"_text_"
+
language
+
".properties"
);
trace
(
" "
+
new
String
(
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
)
{
TraceSystem
.
traceThrowable
(
e
);
}
...
...
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
h2/src/main/org/h2/tools/Shell.java
浏览文件 @
54385eb0
...
...
@@ -155,8 +155,10 @@ public class Shell {
if
(
tableName
.
length
()
==
0
)
{
out
.
println
(
"Usage: describe <table name>"
);
}
else
{
PreparedStatement
prep
=
null
;
ResultSet
rs
=
null
;
try
{
PreparedStatement
prep
=
conn
.
prepareStatement
(
prep
=
conn
.
prepareStatement
(
"SELECT CAST(COLUMN_NAME AS VARCHAR(32)) \"Column Name\", "
+
"CAST(TYPE_NAME AS VARCHAR(14)) \"Type\", "
+
"NUMERIC_PRECISION \"Precision\", "
+
...
...
@@ -165,22 +167,28 @@ public class Shell {
"FROM INFORMATION_SCHEMA.COLUMNS "
+
"WHERE UPPER(TABLE_NAME)=? ORDER BY ORDINAL_POSITION"
);
prep
.
setString
(
1
,
tableName
.
toUpperCase
());
ResultSet
rs
=
prep
.
executeQuery
();
rs
=
prep
.
executeQuery
();
printResult
(
rs
,
false
);
}
catch
(
SQLException
e
)
{
out
.
println
(
"Exception: "
+
e
.
toString
());
e
.
printStackTrace
();
}
finally
{
JdbcUtils
.
closeSilently
(
rs
);
JdbcUtils
.
closeSilently
(
prep
);
}
}
}
else
if
(
upper
.
startsWith
(
"SHOW"
))
{
ResultSet
rs
=
null
;
try
{
ResultSet
rs
=
stat
.
executeQuery
(
rs
=
stat
.
executeQuery
(
"SELECT CAST(TABLE_SCHEMA AS VARCHAR(32)) \"Schema\", TABLE_NAME \"Table Name\" "
+
"FROM INFORMATION_SCHEMA.TABLES ORDER BY TABLE_SCHEMA, TABLE_NAME"
);
printResult
(
rs
,
false
);
}
catch
(
SQLException
e
)
{
out
.
println
(
"Exception: "
+
e
.
toString
());
e
.
printStackTrace
();
}
finally
{
JdbcUtils
.
closeSilently
(
rs
);
}
}
else
if
(
upper
.
startsWith
(
"MAXWIDTH"
))
{
upper
=
upper
.
substring
(
"MAXWIDTH"
.
length
()).
trim
();
...
...
@@ -322,9 +330,10 @@ public class Shell {
out
.
println
(
"Error: "
+
e
.
toString
());
return
;
}
ResultSet
rs
=
null
;
try
{
if
(
result
)
{
ResultSet
rs
=
stat
.
getResultSet
();
rs
=
stat
.
getResultSet
();
int
rowCount
=
printResult
(
rs
,
listMode
);
time
=
System
.
currentTimeMillis
()
-
time
;
out
.
println
(
"("
+
rowCount
+
(
rowCount
==
1
?
" row, "
:
" rows, "
)
+
time
+
" ms)"
);
...
...
@@ -336,6 +345,8 @@ public class Shell {
}
catch
(
SQLException
e
)
{
out
.
println
(
"Error: "
+
e
.
toString
());
e
.
printStackTrace
();
}
finally
{
JdbcUtils
.
closeSilently
(
rs
);
}
}
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
54385eb0
...
...
@@ -159,8 +159,7 @@ java org.h2.test.TestAll timer
/*
Fix ScriptBase.getFileName()
Fix Shell.java 159 (close PreparedStatement)
Shell.java 159 (close PreparedStatement)
Browser problems:
There has been a reported incompatibility with the
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论