Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
d64f8cd9
提交
d64f8cd9
authored
7 年前
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
improve javadoc
上级
eeb63bf7
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
58 行增加
和
12 行删除
+58
-12
Parser.java
h2/src/main/org/h2/command/Parser.java
+4
-4
Prepared.java
h2/src/main/org/h2/command/Prepared.java
+1
-1
MergeUsing.java
h2/src/main/org/h2/command/dml/MergeUsing.java
+1
-1
TransactionStore.java
h2/src/main/org/h2/mvstore/db/TransactionStore.java
+1
-0
Schema.java
h2/src/main/org/h2/schema/Schema.java
+6
-0
TableSynonym.java
h2/src/main/org/h2/table/TableSynonym.java
+18
-1
Value.java
h2/src/main/org/h2/value/Value.java
+9
-1
ValueLob.java
h2/src/main/org/h2/value/ValueLob.java
+15
-0
ValueStringFixed.java
h2/src/main/org/h2/value/ValueStringFixed.java
+1
-1
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+1
-1
TestIndex.java
h2/src/test/org/h2/test/db/TestIndex.java
+1
-2
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
d64f8cd9
...
...
@@ -6879,10 +6879,10 @@ public class Parser {
}
/**
*
@param s
*
identifier to check
* @param
functionsAsKeywords
*
treat system functions as keywords
*
Is this a simple identifier (in the JDBC specification sense).
*
* @param
s identifier to check
*
@param functionsAsKeywords
treat system functions as keywords
* @return is specified identifier may be used without quotes
* @throws NullPointerException if s is {@code null}
*/
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/command/Prepared.java
浏览文件 @
d64f8cd9
...
...
@@ -442,7 +442,7 @@ public abstract class Prepared {
}
/**
*
Get
the temporary views created for CTE's.
*
@return
the temporary views created for CTE's.
*/
public
List
<
TableView
>
getCteCleanups
()
{
return
cteCleanups
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/command/dml/MergeUsing.java
浏览文件 @
d64f8cd9
...
...
@@ -198,7 +198,7 @@ public class MergeUsing extends Prepared {
/**
* Merge the given row.
*
* @param
r
ow the row
* @param
sourceR
ow the row
*/
protected
void
merge
(
Row
sourceRow
)
{
// put the column values into the table filter
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/db/TransactionStore.java
浏览文件 @
d64f8cd9
...
...
@@ -1485,6 +1485,7 @@ public class TransactionStore {
* Iterate over entries.
*
* @param from the first key to return
* @param to the last key to return
* @return the iterator
*/
public
Iterator
<
Entry
<
K
,
V
>>
entryIterator
(
final
K
from
,
final
K
to
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
d64f8cd9
...
...
@@ -662,6 +662,12 @@ public class Schema extends DbObjectBase {
}
}
/**
* Add a table synonym to the schema.
*
* @param data the create synonym information
* @return the created {@link TableSynonym} object
*/
public
TableSynonym
createSynonym
(
CreateSynonymData
data
)
{
synchronized
(
database
)
{
database
.
lockMeta
(
data
.
session
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/table/TableSynonym.java
浏览文件 @
d64f8cd9
...
...
@@ -20,6 +20,9 @@ public class TableSynonym extends SchemaObjectBase {
private
CreateSynonymData
data
;
/**
* The table the synonym is created for.
*/
private
Table
synonymFor
;
public
TableSynonym
(
CreateSynonymData
data
)
{
...
...
@@ -27,6 +30,9 @@ public class TableSynonym extends SchemaObjectBase {
this
.
data
=
data
;
}
/**
* @return the table this is a synonym for
*/
public
Table
getSynonymFor
()
{
return
synonymFor
;
}
...
...
@@ -70,19 +76,30 @@ public class TableSynonym extends SchemaObjectBase {
throw
DbException
.
getUnsupportedException
(
"SYNONYM"
);
}
/**
* @return the table this synonym is for
*/
public
String
getSynonymForName
()
{
return
data
.
synonymFor
;
}
/**
* @return the schema this synonym is for
*/
public
Schema
getSynonymForSchema
()
{
return
data
.
synonymForSchema
;
}
/**
* @return true if this synonym currently points to a real table
*/
public
boolean
isInvalid
()
{
return
synonymFor
.
isValid
();
}
/**
* Update the table that this is a synonym for, to know about this synonym.
*/
public
void
updateSynonymFor
()
{
if
(
synonymFor
!=
null
)
{
synonymFor
.
removeSynonym
(
this
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/value/Value.java
浏览文件 @
d64f8cd9
...
...
@@ -19,7 +19,6 @@ import java.sql.SQLException;
import
java.sql.Time
;
import
java.sql.Timestamp
;
import
java.sql.Types
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Mode
;
import
org.h2.engine.SysProperties
;
...
...
@@ -488,6 +487,7 @@ public abstract class Value {
/**
* Get the input stream
*
* @param oneBasedOffset the offset (1 means no offset)
* @param length the requested length
* @return the new input stream
...
...
@@ -503,6 +503,13 @@ public abstract class Value {
return
new
StringReader
(
getString
());
}
/**
* Get the reader
*
* @param oneBasedOffset the offset (1 means no offset)
* @param length the requested length
* @return the new reader
*/
public
Reader
getReader
(
long
oneBasedOffset
,
long
length
)
{
String
string
=
getString
();
long
zeroBasedOffset
=
oneBasedOffset
-
1
;
...
...
@@ -609,6 +616,7 @@ public abstract class Value {
* the precision plays no role when converting the value
* @param column the column that contains the ENUM datatype enumerators,
* for dealing with ENUM conversions
* @param mode the database mode
* @return the converted value
*/
public
Value
convertTo
(
int
targetType
,
int
precision
,
Mode
mode
,
Column
column
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/value/ValueLob.java
浏览文件 @
d64f8cd9
...
...
@@ -80,6 +80,15 @@ public class ValueLob extends Value {
}
}
/**
* Create a reader that is s subset of the given reader.
*
* @param reader the input reader
* @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
Reader
rangeReader
(
Reader
reader
,
long
oneBasedOffset
,
long
length
,
long
dataSize
)
{
if
(
dataSize
>
0
)
rangeCheck
(
oneBasedOffset
-
1
,
length
,
dataSize
);
...
...
@@ -486,6 +495,12 @@ public class ValueLob extends Value {
* except when converting to BLOB or CLOB.
*
* @param t the new type
* @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 database mode
* @param column the column that contains the ENUM datatype enumerators,
* for dealing with ENUM conversions
* @return the converted value
*/
@Override
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/value/ValueStringFixed.java
浏览文件 @
d64f8cd9
...
...
@@ -6,7 +6,6 @@
package
org
.
h2
.
value
;
import
java.util.Arrays
;
import
org.h2.engine.Mode
;
import
org.h2.engine.SysProperties
;
import
org.h2.util.StringUtils
;
...
...
@@ -89,6 +88,7 @@ public class ValueStringFixed extends ValueString {
* be padded, this defines the overall length of the (potentially padded) string.
* If the special constant {@link #PRECISION_DO_NOT_TRIM} is used the value will
* not be trimmed.
* @param mode the database mode
* @return the value
*/
public
static
ValueStringFixed
get
(
String
s
,
int
precision
,
Mode
mode
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
d64f8cd9
...
...
@@ -1658,7 +1658,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
conn
.
close
();
}
String
stripTrailingPeriod
(
String
expected
)
{
private
static
String
stripTrailingPeriod
(
String
expected
)
{
// CLDR provider appends period on some locales
int
l
=
expected
.
length
()
-
1
;
if
(
expected
.
charAt
(
l
)
==
'.'
)
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestIndex.java
浏览文件 @
d64f8cd9
...
...
@@ -14,7 +14,6 @@ import java.util.HashMap;
import
java.util.HashSet
;
import
java.util.Random
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.h2.api.ErrorCode
;
import
org.h2.result.SortOrder
;
import
org.h2.test.TestBase
;
...
...
@@ -263,7 +262,7 @@ public class TestIndex extends TestBase {
c
.
close
();
}
void
testConcurrentUpdateRun
(
ConcurrentUpdateThread
[]
threads
,
PreparedStatement
check
)
throws
SQLException
{
private
void
testConcurrentUpdateRun
(
ConcurrentUpdateThread
[]
threads
,
PreparedStatement
check
)
throws
SQLException
{
for
(
ConcurrentUpdateThread
t
:
threads
)
{
t
.
start
();
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论