Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
8678a122
提交
8678a122
authored
2月 07, 2018
作者:
thomasmueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Javadocs
上级
cebc13f1
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
70 行增加
和
1 行删除
+70
-1
Select.java
h2/src/main/org/h2/command/dml/Select.java
+4
-0
FullText.java
h2/src/main/org/h2/fulltext/FullText.java
+6
-0
FullTextLucene.java
h2/src/main/org/h2/fulltext/FullTextLucene.java
+13
-0
TransactionStore.java
h2/src/main/org/h2/mvstore/db/TransactionStore.java
+3
-0
TableSynonym.java
h2/src/main/org/h2/table/TableSynonym.java
+5
-1
TableView.java
h2/src/main/org/h2/table/TableView.java
+36
-0
CharsetCollator.java
h2/src/main/org/h2/value/CharsetCollator.java
+3
-0
没有找到文件。
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
8678a122
...
...
@@ -44,7 +44,11 @@ import java.util.HashSet;
*/
public
class
Select
extends
Query
{
/**
* The main (top) table filter.
*/
TableFilter
topTableFilter
;
private
final
ArrayList
<
TableFilter
>
filters
=
New
.
arrayList
();
private
final
ArrayList
<
TableFilter
>
topFilters
=
New
.
arrayList
();
...
...
h2/src/main/org/h2/fulltext/FullText.java
浏览文件 @
8678a122
...
...
@@ -955,6 +955,12 @@ public class FullText {
}
}
/**
* Check whether the database is in multi-threaded mode.
*
* @param conn the connection
* @return true if the multi-threaded mode is used
*/
static
boolean
isMultiThread
(
Connection
conn
)
throws
SQLException
{
try
(
Statement
stat
=
conn
.
createStatement
())
{
...
...
h2/src/main/org/h2/fulltext/FullTextLucene.java
浏览文件 @
8678a122
...
...
@@ -703,11 +703,21 @@ public class FullTextLucene extends FullText {
searcher
=
new
IndexSearcher
(
reader
);
}
/**
* Start using the searcher.
*
* @return the searcher
*/
synchronized
IndexSearcher
getSearcher
()
{
++
counter
;
return
searcher
;
}
/**
* Stop using the searcher.
*
* @param searcher the searcher
*/
synchronized
void
returnSearcher
(
IndexSearcher
searcher
)
{
if
(
this
.
searcher
==
searcher
)
{
--
counter
;
...
...
@@ -738,6 +748,9 @@ public class FullTextLucene extends FullText {
searcher
=
new
IndexSearcher
(
IndexReader
.
open
(
writer
,
true
));
}
/**
* Close the index.
*/
public
synchronized
void
close
()
throws
IOException
{
for
(
IndexSearcher
searcher
:
counters
.
keySet
())
{
closeSearcher
(
searcher
);
...
...
h2/src/main/org/h2/mvstore/db/TransactionStore.java
浏览文件 @
8678a122
...
...
@@ -896,6 +896,9 @@ public class TransactionStore {
*/
final
MVMap
<
K
,
VersionedValue
>
map
;
/**
* The transaction which is used for this map.
*/
final
Transaction
transaction
;
TransactionMap
(
Transaction
transaction
,
MVMap
<
K
,
VersionedValue
>
map
,
...
...
h2/src/main/org/h2/table/TableSynonym.java
浏览文件 @
8678a122
...
...
@@ -37,6 +37,11 @@ public class TableSynonym extends SchemaObjectBase {
return
synonymFor
;
}
/**
* Set (update) the data.
*
* @param data the new data
*/
public
void
updateData
(
CreateSynonymData
data
)
{
this
.
data
=
data
;
}
...
...
@@ -46,7 +51,6 @@ public class TableSynonym extends SchemaObjectBase {
return
SYNONYM
;
}
@Override
public
String
getCreateSQLForCopy
(
Table
table
,
String
quotedName
)
{
return
synonymFor
.
getCreateSQLForCopy
(
table
,
quotedName
);
...
...
h2/src/main/org/h2/table/TableView.java
浏览文件 @
8678a122
...
...
@@ -76,9 +76,11 @@ public class TableView extends Table {
* dependent views.
*
* @param querySQL the SQL statement
* @param newColumnTemplates the columns
* @param session the session
* @param recursive whether this is a recursive view
* @param force if errors should be ignored
* @param literalsChecked if literals have been checked
*/
public
void
replace
(
String
querySQL
,
Column
[]
newColumnTemplates
,
Session
session
,
boolean
recursive
,
boolean
force
,
boolean
literalsChecked
)
{
...
...
@@ -715,6 +717,22 @@ public class TableView extends Table {
return
isPersistent
;
}
/**
* Create a view.
*
* @param schema the schema
* @param id the view id
* @param name the view name
* @param querySQL the query
* @param parameters the parameters
* @param columnTemplates the columns
* @param session the session
* @param literalsChecked whether literals in the query are checked
* @param isTableExpression if this is a table expression
* @param isPersistent whether the view is persisted
* @param db the database
* @return the view
*/
public
static
TableView
createTableViewMaybeRecursive
(
Schema
schema
,
int
id
,
String
name
,
String
querySQL
,
ArrayList
<
Parameter
>
parameters
,
Column
[]
columnTemplates
,
Session
session
,
boolean
literalsChecked
,
boolean
isTableExpression
,
boolean
isPersistent
,
Database
db
)
{
...
...
@@ -805,6 +823,17 @@ public class TableView extends Table {
return
columnTemplateList
;
}
/**
* Create a table for a recursive query.
*
* @param isPersistent whether the table is persisted
* @param targetSession the session
* @param cteViewName the name
* @param schema the schema
* @param columns the columns
* @param db the database
* @return the table
*/
public
static
Table
createShadowTableForRecursiveTableExpression
(
boolean
isPersistent
,
Session
targetSession
,
String
cteViewName
,
Schema
schema
,
List
<
Column
>
columns
,
Database
db
)
{
...
...
@@ -834,6 +863,13 @@ public class TableView extends Table {
return
recursiveTable
;
}
/**
* Remove a table for a recursive query.
*
* @param isPersistent whether the table is persisted
* @param targetSession the session
* @param recursiveTable the table
*/
public
static
void
destroyShadowTableForRecursiveExpression
(
boolean
isPersistent
,
Session
targetSession
,
Table
recursiveTable
)
{
if
(
recursiveTable
!=
null
)
{
...
...
h2/src/main/org/h2/value/CharsetCollator.java
浏览文件 @
8678a122
...
...
@@ -15,6 +15,9 @@ import java.util.Comparator;
*/
public
class
CharsetCollator
extends
Collator
{
/**
* The comparator used to compare byte arrays.
*/
static
final
Comparator
<
byte
[]>
COMPARATOR
=
new
Comparator
<
byte
[]>()
{
@Override
public
int
compare
(
byte
[]
b1
,
byte
[]
b2
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论