Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c2b7d146
提交
c2b7d146
authored
2月 23, 2011
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleanup:
- Mainly Javadoc changes.
上级
6216db17
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
315 行增加
和
308 行删除
+315
-308
DbInspector.java
h2/src/tools/org/h2/jaqu/DbInspector.java
+183
-183
DbUpgrader.java
h2/src/tools/org/h2/jaqu/DbUpgrader.java
+61
-61
DbVersion.java
h2/src/tools/org/h2/jaqu/DbVersion.java
+45
-42
Declaration.java
h2/src/tools/org/h2/jaqu/Declaration.java
+26
-22
没有找到文件。
h2/src/tools/org/h2/jaqu/DbInspector.java
浏览文件 @
c2b7d146
...
@@ -35,8 +35,8 @@ public class DbInspector {
...
@@ -35,8 +35,8 @@ public class DbInspector {
}
}
/**
/**
* Set the preferred Date class.
* Set the preferred Date class.
Possible values are: java.util.Date
*
Possible values are: java.util.Date (default) and java.sql.Timestamp.
*
(default), java.sql.Date, java.sql.Timestamp.
*
*
* @param dateClass the new date class
* @param dateClass the new date class
*/
*/
...
@@ -115,10 +115,10 @@ public class DbInspector {
...
@@ -115,10 +115,10 @@ public class DbInspector {
Class
<
T
>
clazz
=
(
Class
<
T
>)
model
.
getClass
();
Class
<
T
>
clazz
=
(
Class
<
T
>)
model
.
getClass
();
TableDefinition
<
T
>
def
=
db
.
define
(
clazz
);
TableDefinition
<
T
>
def
=
db
.
define
(
clazz
);
boolean
forceUpperCase
=
getMetaData
().
storesUpperCaseIdentifiers
();
boolean
forceUpperCase
=
getMetaData
().
storesUpperCaseIdentifiers
();
String
s
name
=
(
forceUpperCase
&&
def
.
schemaName
!=
null
)
?
String
s
chema
=
(
forceUpperCase
&&
def
.
schemaName
!=
null
)
?
def
.
schemaName
.
toUpperCase
()
:
def
.
schemaName
;
def
.
schemaName
.
toUpperCase
()
:
def
.
schemaName
;
String
t
name
=
forceUpperCase
?
def
.
tableName
.
toUpperCase
()
:
def
.
tableName
;
String
t
able
=
forceUpperCase
?
def
.
tableName
.
toUpperCase
()
:
def
.
tableName
;
List
<
TableInspector
>
tables
=
findTables
(
s
name
,
tname
);
List
<
TableInspector
>
tables
=
findTables
(
s
chema
,
table
);
return
tables
.
get
(
0
);
return
tables
.
get
(
0
);
}
}
...
...
h2/src/tools/org/h2/jaqu/DbUpgrader.java
浏览文件 @
c2b7d146
h2/src/tools/org/h2/jaqu/DbVersion.java
浏览文件 @
c2b7d146
...
@@ -10,33 +10,36 @@ import org.h2.jaqu.Table.JQColumn;
...
@@ -10,33 +10,36 @@ import org.h2.jaqu.Table.JQColumn;
import
org.h2.jaqu.Table.JQTable
;
import
org.h2.jaqu.Table.JQTable
;
/**
/**
* Model class for JaQu to track db and table versions.
* A JaQu system table to track database and table versions.
*
*/
*/
@JQTable
(
name
=
"_jq_versions"
,
primaryKey
=
"schemaName tableName"
,
memoryTable
=
true
)
@JQTable
(
name
=
"_jq_versions"
,
primaryKey
=
"schemaName tableName"
,
memoryTable
=
true
)
public
class
DbVersion
{
public
class
DbVersion
{
@JQColumn
(
name
=
"schemaName"
,
allowNull
=
false
)
@JQColumn
(
name
=
"schemaName"
,
allowNull
=
false
)
String
schema
;
String
schema
=
""
;
@JQColumn
(
name
=
"tableName"
,
allowNull
=
false
)
@JQColumn
(
name
=
"tableName"
,
allowNull
=
false
)
String
table
;
String
table
=
""
;
@JQColumn
(
name
=
"version"
)
@JQColumn
(
name
=
"version"
)
Integer
version
;
Integer
version
;
private
int
todoReviewWholeClass
;
public
DbVersion
()
{
public
DbVersion
()
{
// nothing to do
}
}
/**
/**
* Constructor for defining a version entry.
* Constructor for defining a version entry.
Both the schema and the table
*
(SCHEMA="" && TABLE="") == DATABASE
*
are empty strings, which means this is the row for the 'database'.
*
*
* @param version
* @param version
the database version
*/
*/
public
DbVersion
(
int
version
)
{
public
DbVersion
(
int
version
)
{
this
.
schema
=
""
;
this
.
schema
=
""
;
this
.
table
=
""
;
this
.
table
=
""
;
this
.
version
=
version
;
this
.
version
=
version
;
}
}
}
}
h2/src/tools/org/h2/jaqu/Declaration.java
浏览文件 @
c2b7d146
...
@@ -11,6 +11,9 @@ package org.h2.jaqu;
...
@@ -11,6 +11,9 @@ package org.h2.jaqu;
* update statement.
* update statement.
*/
*/
public
interface
Declaration
{
public
interface
Declaration
{
final
static
int
renameClassToUpdateDeclaration
=
0
;
/**
/**
* Append the SQL to the given statement using the given query.
* Append the SQL to the given statement using the given query.
*
*
...
@@ -19,4 +22,5 @@ public interface Declaration {
...
@@ -19,4 +22,5 @@ public interface Declaration {
//## Java 1.5 begin ##
//## Java 1.5 begin ##
void
appendSQL
(
SQLStatement
stat
);
void
appendSQL
(
SQLStatement
stat
);
//## Java 1.5 end ##
//## Java 1.5 end ##
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论