contentstorage/castorage/src/casqlquerycreator.cpp
changeset 104 9b022b1f357c
parent 80 397d00875918
child 109 e0aa398e6810
equal deleted inserted replaced
103:b99b84bcd2d1 104:9b022b1f357c
   816         query.Append( KSQLGetListByParentId1 );
   816         query.Append( KSQLGetListByParentId1 );
   817         query.Append( leftJoins );
   817         query.Append( leftJoins );
   818         query.Append( getListByParentId2withWhere );
   818         query.Append( getListByParentId2withWhere );
   819         CleanupStack::PopAndDestroy( &getListByParentId2withWhere );
   819         CleanupStack::PopAndDestroy( &getListByParentId2withWhere );
   820         }
   820         }
       
   821     else if ( aQuery->GetChildId() > 0 )
       
   822         {
       
   823         RBuf getListByCildIdwithWhere;
       
   824         getListByCildIdwithWhere.CleanupClosePushL();
       
   825         getListByCildIdwithWhere.CreateL( KSQLGetListByChildId().Length() + whereStatement.Length() );
       
   826         getListByCildIdwithWhere.AppendFormat( KSQLGetListByChildId, &whereStatement );
       
   827         
       
   828         query.ReAllocL( KSQLGetListByParentId1().Length() +  leftJoins.Length() +
       
   829                 getListByCildIdwithWhere.Length() );
       
   830         query.Append( KSQLGetListByParentId1 );
       
   831         query.Append( leftJoins );
       
   832         query.Append( getListByCildIdwithWhere );
       
   833         CleanupStack::PopAndDestroy( &getListByCildIdwithWhere );
       
   834         }
   821     else
   835     else
   822         {
   836         {
   823         query.CreateL( KSQLGetList1().Length() );
   837         query.CreateL( KSQLGetList1().Length() );
   824         query.Append( KSQLGetList1 );
   838         query.Append( KSQLGetList1 );
   825         query.ReAllocL( query.Length() + leftJoins.Length() + KSQLGetList2().Length() );
   839         query.ReAllocL( query.Length() + leftJoins.Length() + KSQLGetList2().Length() );