Skip to content

When to use execute_batch? #1236

Answered by gwenn
zjp-CN asked this question in Questions
Discussion options

You must be logged in to vote

execute_batch is like sqlite3_exec but without callback.
SQLite doc says:

The sqlite3_exec() interface is a convenience wrapper around sqlite3_prepare_v2(), sqlite3_step(), and sqlite3_finalize(), that allows an application to run multiple statements of SQL without having to use a lot of C code.

So this doesn't mean more efficient, just more convenient.
And both execute_batch and sqlite3_exec prepare and execute multiple queries.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zjp-CN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants