Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
0a8384cb
提交
0a8384cb
authored
3月 07, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
2b2adb7c
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
56 行增加
和
4 行删除
+56
-4
BtreeIndex.java
h2/src/main/org/h2/index/BtreeIndex.java
+1
-1
LogFile.java
h2/src/main/org/h2/log/LogFile.java
+1
-1
LogSystem.java
h2/src/main/org/h2/log/LogSystem.java
+9
-0
Schema.java
h2/src/main/org/h2/schema/Schema.java
+26
-2
TriggerObject.java
h2/src/main/org/h2/schema/TriggerObject.java
+8
-0
PgServer.java
h2/src/main/org/h2/server/pg/PgServer.java
+11
-0
没有找到文件。
h2/src/main/org/h2/index/BtreeIndex.java
浏览文件 @
0a8384cb
...
...
@@ -221,7 +221,7 @@ public class BtreeIndex extends BaseIndex implements RecordReader {
return
find
(
session
,
first
,
false
,
last
);
}
p
ublic
Cursor
find
(
Session
session
,
SearchRow
first
,
boolean
bigger
,
SearchRow
last
)
throws
SQLException
{
p
rivate
Cursor
find
(
Session
session
,
SearchRow
first
,
boolean
bigger
,
SearchRow
last
)
throws
SQLException
{
if
(
SysProperties
.
CHECK
&&
storage
==
null
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
OBJECT_CLOSED
);
}
...
...
h2/src/main/org/h2/log/LogFile.java
浏览文件 @
0a8384cb
...
...
@@ -530,7 +530,7 @@ public class LogFile {
}
}
public
void
updatePreparedCommit
(
boolean
commit
,
int
pos
,
int
sessionId
,
int
blocks
)
throws
SQLException
{
void
updatePreparedCommit
(
boolean
commit
,
int
pos
,
int
sessionId
,
int
blocks
)
throws
SQLException
{
synchronized
(
database
)
{
int
posNow
=
getBlock
();
DataPage
buff
=
rowBuff
;
...
...
h2/src/main/org/h2/log/LogSystem.java
浏览文件 @
0a8384cb
...
...
@@ -365,6 +365,15 @@ public class LogSystem {
}
}
/**
* Add a truncate entry.
*
* @param session the session
* @param file the disk file
* @param storageId the storage id
* @param recordId the id of the first record
* @param blockCount the number of blocks
*/
public
void
addTruncate
(
Session
session
,
DiskFile
file
,
int
storageId
,
int
recordId
,
int
blockCount
)
throws
SQLException
{
if
(
database
==
null
)
{
...
...
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
0a8384cb
...
...
@@ -293,11 +293,35 @@ public class Schema extends DbObjectBase {
freeUniqueName
(
objName
);
}
public
TableData
createTable
(
String
tempName
,
int
id
,
ObjectArray
newColumns
,
boolean
persistent
,
boolean
clustered
)
/**
* Add a {@link TableData} to the schema.
*
* @param tableName the table name
* @param id the object id
* @param columns the column list
* @param persistent if the table should be persistent
* @param clustered if a clustered table should be created
* @return the created {@link TableData} object
*/
public
TableData
createTable
(
String
tableName
,
int
id
,
ObjectArray
columns
,
boolean
persistent
,
boolean
clustered
)
throws
SQLException
{
return
new
TableData
(
this
,
t
empName
,
id
,
newC
olumns
,
persistent
,
clustered
);
return
new
TableData
(
this
,
t
ableName
,
id
,
c
olumns
,
persistent
,
clustered
);
}
/**
* Add a {@link TableLink} to the schema.
*
* @param id the object id
* @param tableName the table name of the alias
* @param driver the driver class name
* @param url the database URL
* @param user the user name
* @param password the password
* @param originalTable the table name of the target table
* @param emitUpdates if updates should be emitted instead of delete/insert
* @param force create the object even if the database can not be accessed
* @return the {@link TableLink} object
*/
public
TableLink
createTableLink
(
int
id
,
String
tableName
,
String
driver
,
String
url
,
String
user
,
String
password
,
String
originalTable
,
boolean
emitUpdates
,
boolean
force
)
throws
SQLException
{
return
new
TableLink
(
this
,
id
,
tableName
,
driver
,
url
,
user
,
password
,
originalTable
,
emitUpdates
,
force
);
...
...
h2/src/main/org/h2/schema/TriggerObject.java
浏览文件 @
0a8384cb
...
...
@@ -100,6 +100,14 @@ public class TriggerObject extends SchemaObjectBase {
return
list
;
}
/**
* Call the fire method of the user defined trigger class.
*
* @param session the session
* @param oldRow the old row
* @param newRow the new row
* @param beforeAction true if this method is called before the operation is applied
*/
public
void
fireRow
(
Session
session
,
Row
oldRow
,
Row
newRow
,
boolean
beforeAction
)
throws
SQLException
{
if
(!
rowBased
||
before
!=
beforeAction
)
{
return
;
...
...
h2/src/main/org/h2/server/pg/PgServer.java
浏览文件 @
0a8384cb
...
...
@@ -190,6 +190,17 @@ public class PgServer implements Service {
return
ifExists
;
}
/**
* The Java implementation of the PostgreSQL function pg_get_indexdef.
* The method is used to get CREATE INDEX command for an index,
* or the column definition of one column in the index.
*
* @param conn the connection
* @param indexId the index id
* @param ordinalPosition the ordinal position (null if the SQL statement should be returned)
* @param pretty this flag is ignored
* @return the SQL statement or the column name
*/
public
static
String
getIndexColumn
(
Connection
conn
,
int
indexId
,
Integer
ordinalPosition
,
Boolean
pretty
)
throws
SQLException
{
if
(
ordinalPosition
==
null
||
ordinalPosition
.
intValue
()
==
0
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论