1613 |
|
procedure TIBExtract.ListProcs(ProcDDLType: TProcDDLType; |
1614 |
|
ProcedureName: String; IncludeGrants: boolean); |
1615 |
|
const |
1616 |
< |
CreateProcedureStr1 = 'CREATE PROCEDURE %s '; |
1616 |
> |
CreateProcedureStr1 = 'CREATE PROCEDURE %s'; |
1617 |
|
CreateProcedureStr2 = 'BEGIN EXIT; END'; |
1618 |
|
CreateProcedureStr3 = 'BEGIN SUSPEND; EXIT; END'; |
1619 |
|
ProcedureSQL = {Order procedures by dependency order and then procedure name} |
1718 |
|
qryProcSecurity.ExecQuery; |
1719 |
|
ExtractOut(AddSQLSecurity(qryProcSecurity.FieldByName('RDB$SQL_SECURITY'))); |
1720 |
|
end; |
1721 |
< |
ExtractOut(ProcTerm+ LineEnding); |
1721 |
> |
ExtractOut(ProcTerm); |
1722 |
|
end; |
1723 |
|
|
1724 |
|
pdCreateProc: |
1746 |
|
ExtractOut(AddSQLSecurity(qryProcSecurity.FieldByName('RDB$SQL_SECURITY'))); |
1747 |
|
end; |
1748 |
|
|
1749 |
< |
ExtractOut(ProcTerm + LineEnding); |
1749 |
> |
ExtractOut(ProcTerm); |
1750 |
|
|
1751 |
|
end; |
1752 |
|
|
1753 |
|
pdAlterProc: |
1754 |
|
begin |
1755 |
< |
ExtractOut(Format('%sALTER PROCEDURE %s ', [LineEnding, |
1755 |
> |
ExtractOut(Format('%sALTER PROCEDURE %s', [LineEnding, |
1756 |
|
QuoteIdentifier( ProcName)])); |
1757 |
|
GetProcedureArgs(ProcName); |
1758 |
|
|
1759 |
|
if not qryProcedures.FieldByName('RDB$PROCEDURE_SOURCE').IsNull then |
1760 |
|
begin |
1761 |
|
SList.Text := qryProcedures.FieldByName('RDB$PROCEDURE_SOURCE').AsString; |
1762 |
< |
SList.Add(Format(' %s%s', [ProcTerm, LineEnding])); |
1762 |
> |
SList.Add(Format('%s', [ProcTerm])); |
1763 |
|
ExtractOut(SList); |
1764 |
|
end |
1765 |
|
else |
1766 |
< |
ExtractOut(Format(CreateProcedureStr2, [ProcTerm, LineEnding])); |
1766 |
> |
ExtractOut(CreateProcedureStr2 + ProcTerm); |
1767 |
|
end; |
1768 |
|
end; |
1769 |
|
if IncludeGrants then |