mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
Imrpovements over the Entity Generator
This commit is contained in:
parent
ec9140f2a7
commit
9356cca93d
@ -511,6 +511,64 @@ type
|
|||||||
property f_blob: TStream read ff_blob write ff_blob;
|
property f_blob: TStream read ff_blob write ff_blob;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
[MVCNameCase(ncLowerCase)]
|
||||||
|
[MVCTable('default_values_test')]
|
||||||
|
TDefaultValuesTest = class(TCustomEntity)
|
||||||
|
private
|
||||||
|
[MVCTableField('f_int2', [foPrimaryKey])]
|
||||||
|
ff_int2: NullableInt16;
|
||||||
|
[MVCTableField('f_int4')]
|
||||||
|
ff_int4: NullableInt32;
|
||||||
|
[MVCTableField('f_int8')]
|
||||||
|
ff_int8: NullableInt64;
|
||||||
|
[MVCTableField('f_date')]
|
||||||
|
ff_date: NullableTDate;
|
||||||
|
[MVCTableField('f_time')]
|
||||||
|
ff_time: NullableTTime;
|
||||||
|
[MVCTableField('f_bool')]
|
||||||
|
ff_bool: NullableBoolean;
|
||||||
|
[MVCTableField('f_datetime')]
|
||||||
|
ff_datetime: NullableTDateTime;
|
||||||
|
[MVCTableField('f_float4')]
|
||||||
|
ff_float4: NullableSingle;
|
||||||
|
[MVCTableField('f_float8')]
|
||||||
|
ff_float8: NullableDouble;
|
||||||
|
[MVCTableField('f_string')]
|
||||||
|
ff_string: NullableString;
|
||||||
|
[MVCTableField('f_currency')]
|
||||||
|
ff_currency: NullableCurrency;
|
||||||
|
[MVCTableField('f_blob')]
|
||||||
|
ff_blob: TStream;
|
||||||
|
public
|
||||||
|
constructor Create; override;
|
||||||
|
destructor Destroy; override;
|
||||||
|
// f_int2 int2 NULL,
|
||||||
|
property f_int2: NullableInt16 read ff_int2 write ff_int2;
|
||||||
|
// f_int4 int4 NULL,
|
||||||
|
property f_int4: NullableInt32 read ff_int4 write ff_int4;
|
||||||
|
// f_int8 int8 NULL,
|
||||||
|
property f_int8: NullableInt64 read ff_int8 write ff_int8;
|
||||||
|
// f_string varchar NULL,
|
||||||
|
property f_string: NullableString read ff_string write ff_string;
|
||||||
|
// f_bool bool NULL,
|
||||||
|
property f_bool: NullableBoolean read ff_bool write ff_bool;
|
||||||
|
// f_date date NULL,
|
||||||
|
property f_date: NullableTDate read ff_date write ff_date;
|
||||||
|
// f_time time NULL,
|
||||||
|
property f_time: NullableTTime read ff_time write ff_time;
|
||||||
|
// f_datetime timestamp NULL,
|
||||||
|
property f_datetime: NullableTDateTime read ff_datetime write ff_datetime;
|
||||||
|
// f_float4 float4 NULL,
|
||||||
|
property f_float4: NullableSingle read ff_float4 write ff_float4;
|
||||||
|
// f_float8 float8 NULL,
|
||||||
|
property f_float8: NullableDouble read ff_float8 write ff_float8;
|
||||||
|
// f_currency numeric(18,4) NULL
|
||||||
|
property f_currency: NullableCurrency read ff_currency write ff_currency;
|
||||||
|
// f_blob bytea NULL
|
||||||
|
property f_blob: TStream read ff_blob write ff_blob;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
[MVCNameCase(ncLowerCase)]
|
[MVCNameCase(ncLowerCase)]
|
||||||
[MVCTable('complex_types')]
|
[MVCTable('complex_types')]
|
||||||
TComplexTypes = class(TCustomEntity)
|
TComplexTypes = class(TCustomEntity)
|
||||||
@ -821,4 +879,18 @@ begin
|
|||||||
FID := Value;
|
FID := Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TDefaultValuesTest }
|
||||||
|
|
||||||
|
constructor TDefaultValuesTest.Create;
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
ff_blob := TMemoryStream.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TDefaultValuesTest.Destroy;
|
||||||
|
begin
|
||||||
|
ff_blob.Free;
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -1301,7 +1301,6 @@ begin
|
|||||||
lValue := StrToInt(GetPartitionInfo.FieldValues[I])
|
lValue := StrToInt(GetPartitionInfo.FieldValues[I])
|
||||||
else
|
else
|
||||||
lValue := GetPartitionInfo.FieldValues[I];
|
lValue := GetPartitionInfo.FieldValues[I];
|
||||||
// lPar.DataTypeName := fPartitionInfo.FieldValues[I];
|
|
||||||
MapTValueToParam(lValue, lPar);
|
MapTValueToParam(lValue, lPar);
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
@ -2,99 +2,73 @@ object MainForm: TMainForm
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Caption = '[DMVCFramework] MVCActiveRecord Entity Generator'
|
Caption = '[DMVCFramework] MVCActiveRecord Entity Generator'
|
||||||
ClientHeight = 1720
|
ClientHeight = 687
|
||||||
ClientWidth = 2989
|
ClientWidth = 1192
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -40
|
Font.Height = -16
|
||||||
Font.Name = 'Segoe UI'
|
Font.Name = 'Segoe UI'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
Menu = MainMenu1
|
Menu = MainMenu1
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
PixelsPerInch = 240
|
TextHeight = 21
|
||||||
TextHeight = 54
|
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 1358
|
Top = 542
|
||||||
Width = 2989
|
Width = 1192
|
||||||
Height = 7
|
Height = 3
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ExplicitWidth = 2983
|
ExplicitTop = 543
|
||||||
|
ExplicitWidth = 1196
|
||||||
end
|
end
|
||||||
object pcMain: TPageControl
|
object pcMain: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 2989
|
Width = 1192
|
||||||
Height = 1358
|
Height = 542
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
ActivePage = tsTablesMapping
|
ActivePage = tsTablesMapping
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitWidth = 2969
|
|
||||||
ExplicitHeight = 1356
|
|
||||||
object tsConnectionDefinition: TTabSheet
|
object tsConnectionDefinition: TTabSheet
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Connection Definition'
|
Caption = 'Connection Definition'
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 223
|
Top = 89
|
||||||
Width = 2969
|
Width = 1184
|
||||||
Height = 1048
|
Height = 417
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'Panel1'
|
Caption = 'Panel1'
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -28
|
Font.Height = -11
|
||||||
Font.Name = 'Tahoma'
|
Font.Name = 'Tahoma'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 9
|
Left = 4
|
||||||
Top = 9
|
Top = 4
|
||||||
Width = 2951
|
Width = 1176
|
||||||
Height = 34
|
Height = 13
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Caption = 'FireDAC connection parameters'
|
Caption = 'FireDAC connection parameters'
|
||||||
ExplicitWidth = 392
|
ExplicitWidth = 152
|
||||||
end
|
end
|
||||||
object mmConnectionParams: TMemo
|
object mmConnectionParams: TMemo
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 9
|
Left = 4
|
||||||
Top = 59
|
Top = 23
|
||||||
Width = 1956
|
Width = 778
|
||||||
Height = 980
|
Height = 390
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = ANSI_CHARSET
|
Font.Charset = ANSI_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -33
|
Font.Height = -13
|
||||||
Font.Name = 'Consolas'
|
Font.Name = 'Consolas'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
@ -104,14 +78,10 @@ object MainForm: TMainForm
|
|||||||
OnChange = mmConnectionParamsChange
|
OnChange = mmConnectionParamsChange
|
||||||
end
|
end
|
||||||
object Panel6: TPanel
|
object Panel6: TPanel
|
||||||
Left = 1973
|
Left = 785
|
||||||
Top = 51
|
Top = 20
|
||||||
Width = 995
|
Width = 398
|
||||||
Height = 996
|
Height = 396
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alRight
|
Align = alRight
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'Panel6'
|
Caption = 'Panel6'
|
||||||
@ -119,33 +89,25 @@ object MainForm: TMainForm
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object GroupBox1: TGroupBox
|
object GroupBox1: TGroupBox
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 8
|
Left = 3
|
||||||
Top = 8
|
Top = 3
|
||||||
Width = 979
|
Width = 392
|
||||||
Height = 980
|
Height = 390
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'Filter by Schema'
|
Caption = 'Filter by Schema'
|
||||||
Padding.Left = 13
|
Padding.Left = 5
|
||||||
Padding.Top = 13
|
Padding.Top = 5
|
||||||
Padding.Right = 13
|
Padding.Right = 5
|
||||||
Padding.Bottom = 13
|
Padding.Bottom = 5
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object lstSchema: TListBox
|
object lstSchema: TListBox
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 23
|
Left = 10
|
||||||
Top = 57
|
Top = 23
|
||||||
Width = 933
|
Width = 372
|
||||||
Height = 900
|
Height = 357
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ItemHeight = 34
|
ItemHeight = 13
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -154,37 +116,33 @@ object MainForm: TMainForm
|
|||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 2969
|
Width = 1184
|
||||||
Height = 223
|
Height = 89
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 48
|
Left = 19
|
||||||
Top = 30
|
Top = 12
|
||||||
Width = 706
|
Width = 276
|
||||||
Height = 54
|
Height = 21
|
||||||
Margins.Left = 25
|
Margins.Left = 10
|
||||||
Margins.Top = 25
|
Margins.Top = 10
|
||||||
Margins.Right = 25
|
Margins.Right = 10
|
||||||
Margins.Bottom = 25
|
Margins.Bottom = 10
|
||||||
Caption = 'Select a FireDAC Connection Definitions'
|
Caption = 'Select a FireDAC Connection Definitions'
|
||||||
Layout = tlCenter
|
Layout = tlCenter
|
||||||
end
|
end
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 1512
|
Left = 620
|
||||||
Top = 26
|
Top = 11
|
||||||
Width = 1431
|
Width = 553
|
||||||
Height = 171
|
Height = 67
|
||||||
Margins.Left = 25
|
Margins.Left = 10
|
||||||
Margins.Top = 25
|
Margins.Top = 10
|
||||||
Margins.Right = 25
|
Margins.Right = 10
|
||||||
Margins.Bottom = 25
|
Margins.Bottom = 10
|
||||||
Align = alRight
|
Align = alRight
|
||||||
Caption =
|
Caption =
|
||||||
'Please, select the FireDAC connection definition from the combo ' +
|
'Please, select the FireDAC connection definition from the combo ' +
|
||||||
@ -193,18 +151,16 @@ object MainForm: TMainForm
|
|||||||
'generated from that set of tables.'
|
'generated from that set of tables.'
|
||||||
Layout = tlCenter
|
Layout = tlCenter
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
ExplicitHeight = 162
|
ExplicitLeft = 605
|
||||||
|
ExplicitTop = 10
|
||||||
|
ExplicitHeight = 63
|
||||||
end
|
end
|
||||||
object cboConnectionDefs: TComboBox
|
object cboConnectionDefs: TComboBox
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 48
|
Left = 19
|
||||||
Top = 115
|
Top = 46
|
||||||
Width = 690
|
Width = 276
|
||||||
Height = 62
|
Height = 29
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = cboConnectionDefsChange
|
OnChange = cboConnectionDefsChange
|
||||||
@ -212,70 +168,47 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tsTablesMapping: TTabSheet
|
object tsTablesMapping: TTabSheet
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Tables Mapping'
|
Caption = 'Tables Mapping'
|
||||||
ImageIndex = 2
|
ImageIndex = 2
|
||||||
object Panel3: TPanel
|
object Panel3: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 2969
|
Width = 1184
|
||||||
Height = 1271
|
Height = 506
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'Panel3'
|
Caption = 'Panel3'
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitWidth = 2949
|
|
||||||
ExplicitHeight = 1269
|
|
||||||
object Panel4: TPanel
|
object Panel4: TPanel
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 2967
|
Width = 1182
|
||||||
Height = 377
|
Height = 151
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'Panel4'
|
Caption = 'Panel4'
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitWidth = 2947
|
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
2967
|
1182
|
||||||
377)
|
151)
|
||||||
object btnGenEntities: TButton
|
object btnGenEntities: TButton
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 3059
|
Left = 1214
|
||||||
Top = -1
|
Top = 0
|
||||||
Width = 403
|
Width = 161
|
||||||
Height = 88
|
Height = 35
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
Caption = 'Generate Entities'
|
Caption = 'Generate Entities'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitLeft = 3039
|
|
||||||
end
|
end
|
||||||
object chkGenerateMapping: TCheckBox
|
object chkGenerateMapping: TCheckBox
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 25
|
Left = 10
|
||||||
Top = 289
|
Top = 116
|
||||||
Width = 2934
|
Width = 1169
|
||||||
Height = 80
|
Height = 32
|
||||||
Margins.Left = 25
|
Margins.Left = 10
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Caption =
|
Caption =
|
||||||
'Register entities in ActiveRecordMappingRegistry (needed by TMVC' +
|
'Register entities in ActiveRecordMappingRegistry (needed by TMVC' +
|
||||||
@ -284,17 +217,12 @@ object MainForm: TMainForm
|
|||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
ExplicitWidth = 2914
|
|
||||||
end
|
end
|
||||||
object rgNameCase: TRadioGroup
|
object rgNameCase: TRadioGroup
|
||||||
Left = 18
|
Left = 7
|
||||||
Top = 23
|
Top = 9
|
||||||
Width = 982
|
Width = 393
|
||||||
Height = 260
|
Height = 104
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Class MVCNameCase'
|
Caption = 'Class MVCNameCase'
|
||||||
Columns = 3
|
Columns = 3
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
@ -308,14 +236,10 @@ object MainForm: TMainForm
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object rgFieldNameFormatting: TRadioGroup
|
object rgFieldNameFormatting: TRadioGroup
|
||||||
Left = 1015
|
Left = 406
|
||||||
Top = 23
|
Top = 9
|
||||||
Width = 973
|
Width = 389
|
||||||
Height = 260
|
Height = 104
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Field Names Formatting'
|
Caption = 'Field Names Formatting'
|
||||||
ItemIndex = 1
|
ItemIndex = 1
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
@ -324,25 +248,17 @@ object MainForm: TMainForm
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object gbOptions: TGroupBox
|
object gbOptions: TGroupBox
|
||||||
Left = 2004
|
Left = 802
|
||||||
Top = 23
|
Top = 9
|
||||||
Width = 837
|
Width = 334
|
||||||
Height = 263
|
Height = 105
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Other Options'
|
Caption = 'Other Options'
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object chkClassAsAbstract: TCheckBox
|
object chkClassAsAbstract: TCheckBox
|
||||||
Left = 40
|
Left = 16
|
||||||
Top = 80
|
Top = 32
|
||||||
Width = 581
|
Width = 232
|
||||||
Height = 43
|
Height = 17
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Declare classes as abstract'
|
Caption = 'Declare classes as abstract'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
@ -350,41 +266,27 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 9
|
Left = 4
|
||||||
Top = 514
|
Top = 206
|
||||||
Width = 2951
|
Width = 1176
|
||||||
Height = 748
|
Height = 296
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
ActivePage = TabSheet1
|
ActivePage = TabSheet1
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitWidth = 2931
|
|
||||||
ExplicitHeight = 746
|
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Tables'
|
Caption = 'Tables'
|
||||||
object DBGrid1: TDBGrid
|
object DBGrid1: TDBGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 2931
|
Width = 1168
|
||||||
Height = 558
|
Height = 219
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
DataSource = dsrcTablesMapping
|
DataSource = dsrcTablesMapping
|
||||||
DefaultDrawing = False
|
DefaultDrawing = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TitleFont.Charset = DEFAULT_CHARSET
|
TitleFont.Charset = DEFAULT_CHARSET
|
||||||
TitleFont.Color = clWindowText
|
TitleFont.Color = clWindowText
|
||||||
TitleFont.Height = -40
|
TitleFont.Height = -16
|
||||||
TitleFont.Name = 'Segoe UI'
|
TitleFont.Name = 'Segoe UI'
|
||||||
TitleFont.Style = []
|
TitleFont.Style = []
|
||||||
OnCellClick = DBGrid1CellClick
|
OnCellClick = DBGrid1CellClick
|
||||||
@ -398,57 +300,42 @@ object MainForm: TMainForm
|
|||||||
'yes'
|
'yes'
|
||||||
'no')
|
'no')
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
Width = 215
|
Width = 86
|
||||||
Visible = True
|
Visible = True
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Expanded = False
|
Expanded = False
|
||||||
FieldName = 'TABLE_NAME'
|
FieldName = 'TABLE_NAME'
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
Width = 1195
|
Width = 478
|
||||||
Visible = True
|
Visible = True
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Expanded = False
|
Expanded = False
|
||||||
FieldName = 'CLASS_NAME'
|
FieldName = 'CLASS_NAME'
|
||||||
Width = 1360
|
|
||||||
Visible = True
|
Visible = True
|
||||||
end>
|
end>
|
||||||
end
|
end
|
||||||
object Panel7: TPanel
|
object Panel7: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 558
|
Top = 219
|
||||||
Width = 2931
|
Width = 1168
|
||||||
Height = 103
|
Height = 41
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitTop = 556
|
|
||||||
ExplicitWidth = 2911
|
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 8
|
Left = 3
|
||||||
Top = 23
|
Top = 9
|
||||||
Width = 359
|
Width = 140
|
||||||
Height = 54
|
Height = 21
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Filter for table name'
|
Caption = 'Filter for table name'
|
||||||
end
|
end
|
||||||
object EditTableNameFilter: TEdit
|
object EditTableNameFilter: TEdit
|
||||||
Left = 373
|
Left = 149
|
||||||
Top = 15
|
Top = 6
|
||||||
Width = 690
|
Width = 276
|
||||||
Height = 62
|
Height = 29
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = EditTableNameFilterChange
|
OnChange = EditTableNameFilterChange
|
||||||
end
|
end
|
||||||
@ -457,69 +344,64 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
object Panel10: TPanel
|
object Panel10: TPanel
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 378
|
Top = 152
|
||||||
Width = 2967
|
Width = 1182
|
||||||
Height = 128
|
Height = 51
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Caption = 'Panel10'
|
Caption = 'Panel10'
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitWidth = 2947
|
|
||||||
object SpeedButton1: TSpeedButton
|
object SpeedButton1: TSpeedButton
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 450
|
Left = 180
|
||||||
Top = 20
|
Top = 8
|
||||||
Width = 405
|
Width = 162
|
||||||
Height = 90
|
Height = 36
|
||||||
Margins.Left = 13
|
Margins.Left = 5
|
||||||
Margins.Top = 13
|
Margins.Top = 5
|
||||||
Margins.Right = 13
|
Margins.Right = 5
|
||||||
Margins.Bottom = 13
|
Margins.Bottom = 5
|
||||||
Caption = 'Select All'
|
Caption = 'Select All'
|
||||||
OnClick = SpeedButton1Click
|
OnClick = SpeedButton1Click
|
||||||
end
|
end
|
||||||
object SpeedButton2: TSpeedButton
|
object SpeedButton2: TSpeedButton
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 880
|
Left = 352
|
||||||
Top = 20
|
Top = 8
|
||||||
Width = 408
|
Width = 163
|
||||||
Height = 90
|
Height = 36
|
||||||
Margins.Left = 13
|
Margins.Left = 5
|
||||||
Margins.Top = 13
|
Margins.Top = 5
|
||||||
Margins.Right = 13
|
Margins.Right = 5
|
||||||
Margins.Bottom = 13
|
Margins.Bottom = 5
|
||||||
Caption = 'Select None'
|
Caption = 'Select None'
|
||||||
OnClick = SpeedButton2Click
|
OnClick = SpeedButton2Click
|
||||||
end
|
end
|
||||||
object SpeedButton3: TSpeedButton
|
object SpeedButton3: TSpeedButton
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 1313
|
Left = 525
|
||||||
Top = 20
|
Top = 8
|
||||||
Width = 405
|
Width = 162
|
||||||
Height = 90
|
Height = 36
|
||||||
Margins.Left = 13
|
Margins.Left = 5
|
||||||
Margins.Top = 13
|
Margins.Top = 5
|
||||||
Margins.Right = 13
|
Margins.Right = 5
|
||||||
Margins.Bottom = 13
|
Margins.Bottom = 5
|
||||||
Caption = 'Invert Selection'
|
Caption = 'Invert Selection'
|
||||||
OnClick = SpeedButton3Click
|
OnClick = SpeedButton3Click
|
||||||
end
|
end
|
||||||
object btnGetTables: TButton
|
object btnGetTables: TButton
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 18
|
Left = 7
|
||||||
Top = 20
|
Top = 8
|
||||||
Width = 407
|
Width = 163
|
||||||
Height = 90
|
Height = 36
|
||||||
Margins.Left = 13
|
Margins.Left = 5
|
||||||
Margins.Top = 13
|
Margins.Top = 5
|
||||||
Margins.Right = 13
|
Margins.Right = 5
|
||||||
Margins.Bottom = 13
|
Margins.Bottom = 5
|
||||||
Action = actRefreshTableList
|
Action = actRefreshTableList
|
||||||
Constraints.MinWidth = 400
|
Constraints.MinWidth = 160
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -528,58 +410,39 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
object Panel8: TPanel
|
object Panel8: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 1583
|
Top = 632
|
||||||
Width = 2989
|
Width = 1192
|
||||||
Height = 137
|
Height = 55
|
||||||
Margins.Left = 8
|
Margins.Right = 6
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 15
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitTop = 1581
|
|
||||||
ExplicitWidth = 2969
|
|
||||||
object btnPrev: TButton
|
object btnPrev: TButton
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 2445
|
Left = 975
|
||||||
Top = 8
|
Top = 3
|
||||||
Width = 260
|
Width = 104
|
||||||
Height = 121
|
Height = 49
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Action = TabPreviousTab1
|
Action = TabPreviousTab1
|
||||||
Align = alRight
|
Align = alRight
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitLeft = 2425
|
|
||||||
end
|
end
|
||||||
object btnNext: TButton
|
object btnNext: TButton
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 2721
|
Left = 1085
|
||||||
Top = 8
|
Top = 3
|
||||||
Width = 260
|
Width = 104
|
||||||
Height = 121
|
Height = 49
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Action = TabNextTab1
|
Action = TabNextTab1
|
||||||
Align = alRight
|
Align = alRight
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitLeft = 2701
|
|
||||||
end
|
end
|
||||||
object Panel5: TPanel
|
object Panel5: TPanel
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 8
|
Left = 3
|
||||||
Top = 8
|
Top = 3
|
||||||
Width = 2235
|
Width = 894
|
||||||
Height = 121
|
Height = 49
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelKind = bkTile
|
BevelKind = bkTile
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
@ -587,48 +450,32 @@ object MainForm: TMainForm
|
|||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Label6: TLabel
|
object Label6: TLabel
|
||||||
Left = 18
|
Left = 7
|
||||||
Top = 28
|
Top = 11
|
||||||
Width = 325
|
Width = 126
|
||||||
Height = 54
|
Height = 21
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Caption = 'Output File Name:'
|
Caption = 'Output File Name:'
|
||||||
end
|
end
|
||||||
object btnSaveAs: TSpeedButton
|
object btnSaveAs: TSpeedButton
|
||||||
Left = 1635
|
Left = 654
|
||||||
Top = 10
|
Top = 4
|
||||||
Width = 138
|
Width = 55
|
||||||
Height = 93
|
Height = 37
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Action = actSaveGeneratedCode
|
Action = actSaveGeneratedCode
|
||||||
end
|
end
|
||||||
object EditOutputFileName: TEdit
|
object EditOutputFileName: TEdit
|
||||||
Left = 348
|
Left = 139
|
||||||
Top = 20
|
Top = 8
|
||||||
Width = 1272
|
Width = 509
|
||||||
Height = 62
|
Height = 29
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object Button6: TButton
|
object Button6: TButton
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 1788
|
Left = 715
|
||||||
Top = 10
|
Top = 4
|
||||||
Width = 397
|
Width = 159
|
||||||
Height = 93
|
Height = 37
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Action = actGenerateCode
|
Action = actGenerateCode
|
||||||
Images = ImageListButtons
|
Images = ImageListButtons
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -637,41 +484,30 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
object Panel12: TPanel
|
object Panel12: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 1365
|
Top = 545
|
||||||
Width = 2989
|
Width = 1192
|
||||||
Height = 218
|
Height = 87
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'Panel12'
|
Caption = 'Panel12'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitTop = 1363
|
|
||||||
ExplicitWidth = 2969
|
|
||||||
object lbLog: TListBox
|
object lbLog: TListBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 2989
|
Width = 1192
|
||||||
Height = 218
|
Height = 87
|
||||||
Margins.Left = 8
|
|
||||||
Margins.Top = 8
|
|
||||||
Margins.Right = 8
|
|
||||||
Margins.Bottom = 8
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelInner = bvNone
|
BevelInner = bvNone
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Font.Charset = ANSI_CHARSET
|
Font.Charset = ANSI_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -40
|
Font.Height = -16
|
||||||
Font.Name = 'Consolas'
|
Font.Name = 'Consolas'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
ItemHeight = 47
|
ItemHeight = 19
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
ScrollWidth = 5000
|
ScrollWidth = 5000
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitWidth = 2969
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object FDConnection: TFDConnection
|
object FDConnection: TFDConnection
|
||||||
@ -1174,4 +1010,16 @@ object MainForm: TMainForm
|
|||||||
Left = 96
|
Left = 96
|
||||||
Top = 176
|
Top = 176
|
||||||
end
|
end
|
||||||
|
object FDMoniFlatFileClientLink1: TFDMoniFlatFileClientLink
|
||||||
|
Left = 1088
|
||||||
|
Top = 56
|
||||||
|
end
|
||||||
|
object FDMoniCustomClientLink1: TFDMoniCustomClientLink
|
||||||
|
Left = 1096
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
object FDMoniRemoteClientLink1: TFDMoniRemoteClientLink
|
||||||
|
Left = 1104
|
||||||
|
Top = 72
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -54,7 +54,8 @@ uses
|
|||||||
Vcl.ExtActns, System.ImageList, Vcl.ImgList,
|
Vcl.ExtActns, System.ImageList, Vcl.ImgList,
|
||||||
LoggerPro.FileAppender,
|
LoggerPro.FileAppender,
|
||||||
LoggerPro.VCLListBoxAppender,
|
LoggerPro.VCLListBoxAppender,
|
||||||
LoggerPro;
|
LoggerPro, FireDAC.Moni.RemoteClient, FireDAC.Moni.Custom, FireDAC.Moni.Base,
|
||||||
|
FireDAC.Moni.FlatFile;
|
||||||
|
|
||||||
type
|
type
|
||||||
TSelectionType = (stAll, stNone, stInverse);
|
TSelectionType = (stAll, stNone, stInverse);
|
||||||
@ -149,6 +150,9 @@ type
|
|||||||
Button6: TButton;
|
Button6: TButton;
|
||||||
gbOptions: TGroupBox;
|
gbOptions: TGroupBox;
|
||||||
chkClassAsAbstract: TCheckBox;
|
chkClassAsAbstract: TCheckBox;
|
||||||
|
FDMoniFlatFileClientLink1: TFDMoniFlatFileClientLink;
|
||||||
|
FDMoniCustomClientLink1: TFDMoniCustomClientLink;
|
||||||
|
FDMoniRemoteClientLink1: TFDMoniRemoteClientLink;
|
||||||
procedure cboConnectionDefsChange(Sender: TObject);
|
procedure cboConnectionDefsChange(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
@ -1177,6 +1181,10 @@ begin
|
|||||||
if pcMain.ActivePage = tsTablesMapping then
|
if pcMain.ActivePage = tsTablesMapping then
|
||||||
begin
|
begin
|
||||||
actRefreshTableList.Execute;
|
actRefreshTableList.Execute;
|
||||||
|
if EditOutputFileName.Text = '' then
|
||||||
|
begin
|
||||||
|
EditOutputFileName.Text := TPath.Combine(TPath.GetDocumentsPath, 'EntitiesU.pas');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user