persistentstorage/dbms/pcdbms/utable/UT_DASRC.CPP
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "UT_STD.H"
       
    17 
       
    18 // Class CDbDataSource
       
    19 
       
    20 CDbDataSource::TGoto CDbDataSource::GotoL(TDbPosition aPosition,TDbRecordId& aRecordId)
       
    21 	{
       
    22 	for (;;)
       
    23 		{
       
    24 		TInt work=KMaxTInt;
       
    25 		TGoto r=GotoL(work,aPosition,aRecordId);
       
    26 		if (r!=EExhausted)
       
    27 			return r;
       
    28 		}
       
    29 	}
       
    30 
       
    31 // Class CDbDataStage
       
    32 
       
    33 CDbDataStage::~CDbDataStage()
       
    34 	{
       
    35 	delete iSource;
       
    36 	}
       
    37 
       
    38 RDbRow* CDbDataStage::RowBuffer()
       
    39 	{
       
    40 	return Source().RowBuffer();
       
    41 	}
       
    42 
       
    43 TDbColumn CDbDataStage::Column(TDbColNo aColNo)
       
    44 	{
       
    45 	return Source().Column(aColNo);
       
    46 	}
       
    47 
       
    48 void CDbDataStage::Reset()
       
    49 	{
       
    50 	Source().Reset();
       
    51 	}
       
    52 
       
    53 TBool CDbDataStage::EvaluateL(TInt& aWork,TDbRecordId& aRecordId,TBool& aAtRow)
       
    54 	{
       
    55 	return Source().EvaluateL(aWork,aRecordId,aAtRow);
       
    56 	}
       
    57 
       
    58 TBool CDbDataStage::Unevaluated()
       
    59 	{
       
    60 	return Source().Unevaluated();
       
    61 	}
       
    62 
       
    63 TInt CDbDataStage::CountL()
       
    64 	{
       
    65 	return Source().CountL();
       
    66 	}
       
    67 
       
    68 CDbDataStage::TGoto CDbDataStage::GotoL(TInt& aWork,TDbPosition aPosition,TDbRecordId& aRecordId)
       
    69 	{
       
    70 	return Source().GotoL(aWork,aPosition,aRecordId);
       
    71 	}
       
    72 
       
    73 TBool CDbDataStage::GotoL(TDbRecordId aRecordId)
       
    74 	{
       
    75 	return Source().GotoL(aRecordId);
       
    76 	}
       
    77 
       
    78 void CDbDataStage::ReadRowL(TDbRecordId aRecordId)
       
    79 	{
       
    80 	Source().ReadRowL(aRecordId);
       
    81 	}
       
    82 
       
    83 void CDbDataStage::NewRowL(TDbRecordId aCopyRecord)
       
    84 	{
       
    85 	Source().NewRowL(aCopyRecord);
       
    86 	}
       
    87 
       
    88 void CDbDataStage::PrepareToWriteRowL(TWrite aWrite)
       
    89 	{
       
    90 	Source().PrepareToWriteRowL(aWrite);
       
    91 	}
       
    92 
       
    93 TDbRecordId CDbDataStage::WriteRowL(TWrite aWrite,TSynch aSynch)
       
    94 	{
       
    95 	return Source().WriteRowL(aWrite,aSynch);
       
    96 	}
       
    97 
       
    98 CDbDataStage::TDelete CDbDataStage::DeleteRowL(TDbRecordId& aRecordId,TSynch aSynch)
       
    99 	{
       
   100 	return Source().DeleteRowL(aRecordId,aSynch);
       
   101 	}
       
   102 
       
   103 TInt CDbDataStage::ColumnCount() const
       
   104 	{
       
   105 	return Source().ColumnCount();
       
   106 	}
       
   107 
       
   108 const TDbColumnDef& CDbDataStage::ColumnDef(TDbColNo aCol) const
       
   109 	{
       
   110 	return Source().ColumnDef(aCol);
       
   111 	}
       
   112 
       
   113 void CDbDataStage::SetIndexL(const TDesC*)
       
   114 //
       
   115 // Only invoked from a RDbTable.
       
   116 // No data stages are present for such a view
       
   117 //
       
   118 	{
       
   119 	__ASSERT(0);
       
   120 	}
       
   121 
       
   122 TBool CDbDataStage::SeekL(const TDbLookupKey&,RDbTable::TComparison,TDbRecordId&)
       
   123 //
       
   124 // Only invoked from a RDbTable.
       
   125 // No data stages are present for such a view
       
   126 //
       
   127 	{
       
   128 	__ASSERT(0);
       
   129 	return EFalse;
       
   130 	}
       
   131 
       
   132 CSqlSearchCondition* CDbDataStage::ParseConstraintLC(const TDesC& aCondition)
       
   133 	{
       
   134 	return Source().ParseConstraintLC(aCondition);
       
   135 	}
       
   136