Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
062e11dc
提交
062e11dc
authored
8月 06, 2015
作者:
Thomas Mueller Graf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting
上级
486fe1a0
隐藏空白字符变更
内嵌
并排
正在显示
29 个修改的文件
包含
41 行增加
和
42 行删除
+41
-42
ErrorCode.java
h2/src/main/org/h2/api/ErrorCode.java
+1
-2
RuleFixed.java
h2/src/main/org/h2/bnf/RuleFixed.java
+1
-1
AlterTableSet.java
h2/src/main/org/h2/command/dml/AlterTableSet.java
+1
-1
Call.java
h2/src/main/org/h2/command/dml/Call.java
+1
-1
Select.java
h2/src/main/org/h2/command/dml/Select.java
+1
-1
Comment.java
h2/src/main/org/h2/engine/Comment.java
+1
-1
MetaRecord.java
h2/src/main/org/h2/engine/MetaRecord.java
+1
-1
Function.java
h2/src/main/org/h2/expression/Function.java
+2
-2
JavaAggregate.java
h2/src/main/org/h2/expression/JavaAggregate.java
+1
-1
JavaFunction.java
h2/src/main/org/h2/expression/JavaFunction.java
+1
-1
Parameter.java
h2/src/main/org/h2/expression/Parameter.java
+1
-1
Rownum.java
h2/src/main/org/h2/expression/Rownum.java
+1
-1
SequenceValue.java
h2/src/main/org/h2/expression/SequenceValue.java
+1
-1
Variable.java
h2/src/main/org/h2/expression/Variable.java
+1
-1
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+3
-3
MVTableEngine.java
h2/src/main/org/h2/mvstore/db/MVTableEngine.java
+1
-1
PageStoreInDoubtTransaction.java
h2/src/main/org/h2/store/PageStoreInDoubtTransaction.java
+2
-2
MetaTable.java
h2/src/main/org/h2/table/MetaTable.java
+2
-2
RegularTable.java
h2/src/main/org/h2/table/RegularTable.java
+1
-1
DataType.java
h2/src/main/org/h2/value/DataType.java
+3
-3
Transfer.java
h2/src/main/org/h2/value/Transfer.java
+1
-1
Value.java
h2/src/main/org/h2/value/Value.java
+6
-6
TestIndex.java
h2/src/test/org/h2/test/db/TestIndex.java
+1
-1
TestNativeSQL.java
h2/src/test/org/h2/test/jdbc/TestNativeSQL.java
+1
-1
TestMultiThreaded.java
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
+1
-1
TestFileSystem.java
h2/src/test/org/h2/test/unit/TestFileSystem.java
+1
-1
BnfRailroad.java
h2/src/tools/org/h2/build/doc/BnfRailroad.java
+1
-1
ResourceDoclet.java
h2/src/tools/org/h2/build/doclet/ResourceDoclet.java
+1
-1
ClassReader.java
h2/src/tools/org/h2/jaqu/bytecode/ClassReader.java
+1
-1
没有找到文件。
h2/src/main/org/h2/api/ErrorCode.java
浏览文件 @
062e11dc
...
...
@@ -1663,7 +1663,7 @@ public class ErrorCode {
* DROP TABLE INFORMATION_SCHEMA.SETTINGS;
* </pre>
*/
public
static
final
int
CANNOT_DROP_TABLE_1
=
90118
;
public
static
final
int
CANNOT_DROP_TABLE_1
=
90118
;
/**
* The error with code <code>90119</code> is thrown when
...
...
@@ -1908,7 +1908,6 @@ public class ErrorCode {
*/
public
static
final
int
RESULT_SET_READONLY
=
90140
;
/**
* The error with code <code>90141</code> is thrown when
* trying to change the java object serializer while there was already data
...
...
h2/src/main/org/h2/bnf/RuleFixed.java
浏览文件 @
062e11dc
...
...
@@ -45,7 +45,7 @@ public class RuleFixed implements Rule {
String
query
=
sentence
.
getQuery
();
String
s
=
query
;
boolean
removeTrailingSpaces
=
false
;
switch
(
type
)
{
switch
(
type
)
{
case
YMD:
while
(
s
.
length
()
>
0
&&
"0123456789-"
.
indexOf
(
s
.
charAt
(
0
))
>=
0
)
{
s
=
s
.
substring
(
1
);
...
...
h2/src/main/org/h2/command/dml/AlterTableSet.java
浏览文件 @
062e11dc
...
...
@@ -49,7 +49,7 @@ public class AlterTableSet extends SchemaCommand {
Table
table
=
getSchema
().
getTableOrView
(
session
,
tableName
);
session
.
getUser
().
checkRight
(
table
,
Right
.
ALL
);
table
.
lock
(
session
,
true
,
true
);
switch
(
type
)
{
switch
(
type
)
{
case
CommandInterface
.
ALTER_TABLE_SET_REFERENTIAL_INTEGRITY
:
table
.
setCheckForeignKeyConstraints
(
session
,
value
,
value
?
checkExisting
:
false
);
...
...
h2/src/main/org/h2/command/dml/Call.java
浏览文件 @
062e11dc
...
...
@@ -46,7 +46,7 @@ public class Call extends Prepared {
public
int
update
()
{
Value
v
=
expression
.
getValue
(
session
);
int
type
=
v
.
getType
();
switch
(
type
)
{
switch
(
type
)
{
case
Value
.
RESULT_SET
:
// this will throw an exception
// methods returning a result set may not be called like this.
...
...
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
062e11dc
...
...
@@ -1269,7 +1269,7 @@ public class Select extends Query {
@Override
public
boolean
isEverything
(
ExpressionVisitor
visitor
)
{
switch
(
visitor
.
getType
())
{
switch
(
visitor
.
getType
())
{
case
ExpressionVisitor
.
DETERMINISTIC
:
{
if
(
isForUpdate
)
{
return
false
;
...
...
h2/src/main/org/h2/engine/Comment.java
浏览文件 @
062e11dc
...
...
@@ -31,7 +31,7 @@ public class Comment extends DbObjectBase {
}
private
static
String
getTypeName
(
int
type
)
{
switch
(
type
)
{
switch
(
type
)
{
case
DbObject
.
CONSTANT
:
return
"CONSTANT"
;
case
DbObject
.
CONSTRAINT
:
...
...
h2/src/main/org/h2/engine/MetaRecord.java
浏览文件 @
062e11dc
...
...
@@ -104,7 +104,7 @@ public class MetaRecord implements Comparable<MetaRecord> {
* @return the sort index
*/
private
int
getCreateOrder
()
{
switch
(
objectType
)
{
switch
(
objectType
)
{
case
DbObject
.
SETTING
:
return
0
;
case
DbObject
.
USER
:
...
...
h2/src/main/org/h2/expression/Function.java
浏览文件 @
062e11dc
...
...
@@ -541,7 +541,7 @@ public class Function extends Expression implements FunctionCall {
if
(
info
==
null
)
{
return
null
;
}
switch
(
info
.
type
)
{
switch
(
info
.
type
)
{
case
TABLE:
case
TABLE_DISTINCT:
return
new
TableFunction
(
database
,
info
,
Long
.
MAX_VALUE
);
...
...
@@ -1401,7 +1401,7 @@ public class Function extends Expression implements FunctionCall {
v2
==
null
?
null
:
v2
.
getInt
()));
break
;
case
TO_CHAR:
switch
(
v0
.
getType
()){
switch
(
v0
.
getType
()){
case
Value
.
TIME
:
case
Value
.
DATE
:
case
Value
.
TIMESTAMP
:
...
...
h2/src/main/org/h2/expression/JavaAggregate.java
浏览文件 @
062e11dc
...
...
@@ -84,7 +84,7 @@ public class JavaAggregate extends Expression {
@Override
public
boolean
isEverything
(
ExpressionVisitor
visitor
)
{
switch
(
visitor
.
getType
())
{
switch
(
visitor
.
getType
())
{
case
ExpressionVisitor
.
DETERMINISTIC
:
// TODO optimization: some functions are deterministic, but we don't
// know (no setting for that)
...
...
h2/src/main/org/h2/expression/JavaFunction.java
浏览文件 @
062e11dc
...
...
@@ -134,7 +134,7 @@ public class JavaFunction extends Expression implements FunctionCall {
@Override
public
boolean
isEverything
(
ExpressionVisitor
visitor
)
{
switch
(
visitor
.
getType
())
{
switch
(
visitor
.
getType
())
{
case
ExpressionVisitor
.
DETERMINISTIC
:
if
(!
isDeterministic
())
{
return
false
;
...
...
h2/src/main/org/h2/expression/Parameter.java
浏览文件 @
062e11dc
...
...
@@ -147,7 +147,7 @@ public class Parameter extends Expression implements ParameterInterface {
@Override
public
boolean
isEverything
(
ExpressionVisitor
visitor
)
{
switch
(
visitor
.
getType
())
{
switch
(
visitor
.
getType
())
{
case
ExpressionVisitor
.
EVALUATABLE
:
// the parameter _will_be_ evaluatable at execute time
case
ExpressionVisitor
.
SET_MAX_DATA_MODIFICATION_ID
:
...
...
h2/src/main/org/h2/expression/Rownum.java
浏览文件 @
062e11dc
...
...
@@ -76,7 +76,7 @@ public class Rownum extends Expression {
@Override
public
boolean
isEverything
(
ExpressionVisitor
visitor
)
{
switch
(
visitor
.
getType
())
{
switch
(
visitor
.
getType
())
{
case
ExpressionVisitor
.
QUERY_COMPARABLE
:
case
ExpressionVisitor
.
OPTIMIZABLE_MIN_MAX_COUNT_ALL
:
case
ExpressionVisitor
.
DETERMINISTIC
:
...
...
h2/src/main/org/h2/expression/SequenceValue.java
浏览文件 @
062e11dc
...
...
@@ -79,7 +79,7 @@ public class SequenceValue extends Expression {
@Override
public
boolean
isEverything
(
ExpressionVisitor
visitor
)
{
switch
(
visitor
.
getType
())
{
switch
(
visitor
.
getType
())
{
case
ExpressionVisitor
.
EVALUATABLE
:
case
ExpressionVisitor
.
OPTIMIZABLE_MIN_MAX_COUNT_ALL
:
case
ExpressionVisitor
.
NOT_FROM_RESOLVER
:
...
...
h2/src/main/org/h2/expression/Variable.java
浏览文件 @
062e11dc
...
...
@@ -63,7 +63,7 @@ public class Variable extends Expression {
@Override
public
boolean
isEverything
(
ExpressionVisitor
visitor
)
{
switch
(
visitor
.
getType
())
{
switch
(
visitor
.
getType
())
{
case
ExpressionVisitor
.
EVALUATABLE
:
// the value will be evaluated at execute time
case
ExpressionVisitor
.
SET_MAX_DATA_MODIFICATION_ID
:
...
...
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
062e11dc
...
...
@@ -700,7 +700,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCodeCall
(
"setTransactionIsolation"
,
level
);
checkClosed
();
int
lockMode
;
switch
(
level
)
{
switch
(
level
)
{
case
Connection
.
TRANSACTION_READ_UNCOMMITTED
:
lockMode
=
Constants
.
LOCK_MODE_OFF
;
break
;
...
...
@@ -786,7 +786,7 @@ public class JdbcConnection extends TraceObject implements Connection {
int
lockMode
=
result
.
currentRow
()[
0
].
getInt
();
result
.
close
();
int
transactionIsolationLevel
;
switch
(
lockMode
)
{
switch
(
lockMode
)
{
case
Constants
.
LOCK_MODE_OFF
:
transactionIsolationLevel
=
Connection
.
TRANSACTION_READ_UNCOMMITTED
;
break
;
...
...
@@ -1194,7 +1194,7 @@ public class JdbcConnection extends TraceObject implements Connection {
private
static
int
translateGetEnd
(
String
sql
,
int
i
,
char
c
)
{
int
len
=
sql
.
length
();
switch
(
c
)
{
switch
(
c
)
{
case
'$'
:
{
if
(
i
<
len
-
1
&&
sql
.
charAt
(
i
+
1
)
==
'$'
&&
(
i
==
0
||
sql
.
charAt
(
i
-
1
)
<=
' '
))
{
...
...
h2/src/main/org/h2/mvstore/db/MVTableEngine.java
浏览文件 @
062e11dc
...
...
@@ -447,7 +447,7 @@ public class MVTableEngine implements TableEngine {
@Override
public
String
getState
()
{
switch
(
state
)
{
switch
(
state
)
{
case
IN_DOUBT:
return
"IN_DOUBT"
;
case
COMMIT:
...
...
h2/src/main/org/h2/store/PageStoreInDoubtTransaction.java
浏览文件 @
062e11dc
...
...
@@ -37,7 +37,7 @@ public class PageStoreInDoubtTransaction implements InDoubtTransaction {
@Override
public
void
setState
(
int
state
)
{
switch
(
state
)
{
switch
(
state
)
{
case
COMMIT:
store
.
setInDoubtTransactionState
(
sessionId
,
pos
,
true
);
break
;
...
...
@@ -52,7 +52,7 @@ public class PageStoreInDoubtTransaction implements InDoubtTransaction {
@Override
public
String
getState
()
{
switch
(
state
)
{
switch
(
state
)
{
case
IN_DOUBT:
return
"IN_DOUBT"
;
case
COMMIT:
...
...
h2/src/main/org/h2/table/MetaTable.java
浏览文件 @
062e11dc
...
...
@@ -128,7 +128,7 @@ public class MetaTable extends Table {
this
.
type
=
type
;
Column
[]
cols
;
String
indexColumnName
=
null
;
switch
(
type
)
{
switch
(
type
)
{
case
TABLES:
setObjectName
(
"TABLES"
);
cols
=
createColumns
(
...
...
@@ -1854,7 +1854,7 @@ public class MetaTable extends Table {
}
private
static
int
getRefAction
(
int
action
)
{
switch
(
action
)
{
switch
(
action
)
{
case
ConstraintReferential
.
CASCADE
:
return
DatabaseMetaData
.
importedKeyCascade
;
case
ConstraintReferential
.
RESTRICT
:
...
...
h2/src/main/org/h2/table/RegularTable.java
浏览文件 @
062e11dc
...
...
@@ -322,7 +322,7 @@ public class RegularTable extends TableBase {
if
(
first
.
sortType
!=
SortOrder
.
ASCENDING
)
{
return
-
1
;
}
switch
(
first
.
column
.
getType
())
{
switch
(
first
.
column
.
getType
())
{
case
Value
.
BYTE
:
case
Value
.
SHORT
:
case
Value
.
INT
:
...
...
h2/src/main/org/h2/value/DataType.java
浏览文件 @
062e11dc
...
...
@@ -493,7 +493,7 @@ public class DataType {
int
columnIndex
,
int
type
)
{
try
{
Value
v
;
switch
(
type
)
{
switch
(
type
)
{
case
Value
.
NULL
:
{
return
ValueNull
.
INSTANCE
;
}
...
...
@@ -679,7 +679,7 @@ public class DataType {
* @return the class name
*/
public
static
String
getTypeClassName
(
int
type
)
{
switch
(
type
)
{
switch
(
type
)
{
case
Value
.
BOOLEAN
:
// "java.lang.Boolean";
return
Boolean
.
class
.
getName
();
...
...
@@ -815,7 +815,7 @@ public class DataType {
* @return the value type
*/
public
static
int
convertSQLTypeToValueType
(
int
sqlType
)
{
switch
(
sqlType
)
{
switch
(
sqlType
)
{
case
Types
.
CHAR
:
case
Types
.
NCHAR
:
return
Value
.
STRING_FIXED
;
...
...
h2/src/main/org/h2/value/Transfer.java
浏览文件 @
062e11dc
...
...
@@ -535,7 +535,7 @@ public class Transfer {
*/
public
Value
readValue
()
throws
IOException
{
int
type
=
readInt
();
switch
(
type
)
{
switch
(
type
)
{
case
Value
.
NULL
:
return
ValueNull
.
INSTANCE
;
case
Value
.
BYTES
:
...
...
h2/src/main/org/h2/value/Value.java
浏览文件 @
062e11dc
...
...
@@ -264,7 +264,7 @@ public abstract class Value {
* @return the order number
*/
static
int
getOrder
(
int
type
)
{
switch
(
type
)
{
switch
(
type
)
{
case
UNKNOWN:
return
1
;
case
NULL:
...
...
@@ -748,7 +748,7 @@ public abstract class Value {
break
;
}
case
BYTES:
{
switch
(
getType
())
{
switch
(
getType
())
{
case
JAVA_OBJECT:
case
BLOB:
return
ValueBytes
.
getNoCopy
(
getBytesNoCopy
());
...
...
@@ -790,7 +790,7 @@ public abstract class Value {
break
;
}
case
JAVA_OBJECT:
{
switch
(
getType
())
{
switch
(
getType
())
{
case
BYTES:
case
BLOB:
return
ValueJavaObject
.
getNoCopy
(
...
...
@@ -799,7 +799,7 @@ public abstract class Value {
break
;
}
case
BLOB:
{
switch
(
getType
())
{
switch
(
getType
())
{
case
BYTES:
return
ValueLobDb
.
createSmallLob
(
Value
.
BLOB
,
getBytesNoCopy
());
...
...
@@ -807,13 +807,13 @@ public abstract class Value {
break
;
}
case
UUID:
{
switch
(
getType
())
{
switch
(
getType
())
{
case
BYTES:
return
ValueUuid
.
get
(
getBytesNoCopy
());
}
}
case
GEOMETRY:
switch
(
getType
())
{
switch
(
getType
())
{
case
BYTES:
return
ValueGeometry
.
get
(
getBytesNoCopy
());
case
JAVA_OBJECT:
...
...
h2/src/test/org/h2/test/db/TestIndex.java
浏览文件 @
062e11dc
...
...
@@ -297,7 +297,7 @@ public class TestIndex extends TestBase {
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
int
x
=
rand
.
nextInt
(
len
);
String
sql
=
""
;
switch
(
rand
.
nextInt
(
3
))
{
switch
(
rand
.
nextInt
(
3
))
{
case
0
:
sql
=
"delete from testA where id = "
+
x
;
break
;
...
...
h2/src/test/org/h2/test/jdbc/TestNativeSQL.java
浏览文件 @
062e11dc
...
...
@@ -144,7 +144,7 @@ public class TestNativeSQL extends TestBase {
StringBuilder
buff
=
new
StringBuilder
(
"{oj }"
);
for
(
int
j
=
random
.
nextInt
(
10
);
j
>
0
;
j
--)
{
String
s
;
switch
(
random
.
nextInt
(
7
))
{
switch
(
random
.
nextInt
(
7
))
{
case
0
:
buff
.
append
(
" $$"
);
s
=
"{}\'\"-/* a\n"
;
...
...
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
浏览文件 @
062e11dc
...
...
@@ -51,7 +51,7 @@ public class TestMultiThreaded extends TestBase {
ResultSet
rs
;
try
{
while
(!
stop
)
{
switch
(
random
.
nextInt
(
6
))
{
switch
(
random
.
nextInt
(
6
))
{
case
0
:
// insert a row for this connection
traceThread
(
"insert "
+
id
+
" count: "
+
count
);
...
...
h2/src/test/org/h2/test/unit/TestFileSystem.java
浏览文件 @
062e11dc
...
...
@@ -683,7 +683,7 @@ public class TestFileSystem extends TestBase {
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
trace
(
"op "
+
i
);
int
pos
=
random
.
nextInt
(
10000
);
switch
(
random
.
nextInt
(
7
))
{
switch
(
random
.
nextInt
(
7
))
{
case
0
:
{
pos
=
(
int
)
Math
.
min
(
pos
,
ra
.
length
());
trace
(
"seek "
+
pos
);
...
...
h2/src/tools/org/h2/build/doc/BnfRailroad.java
浏览文件 @
062e11dc
...
...
@@ -94,7 +94,7 @@ public class BnfRailroad implements BnfVisitor {
* @return the HTML text
*/
static
String
getHtmlText
(
int
type
)
{
switch
(
type
)
{
switch
(
type
)
{
case
RuleFixed
.
YMD
:
return
"2000-01-01"
;
case
RuleFixed
.
HMS
:
...
...
h2/src/tools/org/h2/build/doclet/ResourceDoclet.java
浏览文件 @
062e11dc
...
...
@@ -77,7 +77,7 @@ public class ResourceDoclet {
boolean
inColumn
=
false
;
while
(
p
.
hasNext
())
{
String
s
;
switch
(
p
.
next
())
{
switch
(
p
.
next
())
{
case
XMLParser
.
END_ELEMENT
:
s
=
p
.
getName
();
if
(
"p"
.
equals
(
s
)
||
"tr"
.
equals
(
s
)
||
"br"
.
equals
(
s
))
{
...
...
h2/src/tools/org/h2/jaqu/bytecode/ClassReader.java
浏览文件 @
062e11dc
...
...
@@ -281,7 +281,7 @@ public class ClassReader {
endOfMethod
=
false
;
condition
=
false
;
nextPc
=
0
;
switch
(
opCode
)
{
switch
(
opCode
)
{
case
0
:
op
=
"nop"
;
break
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论