1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-15 22:57:12 +02:00

Added options to control the memory allocated for the query queue.

Fixed const-correctness in several methods of the SQLite connection.
This commit is contained in:
Sandu Liviu Catalin
2016-03-23 05:50:58 +02:00
parent 1a312f7e7f
commit 41f5cfe663
3 changed files with 31 additions and 4 deletions

View File

@ -488,20 +488,36 @@ public:
}
/* --------------------------------------------------------------------------------------------
* Remove all queries from the queue without executing them.
* Reserve space upfront for the specified amount of queries in the query queue.
*/
void ClearQueue() const
void ReserveQueue(Uint32 num);
/* --------------------------------------------------------------------------------------------
* Release memory that is not occupied from the query queue.
*/
void CompactQueue()
{
// Validate the handle
Validate();
// Return the requested information
// Perform the requested operation
m_Handle->mQueue.shrink_to_fit();
}
/* --------------------------------------------------------------------------------------------
* Remove all queries from the queue without executing them.
*/
void ClearQueue()
{
// Validate the handle
Validate();
// Perform the requested operation
m_Handle->mQueue.clear();
}
/* --------------------------------------------------------------------------------------------
* Remove the last query from the queue.
*/
void PopQueue() const
void PopQueue()
{
// Validate the handle
Validate();