Skip to content

Commit 3a6f966

Browse files
Bump 0.4.0 -> 0.5.0 (#77)
* Bump 0.4.0 -> 0.5.0 Signed-off-by: Pradeep Chhetri <[email protected]> * Feedbacks Signed-off-by: Pradeep Chhetri <[email protected]> Signed-off-by: Pradeep Chhetri <[email protected]>
1 parent 5b72aa7 commit 3a6f966

File tree

11 files changed

+99547
-51524
lines changed

11 files changed

+99547
-51524
lines changed

.github/workflows/rust.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
name: Download duckdb
3939
with:
4040
repository: "duckdb/duckdb"
41-
tag: "v0.4.0"
41+
tag: "v0.5.0"
4242
fileName: ${{ matrix.duckdb }}
4343
out-file-path: .
4444

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ Cargo.lock
1515
/target
1616
**/target
1717

18-
# Ignore vscode
18+
# Ignore vscode and intellij
1919
.vscode
20+
.idea
2021

2122
# Ignore zip file
2223
*.zip
2324

2425
# ccls
2526
.ccls-cache/
2627

27-
*.db
28+
*.db

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "duckdb"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
authors = ["wangfenjin <[email protected]>"]
55
edition = "2021"
66
description = "Ergonomic wrapper for DuckDB"
@@ -69,7 +69,7 @@ tempdir = "0.3.7"
6969

7070
[dependencies.libduckdb-sys]
7171
path = "libduckdb-sys"
72-
version = "0.4.0"
72+
version = "0.5.0"
7373

7474
[package.metadata.docs.rs]
7575
features = []

libduckdb-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libduckdb-sys"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
authors = ["wangfenjin <[email protected]>"]
55
edition = "2021"
66
build = "build.rs"

libduckdb-sys/duckdb/bindgen_bundled_version.rs

Lines changed: 132 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ pub const __DARWIN_NO_LONG_LONG: u32 = 0;
106106
pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1;
107107
pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1;
108108
pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3;
109-
pub const __has_ptrcheck: u32 = 0;
110109
pub const __PTHREAD_SIZE__: u32 = 8176;
111110
pub const __PTHREAD_ATTR_SIZE__: u32 = 56;
112111
pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8;
@@ -203,8 +202,6 @@ pub const __MAC_11_5: u32 = 110500;
203202
pub const __MAC_11_6: u32 = 110600;
204203
pub const __MAC_12_0: u32 = 120000;
205204
pub const __MAC_12_1: u32 = 120100;
206-
pub const __MAC_12_2: u32 = 120200;
207-
pub const __MAC_12_3: u32 = 120300;
208205
pub const __IPHONE_2_0: u32 = 20000;
209206
pub const __IPHONE_2_1: u32 = 20100;
210207
pub const __IPHONE_2_2: u32 = 20200;
@@ -263,8 +260,6 @@ pub const __IPHONE_14_8: u32 = 140800;
263260
pub const __IPHONE_15_0: u32 = 150000;
264261
pub const __IPHONE_15_1: u32 = 150100;
265262
pub const __IPHONE_15_2: u32 = 150200;
266-
pub const __IPHONE_15_3: u32 = 150300;
267-
pub const __IPHONE_15_4: u32 = 150400;
268263
pub const __TVOS_9_0: u32 = 90000;
269264
pub const __TVOS_9_1: u32 = 90100;
270265
pub const __TVOS_9_2: u32 = 90200;
@@ -296,8 +291,6 @@ pub const __TVOS_14_7: u32 = 140700;
296291
pub const __TVOS_15_0: u32 = 150000;
297292
pub const __TVOS_15_1: u32 = 150100;
298293
pub const __TVOS_15_2: u32 = 150200;
299-
pub const __TVOS_15_3: u32 = 150300;
300-
pub const __TVOS_15_4: u32 = 150400;
301294
pub const __WATCHOS_1_0: u32 = 10000;
302295
pub const __WATCHOS_2_0: u32 = 20000;
303296
pub const __WATCHOS_2_1: u32 = 20100;
@@ -327,8 +320,6 @@ pub const __WATCHOS_7_6: u32 = 70600;
327320
pub const __WATCHOS_8_0: u32 = 80000;
328321
pub const __WATCHOS_8_1: u32 = 80100;
329322
pub const __WATCHOS_8_3: u32 = 80300;
330-
pub const __WATCHOS_8_4: u32 = 80400;
331-
pub const __WATCHOS_8_5: u32 = 80500;
332323
pub const MAC_OS_X_VERSION_10_0: u32 = 1000;
333324
pub const MAC_OS_X_VERSION_10_1: u32 = 1010;
334325
pub const MAC_OS_X_VERSION_10_2: u32 = 1020;
@@ -366,7 +357,7 @@ pub const MAC_OS_VERSION_12_0: u32 = 120000;
366357
pub const __DRIVERKIT_19_0: u32 = 190000;
367358
pub const __DRIVERKIT_20_0: u32 = 200000;
368359
pub 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;
370361
pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1;
371362
pub const __DARWIN_WCHAR_MIN: i32 = -2147483648;
372363
pub 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
}
1457914570
extern "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
}
1458514573
extern "C" {
1458614574
pub fn posix_memalign(
@@ -15910,6 +15898,7 @@ fn bindgen_test_layout_duckdb_result() {
1591015898
pub type duckdb_database = *mut ::std::os::raw::c_void;
1591115899
pub type duckdb_connection = *mut ::std::os::raw::c_void;
1591215900
pub type duckdb_prepared_statement = *mut ::std::os::raw::c_void;
15901+
pub type duckdb_pending_result = *mut ::std::os::raw::c_void;
1591315902
pub type duckdb_appender = *mut ::std::os::raw::c_void;
1591415903
pub type duckdb_arrow = *mut ::std::os::raw::c_void;
1591515904
pub type duckdb_config = *mut ::std::os::raw::c_void;
@@ -15922,6 +15911,10 @@ pub type duckdb_value = *mut ::std::os::raw::c_void;
1592215911
pub const duckdb_state_DuckDBSuccess: duckdb_state = 0;
1592315912
pub const duckdb_state_DuckDBError: duckdb_state = 1;
1592415913
pub 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;
1592515918
extern "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+
}
1641616413
extern "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+
}
1657916634
extern "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+
}
1711217174
extern "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;
1749817561
extern "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+
}
1750717624
pub type __builtin_va_list = [__va_list_tag; 1usize];
1750817625
#[repr(C)]
1750917626
#[derive(Debug, Copy, Clone)]

0 commit comments

Comments
 (0)