Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
465c51a1
提交
465c51a1
authored
3月 17, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove old TODOs
上级
013a17a8
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
3 行增加
和
23 行删除
+3
-23
AlterTableAddConstraint.java
h2/src/main/org/h2/command/ddl/AlterTableAddConstraint.java
+0
-2
AlterTableRename.java
h2/src/main/org/h2/command/ddl/AlterTableRename.java
+0
-1
CreateConstant.java
h2/src/main/org/h2/command/ddl/CreateConstant.java
+0
-1
CreateIndex.java
h2/src/main/org/h2/command/ddl/CreateIndex.java
+0
-1
CreateTable.java
h2/src/main/org/h2/command/ddl/CreateTable.java
+0
-1
CreateTrigger.java
h2/src/main/org/h2/command/ddl/CreateTrigger.java
+0
-2
CreateView.java
h2/src/main/org/h2/command/ddl/CreateView.java
+0
-1
DropSequence.java
h2/src/main/org/h2/command/ddl/DropSequence.java
+0
-1
DropTable.java
h2/src/main/org/h2/command/ddl/DropTable.java
+0
-1
DropView.java
h2/src/main/org/h2/command/ddl/DropView.java
+0
-1
GrantRevoke.java
h2/src/main/org/h2/command/ddl/GrantRevoke.java
+1
-1
AlterSequence.java
h2/src/main/org/h2/command/dml/AlterSequence.java
+0
-1
ExplainPlan.java
h2/src/main/org/h2/command/dml/ExplainPlan.java
+0
-1
Optimizer.java
h2/src/main/org/h2/command/dml/Optimizer.java
+0
-1
Select.java
h2/src/main/org/h2/command/dml/Select.java
+2
-5
SelectUnion.java
h2/src/main/org/h2/command/dml/SelectUnion.java
+0
-2
没有找到文件。
h2/src/main/org/h2/command/ddl/AlterTableAddConstraint.java
浏览文件 @
465c51a1
...
...
@@ -261,11 +261,9 @@ public class AlterTableAddConstraint extends SchemaCommand {
int
indexId
=
getObjectId
(
true
,
false
);
IndexType
indexType
;
if
(
unique
)
{
// TODO default index (hash or not; memory or not or same as table)
// for unique constraints
indexType
=
IndexType
.
createUnique
(
t
.
getPersistent
(),
false
);
}
else
{
// TODO default index (memory or not or same as table) for unique
// constraints
indexType
=
IndexType
.
createNonUnique
(
t
.
getPersistent
());
}
...
...
h2/src/main/org/h2/command/ddl/AlterTableRename.java
浏览文件 @
465c51a1
...
...
@@ -45,7 +45,6 @@ public class AlterTableRename extends SchemaCommand {
}
session
.
getUser
().
checkRight
(
oldTable
,
Right
.
ALL
);
if
(
oldTable
.
getTemporary
())
{
// TODO renaming a temporary table is not supported
throw
Message
.
getUnsupportedException
();
}
db
.
renameSchemaObject
(
session
,
oldTable
,
newTableName
);
...
...
h2/src/main/org/h2/command/ddl/CreateConstant.java
浏览文件 @
465c51a1
...
...
@@ -32,7 +32,6 @@ public class CreateConstant extends SchemaCommand {
}
public
void
setIfNotExists
(
boolean
ifNotExists
)
{
// TODO constant: if exists - probably better use 'or replace'
this
.
ifNotExists
=
ifNotExists
;
}
...
...
h2/src/main/org/h2/command/ddl/CreateIndex.java
浏览文件 @
465c51a1
...
...
@@ -53,7 +53,6 @@ public class CreateIndex extends SchemaCommand {
}
public
int
update
()
throws
SQLException
{
// TODO cancel: may support for index creation
session
.
commit
(
true
);
Database
db
=
session
.
getDatabase
();
boolean
persistent
=
db
.
isPersistent
();
...
...
h2/src/main/org/h2/command/ddl/CreateTable.java
浏览文件 @
465c51a1
...
...
@@ -100,7 +100,6 @@ public class CreateTable extends SchemaCommand {
}
public
int
update
()
throws
SQLException
{
// TODO rights: what rights are required to create a table?
session
.
commit
(
true
);
Database
db
=
session
.
getDatabase
();
if
(!
db
.
isPersistent
())
{
...
...
h2/src/main/org/h2/command/ddl/CreateTrigger.java
浏览文件 @
465c51a1
...
...
@@ -71,12 +71,10 @@ public class CreateTrigger extends SchemaCommand {
}
public
void
setIfNotExists
(
boolean
ifNotExists
)
{
// TODO trigger: if exists - probably better use 'or replace'
this
.
ifNotExists
=
ifNotExists
;
}
public
int
update
()
throws
SQLException
{
// TODO rights: what rights are required to create a trigger?
session
.
commit
(
true
);
Database
db
=
session
.
getDatabase
();
if
(
getSchema
().
findTrigger
(
triggerName
)
!=
null
)
{
...
...
h2/src/main/org/h2/command/ddl/CreateView.java
浏览文件 @
465c51a1
...
...
@@ -48,7 +48,6 @@ public class CreateView extends SchemaCommand {
}
public
int
update
()
throws
SQLException
{
// TODO rights: what rights are required to create a view?
session
.
commit
(
true
);
Database
db
=
session
.
getDatabase
();
if
(
getSchema
().
findTableOrView
(
session
,
viewName
)
!=
null
)
{
...
...
h2/src/main/org/h2/command/ddl/DropSequence.java
浏览文件 @
465c51a1
...
...
@@ -37,7 +37,6 @@ public class DropSequence extends SchemaCommand {
}
public
int
update
()
throws
SQLException
{
// TODO rights: what are the rights required for a sequence?
session
.
getUser
().
checkAdmin
();
session
.
commit
(
true
);
Database
db
=
session
.
getDatabase
();
...
...
h2/src/main/org/h2/command/ddl/DropTable.java
浏览文件 @
465c51a1
...
...
@@ -57,7 +57,6 @@ public class DropTable extends SchemaCommand {
private
void
prepareDrop
()
throws
SQLException
{
table
=
getSchema
().
findTableOrView
(
session
,
tableName
);
// TODO drop table: drops views as well (is this ok?)
if
(
table
==
null
)
{
if
(!
ifExists
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
TABLE_OR_VIEW_NOT_FOUND_1
,
tableName
);
...
...
h2/src/main/org/h2/command/ddl/DropView.java
浏览文件 @
465c51a1
...
...
@@ -37,7 +37,6 @@ public class DropView extends SchemaCommand {
}
public
int
update
()
throws
SQLException
{
// TODO rights: what rights are required to drop a view?
session
.
commit
(
true
);
Table
view
=
getSchema
().
findTableOrView
(
session
,
viewName
);
if
(
view
==
null
)
{
...
...
h2/src/main/org/h2/command/ddl/GrantRevoke.java
浏览文件 @
465c51a1
...
...
@@ -137,7 +137,7 @@ public class GrantRevoke extends DefineCommand {
if
(
grantee
instanceof
Role
)
{
Role
granteeRole
=
(
Role
)
grantee
;
if
(
grantedRole
.
isRoleGranted
(
granteeRole
))
{
//
TODO role: should be 'cyclic role grants are not allowed'
//
cyclic role grants are not allowed
throw
Message
.
getSQLException
(
ErrorCode
.
ROLE_ALREADY_GRANTED_1
,
grantedRole
.
getSQL
());
}
}
...
...
h2/src/main/org/h2/command/dml/AlterSequence.java
浏览文件 @
465c51a1
...
...
@@ -60,7 +60,6 @@ public class AlterSequence extends SchemaCommand {
}
public
int
update
()
throws
SQLException
{
// TODO rights: what are the rights required for a sequence?
Database
db
=
session
.
getDatabase
();
if
(
table
!=
null
)
{
session
.
getUser
().
checkRight
(
table
,
Right
.
ALL
);
...
...
h2/src/main/org/h2/command/dml/ExplainPlan.java
浏览文件 @
465c51a1
...
...
@@ -43,7 +43,6 @@ public class ExplainPlan extends Prepared {
}
public
LocalResult
query
(
int
maxrows
)
throws
SQLException
{
// TODO rights: are rights required for explain?
Column
column
=
new
Column
(
"PLAN"
,
Value
.
STRING
);
ExpressionColumn
expr
=
new
ExpressionColumn
(
session
.
getDatabase
(),
column
);
Expression
[]
expressions
=
new
Expression
[]
{
...
...
h2/src/main/org/h2/command/dml/Optimizer.java
浏览文件 @
465c51a1
...
...
@@ -88,7 +88,6 @@ public class Optimizer {
calculateBruteForceSome
();
random
=
new
Random
(
0
);
calculateGenetic
();
// TODO optimizer: how to use rule based optimizer?
}
}
...
...
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
465c51a1
...
...
@@ -91,8 +91,7 @@ public class Select extends Query {
* @param isTop if the table can be the first table in the query plan
*/
public
void
addTableFilter
(
TableFilter
filter
,
boolean
isTop
)
{
// TODO compatibility: it seems oracle doesn't check on
// duplicate aliases; do other databases check it?
// Oracle doesn't check on duplicate aliases
// String alias = filter.getAlias();
// if(filterNames.contains(alias)) {
// throw Message.getSQLException(
...
...
@@ -431,7 +430,7 @@ public class Select extends Query {
break
;
}
if
(
idxCol
.
sortType
!=
sortTypes
[
j
])
{
//
TODO
NULL FIRST for ascending and NULLS LAST
// NULL FIRST for ascending and NULLS LAST
// for descending would actually match the default
ok
=
false
;
break
;
...
...
@@ -570,8 +569,6 @@ public class Select extends Query {
}
private
void
expandColumnList
()
throws
SQLException
{
// TODO this works: select distinct count(*)
// from system_columns group by table
for
(
int
i
=
0
;
i
<
expressions
.
size
();
i
++)
{
Expression
expr
=
(
Expression
)
expressions
.
get
(
i
);
if
(!
expr
.
isWildcard
())
{
...
...
h2/src/main/org/h2/command/dml/SelectUnion.java
浏览文件 @
465c51a1
...
...
@@ -323,8 +323,6 @@ public class SelectUnion extends Query {
buff
.
append
(
" ORDER BY "
);
buff
.
append
(
sort
.
getSQL
(
exprList
,
exprList
.
length
));
}
// TODO refactoring: limit and order by could be in Query (now in
// SelectUnion and in Select)
if
(
limit
!=
null
)
{
buff
.
append
(
" LIMIT "
);
buff
.
append
(
StringUtils
.
unEnclose
(
limit
.
getSQL
()));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论