mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 21:41:36 +08:00
文件末尾添加换行符
This commit is contained in:
@@ -113,24 +113,24 @@ class Oracle extends Driver{
|
||||
/**
|
||||
* 获取最后插入id ,仅适用于采用序列+触发器结合生成ID的方式
|
||||
* 在config.php中指定
|
||||
'DB_TRIGGER_PREFIX' => 'tr_',
|
||||
'DB_SEQUENCE_PREFIX' => 'ts_',
|
||||
* 'DB_TRIGGER_PREFIX' => 'tr_',
|
||||
* 'DB_SEQUENCE_PREFIX' => 'ts_',
|
||||
* eg:表 tb_user
|
||||
相对tb_user的序列为:
|
||||
-- Create sequence
|
||||
create sequence TS_USER
|
||||
minvalue 1
|
||||
maxvalue 999999999999999999999999999
|
||||
start with 1
|
||||
increment by 1
|
||||
nocache;
|
||||
相对tb_user,ts_user的触发器为:
|
||||
create or replace trigger TR_USER
|
||||
before insert on "TB_USER"
|
||||
for each row
|
||||
begin
|
||||
select "TS_USER".nextval into :NEW.ID from dual;
|
||||
end;
|
||||
* 相对tb_user的序列为:
|
||||
* -- Create sequence
|
||||
* create sequence TS_USER
|
||||
* minvalue 1
|
||||
* maxvalue 999999999999999999999999999
|
||||
* start with 1
|
||||
* increment by 1
|
||||
* nocache;
|
||||
* 相对tb_user,ts_user的触发器为:
|
||||
* create or replace trigger TR_USER
|
||||
* before insert on "TB_USER"
|
||||
* for each row
|
||||
* begin
|
||||
* select "TS_USER".nextval into :NEW.ID from dual;
|
||||
* end;
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
@@ -169,4 +169,4 @@ class Oracle extends Driver{
|
||||
if(!$lock) return '';
|
||||
return ' FOR UPDATE NOWAIT ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user