mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Use custom tab width and tabs-to-spaces setting uniquely in all places where we generate code. Provides a new CodeIndent() helper. Closes #1330
This commit is contained in:
@ -272,7 +272,7 @@ begin
|
||||
Result := CreateOrAlter + ' ';
|
||||
if comboDefiner.Text <> '' then
|
||||
Result := Result + 'DEFINER='+DBObject.Connection.QuoteIdent(comboDefiner.Text, True, '@')+' ';
|
||||
Result := Result + 'EVENT ' + DBObject.Connection.QuoteIdent(ObjName) + CRLF + #9 + 'ON SCHEDULE' + CRLF + #9#9;
|
||||
Result := Result + 'EVENT ' + DBObject.Connection.QuoteIdent(ObjName) + sLineBreak + CodeIndent + 'ON SCHEDULE' + sLineBreak + CodeIndent(2);
|
||||
if radioOnce.Checked then begin
|
||||
d := dateOnce.DateTime;
|
||||
ReplaceTime(d, timeOnce.DateTime);
|
||||
@ -297,14 +297,14 @@ begin
|
||||
end;
|
||||
|
||||
if chkDropAfterExpiration.Checked then
|
||||
Result := Result + #9 + 'ON COMPLETION NOT PRESERVE'
|
||||
Result := Result + CodeIndent + 'ON COMPLETION NOT PRESERVE'
|
||||
else
|
||||
Result := Result + #9 + 'ON COMPLETION PRESERVE';
|
||||
Result := Result + CodeIndent + 'ON COMPLETION PRESERVE';
|
||||
if ObjectExists and (DBObject.Name <> editName.Text) then
|
||||
Result := Result + CRLF + #9 + 'RENAME TO ' + DBObject.Connection.QuoteIdent(editName.Text);
|
||||
Result := Result + CRLF + #9 + UpperCase(grpState.Items[grpState.ItemIndex]);
|
||||
Result := Result + CRLF + #9 + 'COMMENT ' + DBObject.Connection.EscapeString(editComment.Text);
|
||||
Result := Result + CRLF + #9 + 'DO ' + SynMemoBody.Text;
|
||||
Result := Result + sLineBreak + CodeIndent + 'RENAME TO ' + DBObject.Connection.QuoteIdent(editName.Text);
|
||||
Result := Result + sLineBreak + CodeIndent + UpperCase(grpState.Items[grpState.ItemIndex]);
|
||||
Result := Result + sLineBreak + CodeIndent + 'COMMENT ' + DBObject.Connection.EscapeString(editComment.Text);
|
||||
Result := Result + sLineBreak + CodeIndent + 'DO ' + SynMemoBody.Text;
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user