ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/udr/source/FBUDRController.pas
(Generate patch)

Comparing ibx/branches/udr/udr/source/FBUDRController.pas (file contents):
Revision 394 by tony, Sat Feb 12 23:26:48 2022 UTC vs.
Revision 395 by tony, Mon Feb 14 11:31:04 2022 UTC

# Line 285 | Line 285 | type
285                     metadata: IFBUDRRoutineMetadata;
286                     inBuilder: IFBUDRMetadataBuilder;
287                     outBuilder: IFBUDRMetadataBuilder); virtual;
288 +
289 +     procedure InitFunction; virtual;
290       property Name: AnsiString read FName;
291       property Controller: TFBUDRController read FController;
292       property FirebirdAPI: IFirebirdAPI read FFirebirdAPI;
# Line 365 | Line 367 | type
367                       metadata: IFBUDRRoutineMetadata;
368                       inBuilder: IFBUDRMetadataBuilder;
369                       outBuilder: IFBUDRMetadataBuilder); virtual;
370 +     procedure InitProcedure; virtual;
371       property Name: AnsiString read FName;
372       property Controller: TFBUDRController read FController;
373     public
# Line 592 | Line 595 | type
595                     metadata: IFBUDRRoutineMetadata;
596                     fieldsBuilder: IFBUDRMetadataBuilder); virtual;
597  
598 +    procedure InitTrigger; virtual;
599 +
600      property Name: AnsiString read FName;
601      property Controller: TFBUDRController read FController;
602      property FirebirdAPI: IFirebirdAPI read FFirebirdAPI;
# Line 665 | Line 670 | resourcestring
670    SProcDispose = 'Procedure %s: dispose called with refcount = %d';
671    SProcCharset = 'GetCharSet for Procedure %s charset name = "%s"';
672    sFuncCreated = 'Function %s created';
673 +  sProcCreated = 'Procedure %s created';
674 +  sTriggerCreated = 'Trigger %s created';
675    SInputParams = 'Input Parameters';
676    SOutputParams = 'Output Parameters';
677    SOutputData = 'Output Parameters with data';
# Line 1091 | Line 1098 | begin
1098    FName := aName;
1099    FController := aController;
1100    FRoutineMetaData := routineMetadata;
1101 +  InitTrigger;
1102 +  if loLogTriggers in FBUDRControllerOptions.LogOptions then
1103 +  begin
1104 +    FController.WriteToLog(Format(sTriggerCreated,[aName]));
1105 +    if loDetails in FBUDRControllerOptions.LogOptions then
1106 +       FController.WriteToLog((FRoutineMetaData as TFBUDRRoutineMetadata).AsText);
1107 +  end;
1108   end;
1109  
1110   function TFBUDRTrigger.getCharSet(context: IFBUDRExternalContext): AnsiString;
# Line 1124 | Line 1138 | begin
1138    //Override in subclass
1139   end;
1140  
1141 + procedure TFBUDRTrigger.InitTrigger;
1142 + begin
1143 +  //override in subclass if necessary
1144 + end;
1145 +
1146   procedure TFBUDRTrigger.dispose();
1147   begin
1148    if loLogTriggers in FBUDRControllerOptions.LogOptions then
# Line 1427 | Line 1446 | begin
1446    FName := aName;
1447    FRefCount := 1;
1448    FRoutineMetaData := routineMetadata;
1449 +  InitProcedure;
1450 +  if loLogProcedures in FBUDRControllerOptions.LogOptions then
1451 +  begin
1452 +    FController.WriteToLog(Format(sProcCreated,[aName]));
1453 +    if loDetails in FBUDRControllerOptions.LogOptions then
1454 +       FController.WriteToLog((FRoutineMetaData as TFBUDRRoutineMetadata).AsText);
1455 +  end;
1456   end;
1457  
1458   function TFBUDRProcedure.getCharSet(context: IFBUDRExternalContext): AnsiString;
# Line 1441 | Line 1467 | begin
1467    //Override in subclass
1468   end;
1469  
1470 + procedure TFBUDRProcedure.InitProcedure;
1471 + begin
1472 +  //override in sublass if necessary
1473 + end;
1474 +
1475   procedure TFBUDRProcedure.dispose();
1476   begin
1477    if loLogProcedures in FBUDRControllerOptions.LogOptions then
# Line 1572 | Line 1603 | begin
1603    FController := aController;
1604    FName := aName;
1605    FRoutineMetaData := routineMetadata;
1606 +  InitFunction;
1607    if loLogFunctions in FBUDRControllerOptions.LogOptions then
1608    begin
1609      FController.WriteToLog(Format(sFuncCreated,[aName]));
# Line 1606 | Line 1638 | begin
1638    //Do nothing be default
1639   end;
1640  
1641 + procedure TFBUDRFunction.InitFunction;
1642 + begin
1643 +  //override if necessary
1644 + end;
1645 +
1646   procedure TFBUDRFunction.dispose();
1647   begin
1648    if loLogFunctions in FBUDRControllerOptions.LogOptions then

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines