For an Android app, I have implemented a ContentProvider for accessing a SQLite database. Now I want to add additional values for a fixed set of non-existing fields to the query. For the consumer, there is no difference between table field an transient field. Because the fields have to be part of the contract. How can I enhance the query inside the ContentProvider so that the Cursor includes these fields. As an example: The database table 'event' has a field 'timestamp' and the query should be enhanced with a transient field 'duration', calculated at runtime by the timestamps of two selected entries.
Aucun commentaire:
Enregistrer un commentaire