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; |
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 |
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; |
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'; |
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; |
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 |
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; |
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 |
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])); |
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 |