qdb_vacuum()

Vacuum a database

Synopsis:

#include <qdb/qdb.h>

int qdb_vacuum ( qdb_hdt_t *hdl,
                 int        scope );

Arguments:

hdl
A pointer to the database handle.
scope
The scope of the operation. See the description of the scope argument to qdb_backup() for more information.

Library:

qdb

Description:

This function starts a vacuum operation on the specified database, as well as any auto-attached databases (databases listed in the specified datases's .aa file). This is an alternative to using the VACUUM command for each database.

You can call qdb_getdbsize() to determine whether a database should be vacuumed.

If the auto-vacuum mode is set (see the PRAGMA SQL command for details), databases are vacuumed whenever free space is created. By default, auto-vacuum mode is off.

Returns:

>0
Success.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes