quackdb_internal::ffi

Function duckdb_extract_statements

Source
pub unsafe extern "C" fn duckdb_extract_statements(
    connection: *mut _duckdb_connection,
    query: *const i8,
    out_extracted_statements: *mut *mut _duckdb_extracted_statements,
) -> u64
Expand description

Extract all statements from a query. Note that after calling duckdb_extract_statements, the extracted statements should always be destroyed using duckdb_destroy_extracted, even if no statements were extracted. If the extract fails, duckdb_extract_statements_error can be called to obtain the reason why the extract failed. connection: The connection object query: The SQL query to extract out_extracted_statements: The resulting extracted statements object returns: The number of extracted statements or 0 on failure.