equal
deleted
inserted
replaced
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
212 }; |
212 }; |
213 |
213 |
214 /** |
214 /** |
215 @return Represents the content of a text or a binary field as a stream of bytes. |
215 @return Represents the content of a text or a binary field as a stream of bytes. |
216 |
216 |
217 @leave KErrNoMemory, out of memory condition has occured; |
217 @leave KErrNoMemory, out of memory condition has occured, |
|
218 KErrArgument, the column type is not text, blob or null; |
218 */ |
219 */ |
219 MStreamBuf* TSqlBufRIterator::StreamL() const |
220 MStreamBuf* TSqlBufRIterator::StreamL() const |
220 { |
221 { |
221 __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); |
222 __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError); |
222 __SQLASSERT(::IsSequenceSqlType(Type()), ESqlPanicInternalError); |
223 if(!::IsSequenceSqlType(Type())) |
|
224 { |
|
225 __SQLLEAVE(KErrArgument); |
|
226 } |
223 return HReadOnlyBuf::NewL(reinterpret_cast <const TUint8*> (iBegin) + iCurrent->iPos, iCurrent->Size()); |
227 return HReadOnlyBuf::NewL(reinterpret_cast <const TUint8*> (iBegin) + iCurrent->iPos, iCurrent->Size()); |
224 } |
228 } |