changeset 22 | ecf06a08d4d9 |
parent 19 | 4e84c994a771 |
20:82baf59ce8dd | 22:ecf06a08d4d9 |
---|---|
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Hard coded queries for Podcast collection db |
14 * Description: Hard coded queries for Podcast collection db |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 |
17 |
19 |
18 |
20 #ifndef MPXPODCASTDBPLUGINQUERIES_H |
19 #ifndef MPXPODCASTDBPLUGINQUERIES_H |
21 #define MPXPODCASTDBPLUGINQUERIES_H |
20 #define MPXPODCASTDBPLUGINQUERIES_H |
22 |
21 |
65 _LIT(KQueryPodcastDeleteUpdate, "UPDATE :dbname.Podcast SET Deleted=1 WHERE UniqueId=%u"); |
64 _LIT(KQueryPodcastDeleteUpdate, "UPDATE :dbname.Podcast SET Deleted=1 WHERE UniqueId=%u"); |
66 _LIT(KQueryPodcastDeleteForCategory, "UPDATE :dbname.Podcast SET Deleted=0 WHERE %S=%u"); |
65 _LIT(KQueryPodcastDeleteForCategory, "UPDATE :dbname.Podcast SET Deleted=0 WHERE %S=%u"); |
67 _LIT(KQueryPodcastCleanup, "DELETE FROM :dbname.Podcast WHERE Deleted=1"); |
66 _LIT(KQueryPodcastCleanup, "DELETE FROM :dbname.Podcast WHERE Deleted=1"); |
68 |
67 |
69 _LIT(KQueryPodcastGetTitle, "SELECT Title FROM :dbname.Podcast WHERE Deleted=0 AND UniqueId=%u"); |
68 _LIT(KQueryPodcastGetTitle, "SELECT Title FROM :dbname.Podcast WHERE Deleted=0 AND UniqueId=%u"); |
70 _LIT(KQueryPodcastVolume, "SELECT VolumeId FROM :dbname.Podcast WHERE Deleted=0 AND UniqueId=%u"); |
69 _LIT(KQueryPodcastVolume, "SELECT VolumeId FROM :dbname.Podcast WHERE UniqueId=%u"); |
71 _LIT(KQueryPodcastAllVolumeIds, "SELECT VolumeId FROM :dbname.Podcast WHERE Deleted=0"); |
70 _LIT(KQueryPodcastAllVolumeIds, "SELECT VolumeId FROM :dbname.Podcast WHERE Deleted=0"); |
72 |
71 |
73 // LTAN-79N8ND/EVXG-7FABHC: temporary fix. Symbian 9.4 SQLite cannot resolve column number correctly, |
72 // LTAN-79N8ND/EVXG-7FABHC: temporary fix. Symbian 9.4 SQLite cannot resolve column number correctly, |
74 // Use column number instead of column name for ORDER BY, needed when FROM uses more than 1 table |
73 // Use column number instead of column name for ORDER BY, needed when FROM uses more than 1 table |
75 // calculate column number from SELECT fields, first field is column 1 (not 0) |
74 // calculate column number from SELECT fields, first field is column 1 (not 0) |
93 // As far as performance goes, the queries that only return five fields are a little faster than |
92 // As far as performance goes, the queries that only return five fields are a little faster than |
94 // the ones that return *, for example, for a * query that takes 2.1 seconds the equivalent |
93 // the ones that return *, for example, for a * query that takes 2.1 seconds the equivalent |
95 // optimized query is faster by more than 100ms. |
94 // optimized query is faster by more than 100ms. |
96 |
95 |
97 // categories included |
96 // categories included |
98 _LIT(KQueryPodcastGetEpisode, "SELECT Podcast.*,Artist.Name,Album.Name,Genre.Name,Composer.Name FROM :dbname.Podcast,:dbname.Artist,:dbname.Album,:dbname.Genre,:dbname.Composer WHERE Podcast.Deleted=0 AND Podcast.UniqueId=%u AND Podcast.Album=Album.UniqueId AND Podcast.Artist=Artist.UniqueId AND Podcast.Genre=Genre.UniqueId AND Podcast.Composer=Composer.UniqueId"); |
97 _LIT(KQueryPodcastGetEpisode, "SELECT Podcast.*,Artist.Name,Album.Name,Genre.Name,Composer.Name FROM :dbname.Podcast,:dbname.Artist,:dbname.Album,:dbname.Genre,:dbname.Composer WHERE Podcast.UniqueId=%u AND Podcast.Album=Album.UniqueId AND Podcast.Artist=Artist.UniqueId AND Podcast.Genre=Genre.UniqueId AND Podcast.Composer=Composer.UniqueId"); |
99 |
98 |
100 // LTAN-79N8ND/EVXG-7FABHC: temporary fix. Symbian 9.4 SQLite cannot resolve column number correctly, |
99 // LTAN-79N8ND/EVXG-7FABHC: temporary fix. Symbian 9.4 SQLite cannot resolve column number correctly, |
101 // Use column number instead of column name for ORDER BY, needed when FROM uses more than 1 table |
100 // Use column number instead of column name for ORDER BY, needed when FROM uses more than 1 table |
102 // calculate column number from SELECT fields, first field is column 1 (not 0) |
101 // calculate column number from SELECT fields, first field is column 1 (not 0) |
103 /* |
102 /* |