Include events in SQL export

This commit is contained in:
Ansgar Becker
2010-04-11 23:22:50 +00:00
parent 2cda425c39
commit f7abafca8f

View File

@ -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);