mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Include events in SQL export
This commit is contained in:
@ -961,7 +961,7 @@ const
|
||||
end;
|
||||
|
||||
begin
|
||||
// Handle one table, view or routine in SQL export mode
|
||||
// Handle one table, view or whatever in SQL export mode
|
||||
AddResults('SELECT '+esc(DBObj.Database)+' AS '+Mainform.mask('Database')+', ' +
|
||||
esc(DBObj.Name)+' AS '+Mainform.mask('Table')+', ' +
|
||||
IntToStr(DBObj.Rows)+' AS '+Mainform.mask('Rows')+', '+
|
||||
@ -1095,6 +1095,16 @@ begin
|
||||
if ToFile or ToDir or ToClipboard then
|
||||
Struc := 'DELIMITER ' + TempDelim + CRLF + Struc + TempDelim + CRLF + 'DELIMITER ';
|
||||
end;
|
||||
|
||||
lntEvent: begin
|
||||
Struc := Mainform.Connection.GetVar('SHOW CREATE '+UpperCase(DBObj.ObjType)+' '+m(DBObj.Database)+'.'+m(DBObj.Name), 'Create Event');
|
||||
MultiSQL := Explode(';', Struc);
|
||||
Struc := ImplodeStr(';'+CRLF, MultiSQL);
|
||||
if ToDb then
|
||||
Insert(m(FinalDbName)+'.', Struc, Pos('EVENT', Struc) + 6 );
|
||||
if ToFile or ToDir or ToClipboard then
|
||||
Struc := 'DELIMITER ' + TempDelim + CRLF + Struc + TempDelim + CRLF + 'DELIMITER ';
|
||||
end;
|
||||
end;
|
||||
Struc := fixNewlines(Struc);
|
||||
Output(Struc, True, True, True, True, True);
|
||||
|
Reference in New Issue
Block a user