Sqlite datatypes

Hi,



I have a SQLite database that is used and created by Aurelius. When I use dates in my model these are created as REAL datatypes in SQLite and the values for dates are the Extended value types representing a TDatetime. But I need this to be strings like SQLite uses by default for example when you use DATETIME('now'). I need it to be strings because this SQLite database is replicated by a replication framework that expects these fields to be string values. Same goes for booleans, Aurelius uses "true' 'false' values. The replication framework uses '1' and '0'.



Is there way to influence the way Aurelius writes dates and booleans to the database?

There is a DateType property in SQLite SQL generator that can be used to configure how dates are saved in database:


TSQLiteSQLGenerator(TSQLGeneratorRegister.GetInstance.GetGenerator('SQLITE')).DateType := TDateType.Text;

for the boolean properties, though, you would have to create fake integer properties that get/set their value based on the property boolean value and persist those properties instead of the original boolean one.

Great! The dates are the bigger part of the problem. There are hundreds of them. The booleans are just a few instances I can work around them!



A while ago you mentioned you were thinking about a replication framework yourself. Any news?

Yes, being heavily considered, but no news so far due to our priority list. We couldn't get our hands on it yet.