Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
144aec21
提交
144aec21
authored
1月 25, 2018
作者:
thomasmueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Javadocs, formatting
上级
2e68b5c1
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
77 行增加
和
9 行删除
+77
-9
Parser.java
h2/src/main/org/h2/command/Parser.java
+3
-2
Prepared.java
h2/src/main/org/h2/command/Prepared.java
+2
-0
Select.java
h2/src/main/org/h2/command/dml/Select.java
+1
-0
SelectUnion.java
h2/src/main/org/h2/command/dml/SelectUnion.java
+9
-0
FullTextLucene.java
h2/src/main/org/h2/fulltext/FullTextLucene.java
+3
-0
ColumnNamerConfiguration.java
h2/src/main/org/h2/util/ColumnNamerConfiguration.java
+5
-0
SourceCompiler.java
h2/src/main/org/h2/util/SourceCompiler.java
+6
-0
ThreadDeadlockDetector.java
h2/src/main/org/h2/util/ThreadDeadlockDetector.java
+1
-0
CharsetCollator.java
h2/src/main/org/h2/value/CharsetCollator.java
+6
-0
DataType.java
h2/src/main/org/h2/value/DataType.java
+2
-2
Transfer.java
h2/src/main/org/h2/value/Transfer.java
+1
-0
Value.java
h2/src/main/org/h2/value/Value.java
+20
-4
ValueLob.java
h2/src/main/org/h2/value/ValueLob.java
+9
-0
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+1
-1
TestKillRestartMulti.java
h2/src/test/org/h2/test/synth/TestKillRestartMulti.java
+5
-0
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+3
-0
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
144aec21
...
...
@@ -171,7 +171,8 @@ import org.h2.value.ValueTimestampTimeZone;
* @author Nicolas Fortin, Atelier SIG, IRSTV FR CNRS 24888
*/
public
class
Parser
{
public
static
final
String
WITH_STATEMENT_SUPPORTS_LIMITED_SUB_STATEMENTS
=
private
static
final
String
WITH_STATEMENT_SUPPORTS_LIMITED_SUB_STATEMENTS
=
"WITH statement supports only SELECT, CREATE TABLE, INSERT, UPDATE, MERGE or DELETE statements"
;
// used during the tokenizer phase
...
...
@@ -1050,7 +1051,7 @@ public class Parser {
}
}
p
ublic
static
Prepared
prepare
(
Session
s
,
String
sql
,
p
rivate
static
Prepared
prepare
(
Session
s
,
String
sql
,
ArrayList
<
Value
>
paramValues
)
{
Prepared
prep
=
s
.
prepare
(
sql
);
ArrayList
<
Parameter
>
params
=
prep
.
getParameters
();
...
...
h2/src/main/org/h2/command/Prepared.java
浏览文件 @
144aec21
...
...
@@ -450,6 +450,8 @@ public abstract class Prepared {
/**
* Set the temporary views created for CTE's.
*
* @param cteCleanups the temporary views
*/
public
void
setCteCleanups
(
List
<
TableView
>
cteCleanups
)
{
this
.
cteCleanups
=
cteCleanups
;
...
...
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
144aec21
...
...
@@ -43,6 +43,7 @@ import java.util.HashSet;
* @author Joel Turkel (Group sorted query)
*/
public
class
Select
extends
Query
{
TableFilter
topTableFilter
;
private
final
ArrayList
<
TableFilter
>
filters
=
New
.
arrayList
();
private
final
ArrayList
<
TableFilter
>
topFilters
=
New
.
arrayList
();
...
...
h2/src/main/org/h2/command/dml/SelectUnion.java
浏览文件 @
144aec21
...
...
@@ -59,8 +59,17 @@ public class SelectUnion extends Query {
public
static
final
int
INTERSECT
=
3
;
private
int
unionType
;
/**
* The left hand side of the union (the first subquery).
*/
final
Query
left
;
/**
* The right hand side of the union (the second subquery).
*/
Query
right
;
private
ArrayList
<
Expression
>
expressions
;
private
Expression
[]
expressionArray
;
private
ArrayList
<
SelectOrderBy
>
orderList
;
...
...
h2/src/main/org/h2/fulltext/FullTextLucene.java
浏览文件 @
144aec21
...
...
@@ -723,6 +723,9 @@ public class FullTextLucene extends FullText {
}
}
/**
* Commit the changes.
*/
public
synchronized
void
commit
()
throws
IOException
{
writer
.
commit
();
if
(
counter
!=
0
)
{
...
...
h2/src/main/org/h2/util/ColumnNamerConfiguration.java
浏览文件 @
144aec21
...
...
@@ -96,6 +96,11 @@ public class ColumnNamerConfiguration {
this
.
compiledRegularExpressionMatchDisallowed
=
compiledRegularExpressionMatchDisallowed
;
}
/**
* Configure the column namer.
*
* @param stringValue the configuration
*/
public
void
configure
(
String
stringValue
)
{
try
{
if
(
stringValue
.
equalsIgnoreCase
(
DEFAULT_COMMAND
))
{
...
...
h2/src/main/org/h2/util/SourceCompiler.java
浏览文件 @
144aec21
...
...
@@ -198,6 +198,12 @@ public class SourceCompiler {
return
isJavascriptSource
(
source
)
||
isRubySource
(
source
);
}
/**
* Get the compiled script.
*
* @param packageAndClassName the package and class name
* @return the compiled script
*/
public
CompiledScript
getCompiledScript
(
String
packageAndClassName
)
throws
ScriptException
{
CompiledScript
compiledScript
=
compiledScripts
.
get
(
packageAndClassName
);
if
(
compiledScript
==
null
)
{
...
...
h2/src/main/org/h2/util/ThreadDeadlockDetector.java
浏览文件 @
144aec21
...
...
@@ -82,6 +82,7 @@ public class ThreadDeadlockDetector {
* Dump all deadlocks (if any).
*
* @param msg the message
* @param out the output
*/
public
static
void
dumpAllThreadsAndLocks
(
String
msg
,
PrintStream
out
)
{
final
ThreadMXBean
threadBean
=
ManagementFactory
.
getThreadMXBean
();
...
...
h2/src/main/org/h2/value/CharsetCollator.java
浏览文件 @
144aec21
...
...
@@ -43,6 +43,12 @@ public class CharsetCollator extends Collator {
return
COMPARATOR
.
compare
(
toBytes
(
source
),
toBytes
(
target
));
}
/**
* Convert the source to bytes, using the character set.
*
* @param source the source
* @return the bytes
*/
byte
[]
toBytes
(
String
source
)
{
return
source
.
getBytes
(
charset
);
}
...
...
h2/src/main/org/h2/value/DataType.java
浏览文件 @
144aec21
...
...
@@ -389,7 +389,7 @@ public class DataType {
}
}
static
void
addDecimal
()
{
private
static
void
addDecimal
()
{
add
(
Value
.
DECIMAL
,
Types
.
DECIMAL
,
"BigDecimal"
,
createDecimal
(
Integer
.
MAX_VALUE
,
ValueDecimal
.
DEFAULT_PRECISION
,
...
...
@@ -401,7 +401,7 @@ public class DataType {
);
}
static
void
addNumeric
()
{
private
static
void
addNumeric
()
{
add
(
Value
.
DECIMAL
,
Types
.
NUMERIC
,
"BigDecimal"
,
createDecimal
(
Integer
.
MAX_VALUE
,
ValueDecimal
.
DEFAULT_PRECISION
,
...
...
h2/src/main/org/h2/value/Transfer.java
浏览文件 @
144aec21
...
...
@@ -59,6 +59,7 @@ public class Transfer {
* Create a new transfer object for the specified session.
*
* @param session the session
* @param s the socket
*/
public
Transfer
(
SessionInterface
session
,
Socket
s
)
{
this
.
session
=
session
;
...
...
h2/src/main/org/h2/value/Value.java
浏览文件 @
144aec21
...
...
@@ -188,6 +188,13 @@ public abstract class Value {
private
static
final
BigDecimal
MIN_LONG_DECIMAL
=
BigDecimal
.
valueOf
(
Long
.
MIN_VALUE
);
/**
* Check the range of the parameters.
*
* @param zeroBasedOffset the offset (0 meaning no offset)
* @param length the length of the target
* @param dataSize the length of the source
*/
static
void
rangeCheck
(
long
zeroBasedOffset
,
long
length
,
long
dataSize
)
{
if
((
zeroBasedOffset
|
length
)
<
0
||
length
>
dataSize
-
zeroBasedOffset
)
{
if
(
zeroBasedOffset
<
0
||
zeroBasedOffset
>
dataSize
)
{
...
...
@@ -479,10 +486,17 @@ public abstract class Value {
return
new
ByteArrayInputStream
(
getBytesNoCopy
());
}
/**
* Get the input stream
* @param oneBasedOffset the offset (1 means no offset)
* @param length the requested length
* @return the new input stream
*/
public
InputStream
getInputStream
(
long
oneBasedOffset
,
long
length
)
{
byte
[]
bytes
=
getBytesNoCopy
();
rangeCheck
(--
oneBasedOffset
,
length
,
bytes
.
length
);
return
new
ByteArrayInputStream
(
bytes
,
/* 0-based */
(
int
)
oneBasedOffset
,
(
int
)
length
);
long
zeroBasedOffset
=
oneBasedOffset
-
1
;
rangeCheck
(
zeroBasedOffset
,
length
,
bytes
.
length
);
return
new
ByteArrayInputStream
(
bytes
,
(
int
)
zeroBasedOffset
,
(
int
)
length
);
}
public
Reader
getReader
()
{
...
...
@@ -491,8 +505,9 @@ public abstract class Value {
public
Reader
getReader
(
long
oneBasedOffset
,
long
length
)
{
String
string
=
getString
();
rangeCheck
(--
oneBasedOffset
,
length
,
string
.
length
());
int
offset
=
/* 0-based */
(
int
)
oneBasedOffset
;
long
zeroBasedOffset
=
oneBasedOffset
-
1
;
rangeCheck
(
zeroBasedOffset
,
length
,
string
.
length
());
int
offset
=
(
int
)
zeroBasedOffset
;
return
new
StringReader
(
string
.
substring
(
offset
,
offset
+
(
int
)
length
));
}
...
...
@@ -578,6 +593,7 @@ public abstract class Value {
* @param precision the precision of the column to convert this value to.
* The special constant <code>-1</code> is used to indicate that
* the precision plays no role when converting the value
* @param mode the mode
* @return the converted value
*/
public
final
Value
convertTo
(
int
targetType
,
int
precision
,
Mode
mode
)
{
...
...
h2/src/main/org/h2/value/ValueLob.java
浏览文件 @
144aec21
...
...
@@ -59,6 +59,15 @@ public class ValueLob extends Value {
}
}
/**
* Create an input stream that is s subset of the given stream.
*
* @param inputStream the input stream
* @param oneBasedOffset the offset (1 means no offset)
* @param length the length of the result, in bytes
* @param dataSize the length of the input, in bytes
* @return the smaller input stream
*/
static
InputStream
rangeInputStream
(
InputStream
inputStream
,
long
oneBasedOffset
,
long
length
,
long
dataSize
)
{
if
(
dataSize
>
0
)
rangeCheck
(
oneBasedOffset
-
1
,
length
,
dataSize
);
...
...
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
144aec21
...
...
@@ -2476,7 +2476,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/**
* This method is called via reflection from the database.
*
* @return
s
a fixed number
* @return a fixed number
*/
public
static
long
currentTimestampOverride
()
{
return
3141
;
...
...
h2/src/test/org/h2/test/synth/TestKillRestartMulti.java
浏览文件 @
144aec21
...
...
@@ -44,9 +44,14 @@ public class TestKillRestartMulti extends TestBase {
/**
* This method is called when executing this application from the command
* line.
*
* Note that this entry can be used in two different ways, either
* (a) running just this test
* (b) or when this test invokes itself in a child process
*
* @param args the command line parameters
*/
public
static
void
main
(
String
...
args
)
throws
Exception
{
if
(
args
!=
null
&&
args
.
length
>
0
)
{
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
144aec21
...
...
@@ -759,3 +759,6 @@ contextual unknowns enquote respectively sessionid reconnection selfreferential
zzbbzz cldr booleans maria enquotes mtc cbuf checksummed nreturn despite bbzz readlimit retries cceecc reconnects
unconditionally coco aren eecccc decimals charsets zzbb lsb msb usecount outdir endian misleading precompiled
assorted reimplemented hangups confirmation predefined
mdy destfile hclf forbids spellchecking selfdestruct expects accident jacocoagent cli historic mitigate
jacoco xdata invokes sourcefiles classfiles duplication crypto stacktraces prt directions handled overly asm hardcoded
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论