class SQLite3::Database
def execute_batch(sql, *bind_vars)
This always returns +nil+, making it unsuitable for queries that return
statement.
in turn. The same bind parameters, if given, will be applied to each
string, ignoring all subsequent statements. This will execute each one
means of executing queries will only execute the first statement in the
Executes all SQL statements in the given string. By contrast, the other
def execute_batch(sql, *bind_vars) sql = sql.strip until sql.empty? do prepare(sql) do |stmt| stmt.execute(*bind_vars) sql = stmt.remainder.strip end end nil end