mirror of
				https://github.com/VCMP-SqMod/SqMod.git
				synced 2025-11-04 00:07:19 +01:00 
			
		
		
		
	Allow chaining on Reset and Clear methods of the SQLite Statement type.
This commit is contained in:
		@@ -193,7 +193,7 @@ Object Statement::GetConnection() const
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ------------------------------------------------------------------------------------------------
 | 
			
		||||
void Statement::Reset()
 | 
			
		||||
Statement & Statement::Reset()
 | 
			
		||||
{
 | 
			
		||||
    VALIDATE_CREATED_HND(*this);
 | 
			
		||||
    // Specify that we don't have a row available and we haven't finished stepping
 | 
			
		||||
@@ -206,10 +206,12 @@ void Statement::Reset()
 | 
			
		||||
    {
 | 
			
		||||
        STHROWF("Unable to reset statement [%s]", m_Handle->ErrStr());
 | 
			
		||||
    }
 | 
			
		||||
    // Allow further chaining of operations
 | 
			
		||||
    return *this;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ------------------------------------------------------------------------------------------------
 | 
			
		||||
void Statement::Clear()
 | 
			
		||||
Statement & Statement::Clear()
 | 
			
		||||
{
 | 
			
		||||
    VALIDATE_CREATED_HND(*this);
 | 
			
		||||
    // Specify that we don't have a row available and we haven't finished stepping
 | 
			
		||||
@@ -222,6 +224,8 @@ void Statement::Clear()
 | 
			
		||||
    {
 | 
			
		||||
        STHROWF("Unable to clear statement [%s]", m_Handle->ErrStr());
 | 
			
		||||
    }
 | 
			
		||||
    // Allow further chaining of operations
 | 
			
		||||
    return *this;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ------------------------------------------------------------------------------------------------
 | 
			
		||||
 
 | 
			
		||||
@@ -330,12 +330,12 @@ public:
 | 
			
		||||
    /* --------------------------------------------------------------------------------------------
 | 
			
		||||
     * Reset the statement back to its initial position to be stepped again.
 | 
			
		||||
    */
 | 
			
		||||
    void Reset();
 | 
			
		||||
    Statement & Reset();
 | 
			
		||||
 | 
			
		||||
    /* --------------------------------------------------------------------------------------------
 | 
			
		||||
     * Clear any values binded to this statement.
 | 
			
		||||
    */
 | 
			
		||||
    void Clear();
 | 
			
		||||
    Statement & Clear();
 | 
			
		||||
 | 
			
		||||
    /* --------------------------------------------------------------------------------------------
 | 
			
		||||
     * Execute this statement and don't expect any rows to be returned.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user