Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
739e2a0d
提交
739e2a0d
authored
11月 13, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The interface CloseListener has a new method 'remove' that is called when the trigger is dropped.
上级
f6940b7f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
25 行增加
和
20 行删除
+25
-20
CloseListener.java
h2/src/main/org/h2/api/CloseListener.java
+7
-0
Trigger.java
h2/src/main/org/h2/api/Trigger.java
+13
-20
TriggerObject.java
h2/src/main/org/h2/schema/TriggerObject.java
+5
-0
没有找到文件。
h2/src/main/org/h2/api/CloseListener.java
浏览文件 @
739e2a0d
...
@@ -22,5 +22,12 @@ public interface CloseListener {
...
@@ -22,5 +22,12 @@ public interface CloseListener {
* @throws SQLException
* @throws SQLException
*/
*/
void
close
()
throws
SQLException
;
void
close
()
throws
SQLException
;
/**
* This method is called when the trigger is dropped.
*
* @throws SQLException
*/
void
remove
()
throws
SQLException
;
}
}
h2/src/main/org/h2/api/Trigger.java
浏览文件 @
739e2a0d
...
@@ -33,19 +33,14 @@ public interface Trigger {
...
@@ -33,19 +33,14 @@ public interface Trigger {
* This method is called by the database engine once when initializing the
* This method is called by the database engine once when initializing the
* trigger.
* trigger.
*
*
* @param conn
* @param conn a connection to the database
* a connection to the database
* @param schemaName the name of the schema
* @param schemaName
* @param triggerName the name of the trigger used in the CREATE TRIGGER
* the name of the schema
* statement
* @param triggerName
* @param tableName the name of the table
* the name of the trigger used in the CREATE TRIGGER statement
* @param before whether the fire method is called before or after the
* @param tableName
* the name of the table
* @param before
* whether the fire method is called before or after the
* operation is performed
* operation is performed
* @param type
* @param type the operation type: INSERT, UPDATE, or DELETE
* the operation type: INSERT, UPDATE, or DELETE
*/
*/
void
init
(
Connection
conn
,
String
schemaName
,
String
triggerName
,
String
tableName
,
boolean
before
,
int
type
)
void
init
(
Connection
conn
,
String
schemaName
,
String
triggerName
,
String
tableName
,
boolean
before
,
int
type
)
throws
SQLException
;
throws
SQLException
;
...
@@ -53,14 +48,12 @@ public interface Trigger {
...
@@ -53,14 +48,12 @@ public interface Trigger {
/**
/**
* This method is called for each triggered action.
* This method is called for each triggered action.
*
*
* @param conn
* @param conn a connection to the database
* a connection to the database
* @param oldRow the old row, or null if no old row is available (for
* @param oldRow
* INSERT)
* the old row, or null if no old row is available (for INSERT)
* @param newRow the new row, or null if no new row is available (for
* @param newRow
* DELETE)
* the new row, or null if no new row is available (for DELETE)
* @throws SQLException if the operation must be undone
* @throws SQLException
* if the operation must be undone
*/
*/
void
fire
(
Connection
conn
,
Object
[]
oldRow
,
Object
[]
newRow
)
throws
SQLException
;
void
fire
(
Connection
conn
,
Object
[]
oldRow
,
Object
[]
newRow
)
throws
SQLException
;
...
...
h2/src/main/org/h2/schema/TriggerObject.java
浏览文件 @
739e2a0d
...
@@ -285,6 +285,11 @@ public class TriggerObject extends SchemaObjectBase {
...
@@ -285,6 +285,11 @@ public class TriggerObject extends SchemaObjectBase {
public
void
removeChildrenAndResources
(
Session
session
)
throws
SQLException
{
public
void
removeChildrenAndResources
(
Session
session
)
throws
SQLException
{
table
.
removeTrigger
(
this
);
table
.
removeTrigger
(
this
);
database
.
removeMeta
(
session
,
getId
());
database
.
removeMeta
(
session
,
getId
());
if
(
triggerCallback
!=
null
)
{
if
(
triggerCallback
instanceof
CloseListener
)
{
((
CloseListener
)
triggerCallback
).
remove
();
}
}
table
=
null
;
table
=
null
;
triggerClassName
=
null
;
triggerClassName
=
null
;
triggerCallback
=
null
;
triggerCallback
=
null
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论