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:
@ -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();
|
||||
|
Reference in New Issue
Block a user