_ZN10QSqlResult9execBatchEb

Name

QSqlResult::execBatch -- executes a prepared query in batch mode

Synopsis

#include <QtSql/qsqlresult.h>

bool QSqlResult::execBatch (bool arrayBind);

Description

The QSqlResult::execBatch() function shall execute a prepared query in batch mode if the driver supports it, otherwise it should emulate a batch execution (for example, using bindValue() and exec() functions).

The QSqlDriver::hasFeature() can be used to find out whether a driver supports batch execution.

Batch execution can be faster for large amounts of data since it reduces network roundtrips.

For batch executions, bound values have to be provided as lists of variants (QVariantList). Each list must contain values of the same type. All lists must contain equal amount of values (rows).

NULL values should be passed in as typed QVariants, for example QVariant(QVariant::Int) should be used for an integer NULL value.

This function is not intended to be used by applications directly, but may appear among application dependencies as a result of usage of other functions and macros.