Changeset 14 for trunk/UCore.pas
- Timestamp:
- Mar 22, 2018, 7:59:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r13 r14 68 68 STypeTime = 'Time'; 69 69 STypeDateTime = 'Date and time'; 70 STypeReference = 'Reference'; 70 71 71 72 { TCore } … … 109 110 begin 110 111 for I := 0 to DataTypes.Count - 1 do begin 111 TDataType(DataTypes[I]). Name := CoolTranslator1.TranslateText(TDataType(DataTypes[I]).Name, TDataType(DataTypes[I]).Name);112 TDataType(DataTypes[I]).Title := CoolTranslator1.TranslateText(TDataType(DataTypes[I]).Title, TDataType(DataTypes[I]).Title); 112 113 end; 113 114 end; … … 130 131 131 132 NewEngine := Engines.RegisterEngine('MySQL', TDatabaseMySQL); 132 NewEngine.UseTypes(DataTypes, [ftString, ftInteger, ftDateTime, ftBoolean, ftFloat]); 133 NewEngine.UseTypes(DataTypes, [ftString, ftInteger, ftDateTime, ftBoolean, ftFloat, 134 ftReference]); 133 135 134 136 NewEngine := Engines.RegisterEngine('SQLite', TDatabaseSQLite); … … 140 142 DataTypes.Clear; 141 143 with DataTypes do begin 142 RegisterType(1, STypeString, ftString, TFieldString); 143 RegisterType(2, STypeInteger, ftInteger, TFieldInteger); 144 RegisterType(3, STypeDateTime, ftDateTime, TFieldDateTime); 145 RegisterType(4, STypeBoolean, ftBoolean, TFieldBoolean); 146 RegisterType(5, STypeFloat, ftFloat, TFieldFloat); 147 RegisterType(6, STypeMapPosition, ftMapPosition, TFieldMapPosition); 148 RegisterType(7, STypeDate, ftDate, TFieldDate); 149 RegisterType(8, STypeTime, ftTime, TFieldTime); 150 RegisterType(9, STypeImage, ftImage, TFieldImage); 144 RegisterType(1, 'String', STypeString, ftString, TFieldString); 145 RegisterType(2, 'Integer', STypeInteger, ftInteger, TFieldInteger); 146 RegisterType(3, 'DateTime', STypeDateTime, ftDateTime, TFieldDateTime); 147 RegisterType(4, 'Boolean', STypeBoolean, ftBoolean, TFieldBoolean); 148 RegisterType(5, 'Float', STypeFloat, ftFloat, TFieldFloat); 149 RegisterType(6, 'MapPosition', STypeMapPosition, ftMapPosition, TFieldMapPosition); 150 RegisterType(7, 'Date', STypeDate, ftDate, TFieldDate); 151 RegisterType(8, 'Time', STypeTime, ftTime, TFieldTime); 152 RegisterType(9, 'Image', STypeImage, ftImage, TFieldImage); 153 RegisterType(10, 'Reference', STypeReference, ftReference, TFieldReference); 151 154 end; 152 155 end; … … 174 177 Engine: TDatabaseEngine; 175 178 begin 179 XMLConfig1.FileName := 'Config.xml'; 176 180 Databases.Count := XMLConfig1.GetValue('Database/Count', 0); 177 181 for I := 0 to Databases.Count - 1 do begin
Note:
See TracChangeset
for help on using the changeset viewer.