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

Comparing ibx/trunk/design/IBDBReg.pas (file contents):
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC vs.
Revision 107 by tony, Thu Jan 18 14:37:40 2018 UTC

# Line 54 | Line 54 | interface
54  
55   uses SysUtils, Classes, Graphics, Dialogs, Controls, Forms, TypInfo,
56       DB, IBTable, IBDatabase,  IBEventsEditor,  LazarusPackageIntf,
57 <      IBUpdateSQL, ComponentEditors, PropEdits, DBPropEdits, FieldsEditor,
57 >      IBUpdateSQL, IBUpdate, ComponentEditors, PropEdits, DBPropEdits, FieldsEditor,
58       dbFieldLinkPropEditor, dbFieldListPropEditor, IBDialogs;
59  
60   type
# Line 83 | Line 83 | type
83      procedure GetValues(Proc: TGetStrProc); override;
84    end;
85  
86 +  { TIBPackageNameProperty
87 +    Editor for the TIBStoredProc.PackageName property.  Displays a drop-down list of all
88 +    the StoredProcedures in the Database.}
89 +  TIBPackageNameProperty = class(TIBNameProperty)
90 +  public
91 +    procedure GetValues(Proc: TGetStrProc); override;
92 +  end;
93 +
94    { TIBTableNameProperty
95      Editor for the TIBTable.TableName property.  Displays a drop-down list of all
96      the Tables in the Database.}
# Line 196 | Line 204 | type
204    end;
205  
206    TIBStoredProcParamsProperty = class(TCollectionPropertyEditor)
199  public
200    procedure Edit; override;
207    end;
208  
209    { TIBTableFieldLinkProperty }
# Line 416 | Line 422 | begin
422      Exit;
423    end;
424  
425 <  RegisterNoIcon([TIBStringField, TIBBCDField, TIBMemoField, TIBArrayField]);
425 >  RegisterNoIcon([TIBStringField, TIBBCDField, TIBMemoField, TIBArrayField,
426 >    TIBSmallintField, TIBIntegerField, TIBLargeIntField]);
427    {$if lcl_fullversion < 01010000}
428    {see http://bugs.freepascal.org/view.php?id=19035 }
429    RegisterNoIcon([TIntegerField]);
430    {$endif}
431    RegisterComponents(IBPalette1, [ TIBQuery, TIBDataSet,
432 <   TIBDatabase, TIBTransaction, TIBUpdateSQL, TIBEvents,
432 >   TIBDatabase, TIBTransaction, TIBUpdateSQL, TIBUpdate, TIBEvents,
433       TIBSQL, TIBDatabaseInfo, TIBSQLMonitor,
434         TIBStoredProc,TIBBatchMove,  TIBTable,TIBExtract, TIBXScript, TIBLocalDBSupport,
435         TIBBlockFormatOut,TIBCSVDataOut,TIBInsertStmtsOut]);
# Line 435 | Line 442 | begin
442    RegisterComponents(IBPalette3,[TIBLookupComboEditBox,TIBDynamicGrid,TIBTreeView,TDBControlGrid, TIBArrayGrid]);
443    RegisterPropertyEditor(TypeInfo(TIBFileName), TIBDatabase, 'DatabaseName', TIBFileNameProperty); {do not localize}
444    RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'StoredProcName', TIBStoredProcNameProperty); {do not localize}
445 +  RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'PackageName', TIBPackageNameProperty); {do not localize}
446    RegisterPropertyEditor(TypeInfo(TParams), TIBStoredProc, 'Params', TIBStoredProcParamsProperty);
447    RegisterPropertyEditor(TypeInfo(string), TIBTable, 'TableName', TIBTableNameProperty); {do not localize}
448    RegisterPropertyEditor(TypeInfo(string), TIBTable, 'IndexName', TIBIndexNameProperty); {do not localize}
# Line 456 | Line 464 | begin
464    RegisterPropertyEditor(TypeInfo(TStrings), TIBEvents, 'Events', TIBEventListProperty); {do not localize}
465    RegisterPropertyEditor(TypeInfo(TPersistent), TIBDataSet, 'GeneratorField', TIBGeneratorProperty);  {do not localize}
466    RegisterPropertyEditor(TypeInfo(TPersistent), TIBQuery, 'GeneratorField', TIBGeneratorProperty);  {do not localize}
467 +  RegisterPropertyEditor(TypeInfo(TPersistent), TIBTable, 'GeneratorField', TIBGeneratorProperty);  {do not localize}
468  
469    RegisterComponentEditor(TIBDatabase, TIBDatabaseEditor);
470    RegisterComponentEditor(TIBTransaction, TIBTransactionEditor);
# Line 503 | Line 512 | begin
512    end;
513   end;
514  
515 + { TIBPackageNameProperty }
516 +
517 + procedure TIBPackageNameProperty.GetValues(Proc: TGetStrProc);
518 + var
519 +   StoredProc : TIBStoredProc;
520 +   i : integer;
521 + begin
522 +    StoredProc := GetComponent(0) as TIBStoredProc;
523 +    if StoredProc.Database = nil then
524 +      Exit;
525 +
526 +    with StoredProc do
527 +    try
528 +      for I := 0 to PackageNames.Count - 1 do
529 +        Proc (PackageNames[i]);
530 +    except on E: Exception do
531 +      MessageDlg(E.Message,mtError,[mbOK],0)
532 +    end;
533 + end;
534 +
535   { TIBIndexDefsProperty }
536  
537   procedure TIBIndexDefsProperty.Edit;
# Line 835 | Line 864 | var
864    IBSQL: TIBSQL;
865   begin
866    IBSQL := GetComponent(0) as TIBSQL;
867 <  if IBSQLEditor.EditIBSQL(IBSQL) then Modified;
867 >  if IBSQLEditor.EditSQL(IBSQL) then Modified;
868   end;
869  
870   { TIBUpdateSQLEditor }
# Line 1040 | Line 1069 | begin
1069    Result := inherited GetVerbCount + 2;
1070   end;
1071  
1043 { TIBStoredProcParamsProperty }
1044
1045 procedure TIBStoredProcParamsProperty.Edit;
1046 var
1047  StoredProc: TIBStoredProc;
1048  Params: TParams;
1049 begin
1050  StoredProc := (GetComponent(0) as TIBStoredProc);
1051  Params := TParams.Create(nil);
1052  try
1053    StoredProc.CopyParams(Params);
1054  finally
1055    Params.Free;
1056  end;
1057  inherited Edit;
1058 end;
1059
1072   { TIBTableFieldLinkProperty }
1073  
1074   procedure TIBTableFieldLinkProperty.Edit;
# Line 1201 | Line 1213 | end;
1213  
1214   procedure TIBSQLEditor.ExecuteVerb(Index: Integer);
1215   begin
1216 <  if IBSQLEditor.EditIBSQL(TIBSQL(Component)) then Modified;
1216 >  if IBSQLEditor.EditSQL(TIBSQL(Component)) then Modified;
1217   end;
1218  
1219   function TIBSQLEditor.GetVerb(Index: Integer): string;
# Line 1224 | Line 1236 | var
1236    IBSQL: TIBSQL;
1237   begin
1238    IBSQL := GetComponent(0) as TIBSQL;
1239 <  if IBSQLEditor.EditIBSQL(IBSQL) then Modified;
1239 >  if IBSQLEditor.EditSQL(IBSQL) then Modified;
1240   end;
1241  
1242   initialization

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines