27 |
|
{ IBX For Lazarus (Firebird Express) } |
28 |
|
{ Contributor: Tony Whyman, MWA Software http://www.mwasoftware.co.uk } |
29 |
|
{ Portions created by MWA Software are copyright McCallum Whyman } |
30 |
< |
{ Associates Ltd 2011 } |
30 |
> |
{ Associates Ltd 2011 - 2018 } |
31 |
|
{ } |
32 |
|
{************************************************************************} |
33 |
|
|
59 |
|
FMasterLink: TMasterDataLink; |
60 |
|
FMasterFieldsList: TStringList; |
61 |
|
FDetailFieldsList: TStringList; |
62 |
– |
FStoreDefs: Boolean; |
62 |
|
FIndexDefs: TIndexDefs; |
63 |
|
FDefaultIndex: Boolean; |
64 |
|
FReadOnly: Boolean; |
70 |
|
FSwitchingIndex: Boolean; |
71 |
|
FPrimaryIndexFields: string; |
72 |
|
FTableTypes: TIBTableTypes; |
73 |
+ |
FStoreDefs: boolean; |
74 |
|
WhereAllRefreshSQL: TStrings; |
75 |
|
WhereDBKeyRefreshSQL: TStrings; |
76 |
|
WherePrimaryRefreshSQL: TStrings; |
97 |
|
function GetExists: Boolean; |
98 |
|
procedure SetIndexDefs(Value: TIndexDefs); |
99 |
|
procedure ExtractLinkFields; |
100 |
– |
function FieldDefsStored: Boolean; |
100 |
|
function IndexDefsStored: Boolean; |
101 |
|
function GetMasterFields: string; |
102 |
|
procedure SetMasterFields(const Value: string); |
155 |
|
property DataSetCloseAction; |
156 |
|
// property Constraints stored ConstraintsStored; |
157 |
|
property DefaultIndex: Boolean read FDefaultIndex write FDefaultIndex default True; |
159 |
– |
property FieldDefs stored FieldDefsStored; |
158 |
|
property Filter; |
159 |
|
property Filtered; |
160 |
|
property GeneratorField; |
428 |
|
Query.SQL.Text := 'Select ''foo'' from RDB$RELATION_CONSTRAINTS ' + |
429 |
|
'where RDB$RELATION_NAME = ' + |
430 |
|
'''' + |
431 |
< |
FormatIdentifierValue(Database.SQLDialect, |
431 |
> |
ExtractIdentifier(Database.SQLDialect, |
432 |
|
QuoteIdentifier(DataBase.SQLDialect, FTableName)) + |
433 |
|
''' ' + |
434 |
|
' AND RDB$CONSTRAINT_NAME = ' + |
435 |
|
'''' + |
436 |
< |
FormatIdentifierValue(Database.SQLDialect, |
436 |
> |
ExtractIdentifier(Database.SQLDialect, |
437 |
|
QuoteIdentifier(DataBase.SQLDialect, Name)) + |
438 |
|
''' ' + |
439 |
|
'AND RDB$CONSTRAINT_TYPE = ''PRIMARY KEY'''; |
465 |
|
Query.SQL.Text := 'Select RDB$CONSTRAINT_NAME from RDB$RELATION_CONSTRAINTS ' + |
466 |
|
'where RDB$RELATION_NAME = ' + |
467 |
|
'''' + |
468 |
< |
FormatIdentifierValue(Database.SQLDialect, |
468 |
> |
ExtractIdentifier(Database.SQLDialect, |
469 |
|
QuoteIdentifier(DataBase.SQLDialect, FTableName)) + |
470 |
|
''' ' + |
471 |
|
'AND RDB$INDEX_NAME = ' + |
472 |
|
'''' + |
473 |
< |
FormatIdentifierValue(Database.SQLDialect, |
473 |
> |
ExtractIdentifier(Database.SQLDialect, |
474 |
|
QuoteIdentifier(DataBase.SQLDialect, Name)) + |
475 |
|
''' ' + |
476 |
|
'AND RDB$CONSTRAINT_TYPE = ''PRIMARY KEY'''; |
586 |
|
'I.RDB$SEGMENT_COUNT, S.RDB$FIELD_NAME from RDB$INDICES I, ' + {do not localize} |
587 |
|
'RDB$INDEX_SEGMENTS S where I.RDB$INDEX_NAME = S.RDB$INDEX_NAME '+ {do not localize} |
588 |
|
'and I.RDB$RELATION_NAME = ' + '''' + {do not localize} |
589 |
< |
FormatIdentifierValue(Database.SQLDialect, |
589 |
> |
ExtractIdentifier(Database.SQLDialect, |
590 |
|
QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''''; |
591 |
|
Query.Prepare; |
592 |
|
Query.ExecQuery; |
618 |
|
SubQuery.SQL.Text := |
619 |
|
'Select RDB$FIELD_NAME from RDB$INDEX_SEGMENTS where RDB$INDEX_NAME = ' + {do not localize} |
620 |
|
'''' + |
621 |
< |
FormatIdentifierValue(Database.SQLDialect, |
621 |
> |
ExtractIdentifier(Database.SQLDialect, |
622 |
|
QuoteIdentifier(DataBase.SQLDialect, Name)) + |
623 |
|
'''' + 'ORDER BY RDB$FIELD_POSITION'; {do not localize} |
624 |
|
SubQuery.Prepare; |
669 |
|
Query.SQL.Text := |
670 |
|
'Select USER from RDB$RELATIONS where RDB$RELATION_NAME = ' + {do not localize} |
671 |
|
'''' + |
672 |
< |
FormatIdentifierValue(Database.SQLDialect, |
672 |
> |
ExtractIdentifier(Database.SQLDialect, |
673 |
|
QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''''; |
674 |
|
Query.Prepare; |
675 |
|
Query.ExecQuery; |
916 |
|
Query.SQL.Text := 'Select RDB$SYSTEM_FLAG, RDB$DBKEY_LENGTH ' + {do not localize} |
917 |
|
'from RDB$RELATIONS where RDB$RELATION_NAME = ' + {do not localize} |
918 |
|
'''' + |
919 |
< |
FormatIdentifierValue(Database.SQLDialect, |
919 |
> |
ExtractIdentifier(Database.SQLDialect, |
920 |
|
QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''''; |
921 |
|
Query.Prepare; |
922 |
|
Query.ExecQuery; |
931 |
|
end; |
932 |
|
end; |
933 |
|
|
936 |
– |
function TIBTable.FieldDefsStored: Boolean; |
937 |
– |
begin |
938 |
– |
Result := StoreDefs and (FieldDefs.Count > 0); |
939 |
– |
end; |
940 |
– |
|
934 |
|
function TIBTable.IndexDefsStored: Boolean; |
935 |
|
begin |
936 |
|
Result := StoreDefs and (IndexDefs.Count > 0); |