mpserviceplugins/mpxsqlitedbhgplugin/src/mpxdbmusic.cpp
changeset 48 af3740e3753f
parent 42 79c49924ae23
child 51 560ce2306a17
equal deleted inserted replaced
42:79c49924ae23 48:af3740e3753f
   710 void CMPXDbMusic::ExecuteQueryAllSongsL(const TArray<TMPXAttribute>& aAttrs)
   710 void CMPXDbMusic::ExecuteQueryAllSongsL(const TArray<TMPXAttribute>& aAttrs)
   711     {
   711     {
   712     // Run query and add result media objects to the cache array.
   712     // Run query and add result media objects to the cache array.
   713     MPX_FUNC("CMPXDbMusic::ExecuteQueryAllSongsL");
   713     MPX_FUNC("CMPXDbMusic::ExecuteQueryAllSongsL");
   714 
   714 
   715     RSqlStatement recordset(iDbManager.ExecuteSelectQueryL(KQueryMusicGetAllSongs));
   715     RSqlStatement recordset(iDbManager.ExecuteSelectQueryL(KQueryMusicGetAllSongsMinimum));
   716     CleanupClosePushL(recordset);
   716     CleanupClosePushL(recordset);
   717 
   717 
   718     TInt err(KErrNone);
   718     TInt err(KErrNone);
   719     while ((err = recordset.Next()) == KSqlAtRow)
   719     while ((err = recordset.Next()) == KSqlAtRow)
   720         {
   720         {
  2434     // Create the table
  2434     // Create the table
  2435     User::LeaveIfError(aDatabase.Exec(KMusicCreateTable));
  2435     User::LeaveIfError(aDatabase.Exec(KMusicCreateTable));
  2436 
  2436 
  2437     // Do not create any other indexes than the one on UniqueId
  2437     // Do not create any other indexes than the one on UniqueId
  2438     // as they only slow down the database overall
  2438     // as they only slow down the database overall
       
  2439     User::LeaveIfError(aDatabase.Exec(KMusicDeletedTitleIndex));
  2439     }
  2440     }
  2440 
  2441 
  2441 // ----------------------------------------------------------------------------
  2442 // ----------------------------------------------------------------------------
  2442 // CMPXDbMusic::DropTableL
  2443 // CMPXDbMusic::DropTableL
  2443 // ----------------------------------------------------------------------------
  2444 // ----------------------------------------------------------------------------