@@ -106,7 +106,6 @@ pub const __DARWIN_NO_LONG_LONG: u32 = 0;
106106pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1;
107107pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1;
108108pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3;
109- pub const __has_ptrcheck: u32 = 0;
110109pub const __PTHREAD_SIZE__: u32 = 8176;
111110pub const __PTHREAD_ATTR_SIZE__: u32 = 56;
112111pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8;
@@ -203,8 +202,6 @@ pub const __MAC_11_5: u32 = 110500;
203202pub const __MAC_11_6: u32 = 110600;
204203pub const __MAC_12_0: u32 = 120000;
205204pub const __MAC_12_1: u32 = 120100;
206- pub const __MAC_12_2: u32 = 120200;
207- pub const __MAC_12_3: u32 = 120300;
208205pub const __IPHONE_2_0: u32 = 20000;
209206pub const __IPHONE_2_1: u32 = 20100;
210207pub const __IPHONE_2_2: u32 = 20200;
@@ -263,8 +260,6 @@ pub const __IPHONE_14_8: u32 = 140800;
263260pub const __IPHONE_15_0: u32 = 150000;
264261pub const __IPHONE_15_1: u32 = 150100;
265262pub const __IPHONE_15_2: u32 = 150200;
266- pub const __IPHONE_15_3: u32 = 150300;
267- pub const __IPHONE_15_4: u32 = 150400;
268263pub const __TVOS_9_0: u32 = 90000;
269264pub const __TVOS_9_1: u32 = 90100;
270265pub const __TVOS_9_2: u32 = 90200;
@@ -296,8 +291,6 @@ pub const __TVOS_14_7: u32 = 140700;
296291pub const __TVOS_15_0: u32 = 150000;
297292pub const __TVOS_15_1: u32 = 150100;
298293pub const __TVOS_15_2: u32 = 150200;
299- pub const __TVOS_15_3: u32 = 150300;
300- pub const __TVOS_15_4: u32 = 150400;
301294pub const __WATCHOS_1_0: u32 = 10000;
302295pub const __WATCHOS_2_0: u32 = 20000;
303296pub const __WATCHOS_2_1: u32 = 20100;
@@ -327,8 +320,6 @@ pub const __WATCHOS_7_6: u32 = 70600;
327320pub const __WATCHOS_8_0: u32 = 80000;
328321pub const __WATCHOS_8_1: u32 = 80100;
329322pub const __WATCHOS_8_3: u32 = 80300;
330- pub const __WATCHOS_8_4: u32 = 80400;
331- pub const __WATCHOS_8_5: u32 = 80500;
332323pub const MAC_OS_X_VERSION_10_0: u32 = 1000;
333324pub const MAC_OS_X_VERSION_10_1: u32 = 1010;
334325pub const MAC_OS_X_VERSION_10_2: u32 = 1020;
@@ -366,7 +357,7 @@ pub const MAC_OS_VERSION_12_0: u32 = 120000;
366357pub const __DRIVERKIT_19_0: u32 = 190000;
367358pub const __DRIVERKIT_20_0: u32 = 200000;
368359pub const __DRIVERKIT_21_0: u32 = 210000;
369- pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 120300 ;
360+ pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 120100 ;
370361pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1;
371362pub const __DARWIN_WCHAR_MIN: i32 = -2147483648;
372363pub const _FORTIFY_SOURCE: u32 = 2;
@@ -14577,10 +14568,7 @@ extern "C" {
1457714568 pub fn valloc(arg1: size_t) -> *mut ::std::os::raw::c_void;
1457814569}
1457914570extern "C" {
14580- pub fn aligned_alloc(
14581- __alignment: ::std::os::raw::c_ulong,
14582- __size: ::std::os::raw::c_ulong,
14583- ) -> *mut ::std::os::raw::c_void;
14571+ pub fn aligned_alloc(__alignment: size_t, __size: size_t) -> *mut ::std::os::raw::c_void;
1458414572}
1458514573extern "C" {
1458614574 pub fn posix_memalign(
@@ -15910,6 +15898,7 @@ fn bindgen_test_layout_duckdb_result() {
1591015898pub type duckdb_database = *mut ::std::os::raw::c_void;
1591115899pub type duckdb_connection = *mut ::std::os::raw::c_void;
1591215900pub type duckdb_prepared_statement = *mut ::std::os::raw::c_void;
15901+ pub type duckdb_pending_result = *mut ::std::os::raw::c_void;
1591315902pub type duckdb_appender = *mut ::std::os::raw::c_void;
1591415903pub type duckdb_arrow = *mut ::std::os::raw::c_void;
1591515904pub type duckdb_config = *mut ::std::os::raw::c_void;
@@ -15922,6 +15911,10 @@ pub type duckdb_value = *mut ::std::os::raw::c_void;
1592215911pub const duckdb_state_DuckDBSuccess: duckdb_state = 0;
1592315912pub const duckdb_state_DuckDBError: duckdb_state = 1;
1592415913pub type duckdb_state = ::std::os::raw::c_uint;
15914+ pub const duckdb_pending_state_DUCKDB_PENDING_RESULT_READY: duckdb_pending_state = 0;
15915+ pub const duckdb_pending_state_DUCKDB_PENDING_RESULT_NOT_READY: duckdb_pending_state = 1;
15916+ pub const duckdb_pending_state_DUCKDB_PENDING_ERROR: duckdb_pending_state = 2;
15917+ pub type duckdb_pending_state = ::std::os::raw::c_uint;
1592515918extern "C" {
1592615919 #[doc = "Creates a new database or opens an existing database file stored at the the given path."]
1592715920 #[doc = "If no path is given a new in-memory database is created instead."]
@@ -16155,7 +16148,7 @@ extern "C" {
1615516148 #[doc = ""]
1615616149 #[doc = "The result of this function must not be freed. It will be cleaned up when `duckdb_destroy_result` is called."]
1615716150 #[doc = ""]
16158- #[doc = " result: The result object to fetch the nullmask from."]
16151+ #[doc = " result: The result object to fetch the error from."]
1615916152 #[doc = " returns: The error of the result."]
1616016153 pub fn duckdb_result_error(result: *mut duckdb_result) -> *const ::std::os::raw::c_char;
1616116154}
@@ -16413,6 +16406,10 @@ extern "C" {
1641316406 #[doc = " returns: The parameter type"]
1641416407 pub fn duckdb_param_type(prepared_statement: duckdb_prepared_statement, param_idx: idx_t) -> duckdb_type;
1641516408}
16409+ extern "C" {
16410+ #[doc = "Clear the params bind to the prepared statement."]
16411+ pub fn duckdb_clear_bindings(prepared_statement: duckdb_prepared_statement) -> duckdb_state;
16412+ }
1641616413extern "C" {
1641716414 #[doc = "Binds a bool value to the prepared statement at the specified index."]
1641816415 pub fn duckdb_bind_boolean(
@@ -16576,6 +16573,64 @@ extern "C" {
1657616573 out_result: *mut duckdb_arrow,
1657716574 ) -> duckdb_state;
1657816575}
16576+ extern "C" {
16577+ #[doc = "Executes the prepared statement with the given bound parameters, and returns a pending result."]
16578+ #[doc = "The pending result represents an intermediate structure for a query that is not yet fully executed."]
16579+ #[doc = "The pending result can be used to incrementally execute a query, returning control to the client between tasks."]
16580+ #[doc = ""]
16581+ #[doc = "Note that after calling `duckdb_pending_prepared`, the pending result should always be destroyed using"]
16582+ #[doc = "`duckdb_destroy_pending`, even if this function returns DuckDBError."]
16583+ #[doc = ""]
16584+ #[doc = " prepared_statement: The prepared statement to execute."]
16585+ #[doc = " out_result: The pending query result."]
16586+ #[doc = " returns: `DuckDBSuccess` on success or `DuckDBError` on failure."]
16587+ pub fn duckdb_pending_prepared(
16588+ prepared_statement: duckdb_prepared_statement,
16589+ out_result: *mut duckdb_pending_result,
16590+ ) -> duckdb_state;
16591+ }
16592+ extern "C" {
16593+ #[doc = "Closes the pending result and de-allocates all memory allocated for the result."]
16594+ #[doc = ""]
16595+ #[doc = " pending_result: The pending result to destroy."]
16596+ pub fn duckdb_destroy_pending(pending_result: *mut duckdb_pending_result);
16597+ }
16598+ extern "C" {
16599+ #[doc = "Returns the error message contained within the pending result."]
16600+ #[doc = ""]
16601+ #[doc = "The result of this function must not be freed. It will be cleaned up when `duckdb_destroy_pending` is called."]
16602+ #[doc = ""]
16603+ #[doc = " result: The pending result to fetch the error from."]
16604+ #[doc = " returns: The error of the pending result."]
16605+ pub fn duckdb_pending_error(pending_result: duckdb_pending_result) -> *const ::std::os::raw::c_char;
16606+ }
16607+ extern "C" {
16608+ #[doc = "Executes a single task within the query, returning whether or not the query is ready."]
16609+ #[doc = ""]
16610+ #[doc = "If this returns DUCKDB_PENDING_RESULT_READY, the duckdb_execute_pending function can be called to obtain the result."]
16611+ #[doc = "If this returns DUCKDB_PENDING_RESULT_NOT_READY, the duckdb_pending_execute_task function should be called again."]
16612+ #[doc = "If this returns DUCKDB_PENDING_ERROR, an error occurred during execution."]
16613+ #[doc = ""]
16614+ #[doc = "The error message can be obtained by calling duckdb_pending_error on the pending_result."]
16615+ #[doc = ""]
16616+ #[doc = " pending_result: The pending result to execute a task within.."]
16617+ #[doc = " returns: The state of the pending result after the execution."]
16618+ pub fn duckdb_pending_execute_task(pending_result: duckdb_pending_result) -> duckdb_pending_state;
16619+ }
16620+ extern "C" {
16621+ #[doc = "Fully execute a pending query result, returning the final query result."]
16622+ #[doc = ""]
16623+ #[doc = "If duckdb_pending_execute_task has been called until DUCKDB_PENDING_RESULT_READY was returned, this will return fast."]
16624+ #[doc = "Otherwise, all remaining tasks must be executed first."]
16625+ #[doc = ""]
16626+ #[doc = " pending_result: The pending result to execute."]
16627+ #[doc = " out_result: The result object."]
16628+ #[doc = " returns: `DuckDBSuccess` on success or `DuckDBError` on failure."]
16629+ pub fn duckdb_execute_pending(
16630+ pending_result: duckdb_pending_result,
16631+ out_result: *mut duckdb_result,
16632+ ) -> duckdb_state;
16633+ }
1657916634extern "C" {
1658016635 #[doc = "Destroys the value and de-allocates all memory allocated for that type."]
1658116636 #[doc = ""]
@@ -17109,6 +17164,13 @@ extern "C" {
1710917164 destroy: duckdb_delete_callback_t,
1711017165 );
1711117166}
17167+ extern "C" {
17168+ #[doc = "Sets the cardinality estimate for the table function, used for optimization."]
17169+ #[doc = ""]
17170+ #[doc = " info: The bind data object."]
17171+ #[doc = " is_exact: Whether or not the cardinality estimate is exact, or an approximation"]
17172+ pub fn duckdb_bind_set_cardinality(info: duckdb_bind_info, cardinality: idx_t, is_exact: bool);
17173+ }
1711217174extern "C" {
1711317175 #[doc = "Report that an error has occurred while calling bind."]
1711417176 #[doc = ""]
@@ -17495,6 +17557,7 @@ extern "C" {
1749517557 #[doc = " result: The result to destroy."]
1749617558 pub fn duckdb_destroy_arrow(result: *mut duckdb_arrow);
1749717559}
17560+ pub type duckdb_task_state = *mut ::std::os::raw::c_void;
1749817561extern "C" {
1749917562 #[doc = "Execute DuckDB tasks on this thread."]
1750017563 #[doc = ""]
@@ -17504,6 +17567,60 @@ extern "C" {
1750417567 #[doc = " max_tasks: The maximum amount of tasks to execute"]
1750517568 pub fn duckdb_execute_tasks(database: duckdb_database, max_tasks: idx_t);
1750617569}
17570+ extern "C" {
17571+ #[doc = "Creates a task state that can be used with duckdb_execute_tasks_state to execute tasks until"]
17572+ #[doc = "duckdb_finish_execution is called on the state."]
17573+ #[doc = ""]
17574+ #[doc = "duckdb_destroy_state should be called on the result in order to free memory."]
17575+ #[doc = ""]
17576+ #[doc = " database: The database object to create the task state for"]
17577+ #[doc = " returns: The task state that can be used with duckdb_execute_tasks_state."]
17578+ pub fn duckdb_create_task_state(database: duckdb_database) -> duckdb_task_state;
17579+ }
17580+ extern "C" {
17581+ #[doc = "Execute DuckDB tasks on this thread."]
17582+ #[doc = ""]
17583+ #[doc = "The thread will keep on executing tasks forever, until duckdb_finish_execution is called on the state."]
17584+ #[doc = "Multiple threads can share the same duckdb_task_state."]
17585+ #[doc = ""]
17586+ #[doc = " state: The task state of the executor"]
17587+ pub fn duckdb_execute_tasks_state(state: duckdb_task_state);
17588+ }
17589+ extern "C" {
17590+ #[doc = "Execute DuckDB tasks on this thread."]
17591+ #[doc = ""]
17592+ #[doc = "The thread will keep on executing tasks until either duckdb_finish_execution is called on the state,"]
17593+ #[doc = "max_tasks tasks have been executed or there are no more tasks to be executed."]
17594+ #[doc = ""]
17595+ #[doc = "Multiple threads can share the same duckdb_task_state."]
17596+ #[doc = ""]
17597+ #[doc = " state: The task state of the executor"]
17598+ #[doc = " max_tasks: The maximum amount of tasks to execute"]
17599+ #[doc = " returns: The amount of tasks that have actually been executed"]
17600+ pub fn duckdb_execute_n_tasks_state(state: duckdb_task_state, max_tasks: idx_t) -> idx_t;
17601+ }
17602+ extern "C" {
17603+ #[doc = "Finish execution on a specific task."]
17604+ #[doc = ""]
17605+ #[doc = " state: The task state to finish execution"]
17606+ pub fn duckdb_finish_execution(state: duckdb_task_state);
17607+ }
17608+ extern "C" {
17609+ #[doc = "Check if the provided duckdb_task_state has finished execution"]
17610+ #[doc = ""]
17611+ #[doc = " state: The task state to inspect"]
17612+ #[doc = " returns: Whether or not duckdb_finish_execution has been called on the task state"]
17613+ pub fn duckdb_task_state_is_finished(state: duckdb_task_state) -> bool;
17614+ }
17615+ extern "C" {
17616+ #[doc = "Destroys the task state returned from duckdb_create_task_state."]
17617+ #[doc = ""]
17618+ #[doc = "Note that this should not be called while there is an active duckdb_execute_tasks_state running"]
17619+ #[doc = "on the task state."]
17620+ #[doc = ""]
17621+ #[doc = " state: The task state to clean up"]
17622+ pub fn duckdb_destroy_task_state(state: duckdb_task_state);
17623+ }
1750717624pub type __builtin_va_list = [__va_list_tag; 1usize];
1750817625#[repr(C)]
1750917626#[derive(Debug, Copy, Clone)]
0 commit comments