persistentstorage/sql/SRC/Server/SqlSrvStatement.inl
changeset 31 ba1c4f4a893f
parent 17 55f2396f6d25
child 40 b8bdbc8f59c7
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl	Thu Jul 01 17:02:22 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl	Tue Jul 06 11:54:49 2010 +0100
@@ -33,7 +33,7 @@
 inline HSqlSrvStmtParamBuf* HSqlSrvStmtParamBuf::NewL(CSqlSrvStatement& aStatement, TInt aParamIndex, 
 													  HSqlSrvStmtParamBuf::TDataType aDataType, HSqlSrvStmtParamBuf::TBufType aBufType)
 	{
-	__SQLASSERT(aParamIndex >= 0, ESqlPanicBadArgument);
+	__ASSERT_DEBUG(aParamIndex >= 0, __SQLPANIC2(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)
 	{
-	__SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj);
+	__ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(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
-		__SQLASSERT_ALWAYS(err == KErrNone, ESqlPanicInternalError);
+		__ASSERT_ALWAYS(err == KErrNone, __SQLPANIC(ESqlPanicInternalError));
 		}
 	Set(*iBuf, 0, MStreamBuf::ERead | MStreamBuf::EWrite);
 	}
@@ -83,8 +83,8 @@
 */
 inline const TPtrC8 HSqlSrvStmtParamBuf::SetDataL(const TDesC8& aData)
 	{
-	__SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj);
-	__SQLASSERT(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, ESqlPanicInternalError);
+	__ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj));
+	__ASSERT_DEBUG(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, __SQLPANIC(ESqlPanicInternalError));
 	iBuf->ResizeL(aData.Length());
 	iBuf->Write(0, aData);
 	return iBuf->Ptr(0);
@@ -99,7 +99,7 @@
 */
 inline const TPtrC8 HSqlSrvStmtParamBuf::Data() const
 	{
-	__SQLASSERT(iBuf != NULL, ESqlPanicInvalidObj);
+	__ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj));
 	return iBuf->Ptr(0);
 	}
 
@@ -120,7 +120,7 @@
 */
 inline TInt HSqlSrvStmtParamBuf::ParamIndex() const
 	{
-	__SQLASSERT(iParamIndex >= 0, ESqlPanicInternalError);
+	__ASSERT_DEBUG(iParamIndex >= 0, __SQLPANIC(ESqlPanicInternalError));
 	return iParamIndex;
 	}
 
@@ -180,7 +180,7 @@
 */	
 inline TInt CSqlSrvStatement::Next()
 	{
-	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
+	__ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));
 	TInt err = ::StmtNext(iStmtHandle);
 	iBufFlatType = static_cast <TSqlBufFlatType> (-1);
 	iBufFlat.ResetAndMinimize();
@@ -200,7 +200,7 @@
 */	
 inline TInt CSqlSrvStatement::Reset()
 	{
-	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
+	__ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));
 	iBufFlatType = static_cast <TSqlBufFlatType> (-1);
 	iBufFlat.ResetAndMinimize();
 	return ::StmtReset(iStmtHandle);
@@ -219,7 +219,7 @@
 */	
 inline TInt CSqlSrvStatement::Exec()
 	{
-	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
+	__ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));
 	TInt err = ::StmtExec(iStmtHandle);
 	iBufFlatType = static_cast <TSqlBufFlatType> (-1);
 	iBufFlat.ResetAndMinimize();
@@ -231,7 +231,7 @@
 */
 inline const RSqlBufFlat& CSqlSrvStatement::BufFlatL(TSqlBufFlatType aWhat) const
 	{
-	__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
+	__ASSERT_DEBUG(iStmtHandle != NULL, __SQLPANIC(ESqlPanicInvalidObj));
 	if(aWhat != iBufFlatType)
 		{
 		__SQLLEAVE(KErrArgument);
@@ -260,7 +260,7 @@
 */	
 inline void CSqlSrvStatement::ConstructL(sqlite3* aDbHandle, const TDesC16& aSqlStmt)
 	{
-	__SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument);
+	__ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC(ESqlPanicBadArgument));
 	iStmtHandle = ::StmtPrepare16L(aDbHandle, aSqlStmt);
 	DoCommonConstructL();
 	}
@@ -280,7 +280,7 @@
 */	
 inline void CSqlSrvStatement::ConstructL(sqlite3* aDbHandle, const TDesC8& aSqlStmt)
 	{
-	__SQLASSERT(aDbHandle != NULL, ESqlPanicBadArgument);
+	__ASSERT_DEBUG(aDbHandle != NULL, __SQLPANIC(ESqlPanicBadArgument));
 	iStmtHandle = ::StmtPrepare8L(aDbHandle, aSqlStmt);
 	DoCommonConstructL();
 	}