persistentstorage/sql/SRC/Server/SqlSrvStatement.inl
branchRCL_3
changeset 24 cc28652e0254
parent 23 26645d81f48d
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl	Tue Aug 31 16:57:14 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl	Wed Sep 01 12:39:58 2010 +0100
@@ -33,7 +33,7 @@
 inline HSqlSrvStmtParamBuf* HSqlSrvStmtParamBuf::NewL(CSqlSrvStatement& aStatement, TInt aParamIndex, 
 													  HSqlSrvStmtParamBuf::TDataType aDataType, HSqlSrvStmtParamBuf::TBufType aBufType)
 	{
-	__ASSERT_DEBUG(aParamIndex >= 0, __SQLPANIC2(ESqlPanicBadArgument));
+	__SQLASSERT(aParamIndex >= 0, ESqlPanicBadArgument);
 	HSqlSrvStmtParamBuf* self = new (ELeave) HSqlSrvStmtParamBuf(aStatement, aParamIndex, aDataType, aBufType);
 	self->PushL();
 	self->ConstructL();
@@ -53,7 +53,7 @@
 */
 inline void HSqlSrvStmtParamBuf::Reset(HSqlSrvStmtParamBuf::TDataType aDataType, HSqlSrvStmtParamBuf::TBufType aBufType)
 	{
-	__ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj));
+	__SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj);
 	
 	iStatementFinalized = EFalse;
 	iAlive = ETrue;
@@ -65,7 +65,7 @@
 	if(iBuf->Capacity() > (HSqlSrvStmtParamBuf::EExpandSize * 2))
 		{
 		TRAPD(err, iBuf->SetReserveL(HSqlSrvStmtParamBuf::EExpandSize * 2));//the buffer size is minimized, the call can't fail
-		__ASSERT_ALWAYS(err == KErrNone, __SQLPANIC(ESqlPanicInternalError));
+		__SQLASSERT_ALWAYS(err == KErrNone, ESqlPanicInternalError);
 		}
 	Set(*iBuf, 0, MStreamBuf::ERead | MStreamBuf::EWrite);
 	}
@@ -83,8 +83,8 @@
 */
 inline const TPtrC8 HSqlSrvStmtParamBuf::SetDataL(const TDesC8& aData)
 	{
-	__ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj));
-	__ASSERT_DEBUG(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, __SQLPANIC(ESqlPanicInternalError));
+	__SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj);
+	__SQLASSERT(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, ESqlPanicInternalError);
 	iBuf->ResizeL(aData.Length());
 	iBuf->Write(0, aData);
 	//If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL)
@@ -100,7 +100,7 @@
 */
 inline const TPtrC8 HSqlSrvStmtParamBuf::Data() const
 	{
-	__ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj));
+	__SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj);
 	//If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL)
 	return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0);
 	}
@@ -122,7 +122,7 @@
 */
 inline TInt HSqlSrvStmtParamBuf::ParamIndex() const
 	{
-	__ASSERT_DEBUG(iParamIndex >= 0, __SQLPANIC(ESqlPanicInternalError));
+	__SQLASSERT(iParamIndex >= 0, ESqlPanicInternalError);
 	return iParamIndex;
 	}
 
@@ -182,7 +182,7 @@
 */	
 inline TInt CSqlSrvStatement::Next()
 	{
-	__ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));
+	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
 	TInt err = ::StmtNext(iStmtHandle);
 	iBufFlatType = static_cast <TSqlBufFlatType> (-1);
 	iBufFlat.ResetAndMinimize();
@@ -202,7 +202,7 @@
 */	
 inline TInt CSqlSrvStatement::Reset()
 	{
-	__ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));
+	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
 	iBufFlatType = static_cast <TSqlBufFlatType> (-1);
 	iBufFlat.ResetAndMinimize();
 	return ::StmtReset(iStmtHandle);
@@ -221,7 +221,7 @@
 */	
 inline TInt CSqlSrvStatement::Exec()
 	{
-	__ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));
+	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
 	TInt err = ::StmtExec(iStmtHandle);
 	iBufFlatType = static_cast <TSqlBufFlatType> (-1);
 	iBufFlat.ResetAndMinimize();
@@ -233,7 +233,7 @@
 */
 inline const RSqlBufFlat& CSqlSrvStatement::BufFlatL(TSqlBufFlatType aWhat) const
 	{
-	__ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));
+	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
 	if(aWhat != iBufFlatType)
 		{
 		__SQLLEAVE(KErrArgument);
@@ -262,7 +262,7 @@
 */	
 inline void CSqlSrvStatement::ConstructL(sqlite3* aDbHandle, const TDesC16& aSqlStmt)
 	{
-	__ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC(ESqlPanicBadArgument));
+	__SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument);
 	iStmtHandle = ::StmtPrepare16L(aDbHandle, aSqlStmt);
 	DoCommonConstructL();
 	}
@@ -282,7 +282,7 @@
 */	
 inline void CSqlSrvStatement::ConstructL(sqlite3* aDbHandle, const TDesC8& aSqlStmt)
 	{
-	__ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC(ESqlPanicBadArgument));
+	__SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument);
 	iStmtHandle = ::StmtPrepare8L(aDbHandle, aSqlStmt);
 	DoCommonConstructL();
 	}