Skip to main content

execute

Function execute 

Source
pub unsafe fn execute(
    con: duckdb_connection,
    sql: &str,
) -> Result<u64, ExtensionError>
Expand description

Runs sql on con for its side effects and returns the number of rows changed.

With several statements in sql, every one runs, but the count is that of the statement whose result query returns — the first that produces rows, or else the last: "SELECT 1; INSERT …" reports 0.

§Errors

See query.

§Safety

con must be a valid, open duckdb_connection.