duckdb 0.10.3-dev0.0 → 0.10.3-dev13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1067) hide show
  1. package/.github/workflows/NodeJS.yml +95 -4
  2. package/binding.gyp +4 -5
  3. package/examples/example.js +10 -0
  4. package/lib/duckdb.js +11 -0
  5. package/package.json +1 -1
  6. package/src/database.cpp +3 -3
  7. package/src/duckdb/extension/icu/icu_extension.cpp +44 -15
  8. package/src/duckdb/extension/icu/include/icu_extension.hpp +1 -0
  9. package/src/duckdb/extension/icu/third_party/icu/i18n/basictz.cpp +5 -5
  10. package/src/duckdb/extension/json/include/json_common.hpp +6 -1
  11. package/src/duckdb/extension/json/include/json_executors.hpp +5 -5
  12. package/src/duckdb/extension/json/include/json_extension.hpp +1 -0
  13. package/src/duckdb/extension/json/include/json_functions.hpp +2 -2
  14. package/src/duckdb/extension/json/include/json_serializer.hpp +2 -2
  15. package/src/duckdb/extension/json/json_common.cpp +69 -43
  16. package/src/duckdb/extension/json/json_extension.cpp +8 -0
  17. package/src/duckdb/extension/json/json_functions/copy_json.cpp +17 -16
  18. package/src/duckdb/extension/json/json_functions/json_create.cpp +3 -1
  19. package/src/duckdb/extension/json/json_functions/json_structure.cpp +18 -13
  20. package/src/duckdb/extension/json/json_functions/json_transform.cpp +4 -0
  21. package/src/duckdb/extension/json/json_functions/json_type.cpp +2 -2
  22. package/src/duckdb/extension/json/json_functions/read_json.cpp +14 -11
  23. package/src/duckdb/extension/json/json_functions/read_json_objects.cpp +11 -8
  24. package/src/duckdb/extension/json/json_functions.cpp +4 -3
  25. package/src/duckdb/extension/json/json_scan.cpp +21 -11
  26. package/src/duckdb/extension/parquet/column_reader.cpp +9 -5
  27. package/src/duckdb/extension/parquet/column_writer.cpp +31 -18
  28. package/src/duckdb/extension/parquet/include/column_writer.hpp +1 -0
  29. package/src/duckdb/extension/parquet/include/null_column_reader.hpp +54 -0
  30. package/src/duckdb/extension/parquet/include/parquet_extension.hpp +1 -0
  31. package/src/duckdb/extension/parquet/include/parquet_reader.hpp +1 -1
  32. package/src/duckdb/extension/parquet/include/parquet_writer.hpp +7 -2
  33. package/src/duckdb/extension/parquet/include/templated_column_reader.hpp +6 -1
  34. package/src/duckdb/extension/parquet/parquet_crypto.cpp +8 -6
  35. package/src/duckdb/extension/parquet/parquet_extension.cpp +278 -127
  36. package/src/duckdb/extension/parquet/parquet_metadata.cpp +39 -37
  37. package/src/duckdb/extension/parquet/parquet_reader.cpp +7 -4
  38. package/src/duckdb/extension/parquet/parquet_statistics.cpp +5 -4
  39. package/src/duckdb/extension/parquet/parquet_writer.cpp +55 -2
  40. package/src/duckdb/extension/parquet/serialize_parquet.cpp +2 -2
  41. package/src/duckdb/src/catalog/catalog.cpp +19 -39
  42. package/src/duckdb/src/catalog/catalog_entry/duck_index_entry.cpp +6 -6
  43. package/src/duckdb/src/catalog/catalog_entry/duck_schema_entry.cpp +47 -31
  44. package/src/duckdb/src/catalog/catalog_entry/duck_table_entry.cpp +84 -52
  45. package/src/duckdb/src/catalog/catalog_entry/index_catalog_entry.cpp +4 -2
  46. package/src/duckdb/src/catalog/catalog_entry/macro_catalog_entry.cpp +4 -0
  47. package/src/duckdb/src/catalog/catalog_entry/schema_catalog_entry.cpp +7 -0
  48. package/src/duckdb/src/catalog/catalog_entry/sequence_catalog_entry.cpp +4 -1
  49. package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +36 -15
  50. package/src/duckdb/src/catalog/catalog_entry/type_catalog_entry.cpp +7 -1
  51. package/src/duckdb/src/catalog/catalog_entry/view_catalog_entry.cpp +5 -1
  52. package/src/duckdb/src/catalog/catalog_entry.cpp +7 -0
  53. package/src/duckdb/src/catalog/catalog_entry_retriever.cpp +64 -0
  54. package/src/duckdb/src/catalog/catalog_set.cpp +32 -17
  55. package/src/duckdb/src/catalog/default/default_functions.cpp +2 -1
  56. package/src/duckdb/src/catalog/default/default_views.cpp +1 -1
  57. package/src/duckdb/src/catalog/dependency_manager.cpp +133 -9
  58. package/src/duckdb/src/catalog/duck_catalog.cpp +5 -0
  59. package/src/duckdb/src/common/adbc/nanoarrow/allocator.cpp +2 -2
  60. package/src/duckdb/src/common/adbc/nanoarrow/metadata.cpp +3 -3
  61. package/src/duckdb/src/common/adbc/nanoarrow/schema.cpp +7 -6
  62. package/src/duckdb/src/common/allocator.cpp +6 -2
  63. package/src/duckdb/src/common/arrow/appender/bool_data.cpp +1 -0
  64. package/src/duckdb/src/common/arrow/appender/struct_data.cpp +1 -1
  65. package/src/duckdb/src/common/arrow/appender/union_data.cpp +2 -1
  66. package/src/duckdb/src/common/arrow/arrow_appender.cpp +7 -5
  67. package/src/duckdb/src/common/arrow/arrow_converter.cpp +3 -5
  68. package/src/duckdb/src/common/arrow/arrow_wrapper.cpp +1 -1
  69. package/src/duckdb/src/common/box_renderer.cpp +6 -3
  70. package/src/duckdb/src/common/compressed_file_system.cpp +11 -7
  71. package/src/duckdb/src/common/enum_util.cpp +259 -17
  72. package/src/duckdb/src/common/enums/logical_operator_type.cpp +2 -0
  73. package/src/duckdb/src/common/enums/physical_operator_type.cpp +2 -0
  74. package/src/duckdb/src/common/enums/relation_type.cpp +2 -0
  75. package/src/duckdb/src/common/enums/statement_type.cpp +2 -0
  76. package/src/duckdb/src/common/error_data.cpp +17 -2
  77. package/src/duckdb/src/common/exception_format_value.cpp +1 -0
  78. package/src/duckdb/src/common/extra_type_info.cpp +86 -8
  79. package/src/duckdb/src/common/file_system.cpp +39 -7
  80. package/src/duckdb/src/common/gzip_file_system.cpp +38 -14
  81. package/src/duckdb/src/common/hive_partitioning.cpp +28 -76
  82. package/src/duckdb/src/common/http_state.cpp +4 -4
  83. package/src/duckdb/src/common/local_file_system.cpp +34 -12
  84. package/src/duckdb/src/common/multi_file_list.cpp +285 -0
  85. package/src/duckdb/src/common/multi_file_reader.cpp +115 -80
  86. package/src/duckdb/src/common/operator/cast_operators.cpp +27 -225
  87. package/src/duckdb/src/common/operator/string_cast.cpp +13 -14
  88. package/src/duckdb/src/common/pipe_file_system.cpp +3 -2
  89. package/src/duckdb/src/common/printer.cpp +1 -1
  90. package/src/duckdb/src/common/progress_bar/progress_bar.cpp +1 -1
  91. package/src/duckdb/src/common/random_engine.cpp +2 -1
  92. package/src/duckdb/src/common/re2_regex.cpp +6 -4
  93. package/src/duckdb/src/common/row_operations/row_aggregate.cpp +10 -10
  94. package/src/duckdb/src/common/row_operations/row_external.cpp +4 -3
  95. package/src/duckdb/src/common/row_operations/row_heap_gather.cpp +5 -3
  96. package/src/duckdb/src/common/row_operations/row_heap_scatter.cpp +17 -4
  97. package/src/duckdb/src/common/row_operations/row_radix_scatter.cpp +1 -1
  98. package/src/duckdb/src/common/serializer/buffered_file_reader.cpp +4 -4
  99. package/src/duckdb/src/common/serializer/buffered_file_writer.cpp +9 -8
  100. package/src/duckdb/src/common/serializer/memory_stream.cpp +6 -3
  101. package/src/duckdb/src/common/serializer/serializer.cpp +1 -1
  102. package/src/duckdb/src/common/sort/comparators.cpp +1 -1
  103. package/src/duckdb/src/common/sort/merge_sorter.cpp +2 -2
  104. package/src/duckdb/src/common/sort/partition_state.cpp +6 -6
  105. package/src/duckdb/src/common/sort/radix_sort.cpp +1 -1
  106. package/src/duckdb/src/common/sort/sort_state.cpp +3 -3
  107. package/src/duckdb/src/common/sort/sorted_block.cpp +5 -5
  108. package/src/duckdb/src/common/string_util.cpp +70 -163
  109. package/src/duckdb/src/common/types/bit.cpp +1 -1
  110. package/src/duckdb/src/common/types/blob.cpp +3 -3
  111. package/src/duckdb/src/common/types/cast_helpers.cpp +197 -0
  112. package/src/duckdb/src/common/types/column/column_data_collection.cpp +17 -9
  113. package/src/duckdb/src/common/types/column/column_data_collection_segment.cpp +1 -1
  114. package/src/duckdb/src/common/types/column/partitioned_column_data.cpp +13 -5
  115. package/src/duckdb/src/common/types/conflict_info.cpp +1 -1
  116. package/src/duckdb/src/common/types/conflict_manager.cpp +1 -1
  117. package/src/duckdb/src/common/types/data_chunk.cpp +1 -1
  118. package/src/duckdb/src/common/types/date.cpp +2 -2
  119. package/src/duckdb/src/common/types/decimal.cpp +12 -12
  120. package/src/duckdb/src/common/types/hash.cpp +1 -1
  121. package/src/duckdb/src/common/types/hugeint.cpp +10 -9
  122. package/src/duckdb/src/common/types/row/partitioned_tuple_data.cpp +4 -4
  123. package/src/duckdb/src/common/types/row/row_data_collection_scanner.cpp +6 -5
  124. package/src/duckdb/src/common/types/row/tuple_data_allocator.cpp +21 -18
  125. package/src/duckdb/src/common/types/row/tuple_data_collection.cpp +2 -2
  126. package/src/duckdb/src/common/types/row/tuple_data_segment.cpp +7 -0
  127. package/src/duckdb/src/common/types/string_heap.cpp +4 -0
  128. package/src/duckdb/src/common/types/timestamp.cpp +23 -1
  129. package/src/duckdb/src/common/types/uhugeint.cpp +1 -1
  130. package/src/duckdb/src/common/types/uuid.cpp +7 -6
  131. package/src/duckdb/src/common/types/value.cpp +54 -30
  132. package/src/duckdb/src/common/types/vector.cpp +71 -96
  133. package/src/duckdb/src/common/types/vector_buffer.cpp +4 -0
  134. package/src/duckdb/src/common/types/vector_cache.cpp +3 -3
  135. package/src/duckdb/src/common/types.cpp +124 -18
  136. package/src/duckdb/src/common/vector_operations/generators.cpp +4 -16
  137. package/src/duckdb/src/common/vector_operations/is_distinct_from.cpp +20 -0
  138. package/src/duckdb/src/common/vector_operations/null_operations.cpp +1 -1
  139. package/src/duckdb/src/common/vector_operations/numeric_inplace_operators.cpp +2 -2
  140. package/src/duckdb/src/core_functions/aggregate/distributive/approx_count.cpp +1 -1
  141. package/src/duckdb/src/core_functions/aggregate/distributive/arg_min_max.cpp +13 -6
  142. package/src/duckdb/src/core_functions/aggregate/distributive/bitagg.cpp +8 -5
  143. package/src/duckdb/src/core_functions/aggregate/distributive/bitstring_agg.cpp +2 -2
  144. package/src/duckdb/src/core_functions/aggregate/distributive/sum.cpp +2 -2
  145. package/src/duckdb/src/core_functions/aggregate/holistic/approximate_quantile.cpp +14 -3
  146. package/src/duckdb/src/core_functions/aggregate/holistic/mode.cpp +2 -2
  147. package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +19 -8
  148. package/src/duckdb/src/core_functions/aggregate/holistic/reservoir_quantile.cpp +14 -8
  149. package/src/duckdb/src/core_functions/function_list.cpp +2 -1
  150. package/src/duckdb/src/core_functions/lambda_functions.cpp +2 -2
  151. package/src/duckdb/src/core_functions/scalar/array/array_functions.cpp +5 -0
  152. package/src/duckdb/src/core_functions/scalar/bit/bitstring.cpp +4 -4
  153. package/src/duckdb/src/core_functions/scalar/blob/create_sort_key.cpp +3 -2
  154. package/src/duckdb/src/core_functions/scalar/date/date_part.cpp +2 -2
  155. package/src/duckdb/src/core_functions/scalar/date/epoch.cpp +17 -0
  156. package/src/duckdb/src/core_functions/scalar/date/strftime.cpp +1 -1
  157. package/src/duckdb/src/core_functions/scalar/date/to_interval.cpp +19 -0
  158. package/src/duckdb/src/core_functions/scalar/debug/vector_type.cpp +6 -5
  159. package/src/duckdb/src/core_functions/scalar/generic/current_setting.cpp +2 -3
  160. package/src/duckdb/src/core_functions/scalar/generic/system_functions.cpp +2 -2
  161. package/src/duckdb/src/core_functions/scalar/list/array_slice.cpp +30 -21
  162. package/src/duckdb/src/core_functions/scalar/list/list_reduce.cpp +1 -1
  163. package/src/duckdb/src/core_functions/scalar/list/list_sort.cpp +3 -3
  164. package/src/duckdb/src/core_functions/scalar/list/list_value.cpp +1 -1
  165. package/src/duckdb/src/core_functions/scalar/list/range.cpp +2 -2
  166. package/src/duckdb/src/core_functions/scalar/map/map.cpp +44 -14
  167. package/src/duckdb/src/core_functions/scalar/map/map_concat.cpp +17 -4
  168. package/src/duckdb/src/core_functions/scalar/map/map_entries.cpp +30 -13
  169. package/src/duckdb/src/core_functions/scalar/map/map_extract.cpp +25 -12
  170. package/src/duckdb/src/core_functions/scalar/map/map_keys_values.cpp +16 -4
  171. package/src/duckdb/src/core_functions/scalar/math/numeric.cpp +2 -2
  172. package/src/duckdb/src/core_functions/scalar/operators/bitwise.cpp +2 -2
  173. package/src/duckdb/src/core_functions/scalar/random/setseed.cpp +1 -1
  174. package/src/duckdb/src/core_functions/scalar/string/bar.cpp +1 -1
  175. package/src/duckdb/src/core_functions/scalar/string/chr.cpp +2 -2
  176. package/src/duckdb/src/core_functions/scalar/string/hex.cpp +13 -13
  177. package/src/duckdb/src/core_functions/scalar/string/instr.cpp +1 -1
  178. package/src/duckdb/src/core_functions/scalar/string/pad.cpp +8 -8
  179. package/src/duckdb/src/core_functions/scalar/string/repeat.cpp +15 -7
  180. package/src/duckdb/src/core_functions/scalar/string/string_split.cpp +1 -1
  181. package/src/duckdb/src/core_functions/scalar/string/to_base.cpp +1 -1
  182. package/src/duckdb/src/core_functions/scalar/string/translate.cpp +4 -4
  183. package/src/duckdb/src/core_functions/scalar/string/trim.cpp +13 -9
  184. package/src/duckdb/src/core_functions/scalar/string/unicode.cpp +1 -1
  185. package/src/duckdb/src/execution/adaptive_filter.cpp +1 -1
  186. package/src/duckdb/src/execution/aggregate_hashtable.cpp +17 -8
  187. package/src/duckdb/src/execution/index/art/art.cpp +6 -6
  188. package/src/duckdb/src/execution/index/bound_index.cpp +115 -0
  189. package/src/duckdb/src/execution/index/unbound_index.cpp +30 -0
  190. package/src/duckdb/src/execution/join_hashtable.cpp +2 -1
  191. package/src/duckdb/src/execution/operator/aggregate/aggregate_object.cpp +1 -1
  192. package/src/duckdb/src/execution/operator/aggregate/distinct_aggregate_data.cpp +1 -1
  193. package/src/duckdb/src/execution/operator/aggregate/physical_hash_aggregate.cpp +3 -3
  194. package/src/duckdb/src/execution/operator/aggregate/physical_streaming_window.cpp +40 -5
  195. package/src/duckdb/src/execution/operator/aggregate/physical_ungrouped_aggregate.cpp +2 -2
  196. package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +16 -3
  197. package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_buffer.cpp +4 -4
  198. package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_buffer_manager.cpp +2 -12
  199. package/src/duckdb/src/execution/operator/csv_scanner/buffer_manager/csv_file_handle.cpp +2 -1
  200. package/src/duckdb/src/execution/operator/csv_scanner/scanner/base_scanner.cpp +21 -5
  201. package/src/duckdb/src/execution/operator/csv_scanner/scanner/column_count_scanner.cpp +1 -1
  202. package/src/duckdb/src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp +312 -260
  203. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp +2 -2
  204. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/dialect_detection.cpp +45 -16
  205. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/header_detection.cpp +19 -18
  206. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/type_detection.cpp +200 -55
  207. package/src/duckdb/src/execution/operator/csv_scanner/table_function/csv_file_scanner.cpp +26 -23
  208. package/src/duckdb/src/execution/operator/csv_scanner/table_function/global_csv_state.cpp +12 -12
  209. package/src/duckdb/src/execution/operator/csv_scanner/util/csv_error.cpp +7 -7
  210. package/src/duckdb/src/execution/operator/csv_scanner/util/csv_reader_options.cpp +31 -22
  211. package/src/duckdb/src/execution/operator/helper/physical_buffered_collector.cpp +1 -1
  212. package/src/duckdb/src/execution/operator/helper/physical_execute.cpp +1 -1
  213. package/src/duckdb/src/execution/operator/helper/physical_load.cpp +24 -2
  214. package/src/duckdb/src/execution/operator/helper/physical_reservoir_sample.cpp +1 -1
  215. package/src/duckdb/src/execution/operator/helper/physical_update_extensions.cpp +57 -0
  216. package/src/duckdb/src/execution/operator/helper/physical_verify_vector.cpp +13 -8
  217. package/src/duckdb/src/execution/operator/join/physical_asof_join.cpp +2 -2
  218. package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +9 -9
  219. package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +4 -4
  220. package/src/duckdb/src/execution/operator/join/physical_left_delim_join.cpp +1 -1
  221. package/src/duckdb/src/execution/operator/join/physical_piecewise_merge_join.cpp +2 -2
  222. package/src/duckdb/src/execution/operator/join/physical_range_join.cpp +2 -2
  223. package/src/duckdb/src/execution/operator/order/physical_order.cpp +3 -2
  224. package/src/duckdb/src/execution/operator/persistent/physical_batch_copy_to_file.cpp +4 -4
  225. package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +20 -13
  226. package/src/duckdb/src/execution/operator/persistent/physical_copy_database.cpp +3 -1
  227. package/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp +73 -60
  228. package/src/duckdb/src/execution/operator/persistent/physical_delete.cpp +18 -7
  229. package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +88 -12
  230. package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +47 -27
  231. package/src/duckdb/src/execution/operator/persistent/physical_update.cpp +34 -9
  232. package/src/duckdb/src/execution/operator/projection/physical_unnest.cpp +3 -0
  233. package/src/duckdb/src/execution/operator/scan/physical_column_data_scan.cpp +2 -3
  234. package/src/duckdb/src/execution/operator/scan/physical_expression_scan.cpp +22 -7
  235. package/src/duckdb/src/execution/operator/schema/physical_attach.cpp +1 -1
  236. package/src/duckdb/src/execution/operator/schema/physical_create_art_index.cpp +9 -9
  237. package/src/duckdb/src/execution/operator/set/physical_recursive_cte.cpp +1 -1
  238. package/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp +5 -4
  239. package/src/duckdb/src/execution/physical_operator.cpp +2 -2
  240. package/src/duckdb/src/execution/physical_plan/plan_column_data_get.cpp +2 -4
  241. package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +1 -1
  242. package/src/duckdb/src/execution/physical_plan/plan_copy_to_file.cpp +2 -2
  243. package/src/duckdb/src/execution/physical_plan/plan_create_table.cpp +2 -2
  244. package/src/duckdb/src/execution/physical_plan/plan_cte.cpp +1 -1
  245. package/src/duckdb/src/execution/physical_plan/plan_delete.cpp +2 -2
  246. package/src/duckdb/src/execution/physical_plan/plan_delim_get.cpp +2 -2
  247. package/src/duckdb/src/execution/physical_plan/plan_distinct.cpp +1 -0
  248. package/src/duckdb/src/execution/physical_plan/plan_expression_get.cpp +4 -5
  249. package/src/duckdb/src/execution/physical_plan/plan_insert.cpp +6 -5
  250. package/src/duckdb/src/execution/physical_plan/plan_recursive_cte.cpp +1 -1
  251. package/src/duckdb/src/execution/physical_plan/plan_simple.cpp +4 -0
  252. package/src/duckdb/src/execution/physical_plan/plan_top_n.cpp +2 -2
  253. package/src/duckdb/src/execution/physical_plan/plan_update.cpp +3 -3
  254. package/src/duckdb/src/execution/physical_plan/plan_window.cpp +1 -24
  255. package/src/duckdb/src/execution/physical_plan_generator.cpp +3 -0
  256. package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +38 -33
  257. package/src/duckdb/src/execution/reservoir_sample.cpp +42 -31
  258. package/src/duckdb/src/execution/window_executor.cpp +39 -39
  259. package/src/duckdb/src/execution/window_segment_tree.cpp +5 -2
  260. package/src/duckdb/src/function/aggregate/distributive/first.cpp +1 -1
  261. package/src/duckdb/src/function/cast/string_cast.cpp +3 -3
  262. package/src/duckdb/src/function/cast_rules.cpp +1 -0
  263. package/src/duckdb/src/function/function.cpp +2 -2
  264. package/src/duckdb/src/function/function_binder.cpp +9 -4
  265. package/src/duckdb/src/function/pragma/pragma_functions.cpp +2 -1
  266. package/src/duckdb/src/function/pragma/pragma_queries.cpp +4 -3
  267. package/src/duckdb/src/function/scalar/compressed_materialization/compress_string.cpp +1 -1
  268. package/src/duckdb/src/function/scalar/list/list_extract.cpp +3 -2
  269. package/src/duckdb/src/function/scalar/list/list_resize.cpp +1 -1
  270. package/src/duckdb/src/function/scalar/list/list_select.cpp +11 -4
  271. package/src/duckdb/src/function/scalar/list/list_zip.cpp +3 -1
  272. package/src/duckdb/src/function/scalar/operators/add.cpp +19 -9
  273. package/src/duckdb/src/function/scalar/sequence/nextval.cpp +77 -48
  274. package/src/duckdb/src/function/scalar/strftime_format.cpp +61 -39
  275. package/src/duckdb/src/function/scalar/string/caseconvert.cpp +12 -12
  276. package/src/duckdb/src/function/scalar/string/contains.cpp +2 -2
  277. package/src/duckdb/src/function/scalar/string/length.cpp +9 -9
  278. package/src/duckdb/src/function/scalar/string/regexp/regexp_extract_all.cpp +2 -2
  279. package/src/duckdb/src/function/scalar/string/strip_accents.cpp +2 -1
  280. package/src/duckdb/src/function/scalar/string/substring.cpp +11 -9
  281. package/src/duckdb/src/function/scalar/struct/struct_extract.cpp +2 -2
  282. package/src/duckdb/src/function/scalar_function.cpp +2 -1
  283. package/src/duckdb/src/function/table/arrow.cpp +18 -4
  284. package/src/duckdb/src/function/table/arrow_conversion.cpp +88 -66
  285. package/src/duckdb/src/function/table/copy_csv.cpp +94 -28
  286. package/src/duckdb/src/function/table/glob.cpp +17 -9
  287. package/src/duckdb/src/function/table/read_csv.cpp +37 -14
  288. package/src/duckdb/src/function/table/read_file.cpp +6 -2
  289. package/src/duckdb/src/function/table/repeat.cpp +5 -1
  290. package/src/duckdb/src/function/table/repeat_row.cpp +1 -1
  291. package/src/duckdb/src/function/table/sniff_csv.cpp +9 -3
  292. package/src/duckdb/src/function/table/system/duckdb_columns.cpp +3 -3
  293. package/src/duckdb/src/function/table/system/duckdb_constraints.cpp +31 -16
  294. package/src/duckdb/src/function/table/system/duckdb_databases.cpp +6 -1
  295. package/src/duckdb/src/function/table/system/duckdb_dependencies.cpp +2 -2
  296. package/src/duckdb/src/function/table/system/duckdb_extensions.cpp +50 -9
  297. package/src/duckdb/src/function/table/system/duckdb_functions.cpp +8 -2
  298. package/src/duckdb/src/function/table/system/duckdb_indexes.cpp +9 -4
  299. package/src/duckdb/src/function/table/system/duckdb_memory.cpp +2 -2
  300. package/src/duckdb/src/function/table/system/duckdb_schemas.cpp +7 -2
  301. package/src/duckdb/src/function/table/system/duckdb_sequences.cpp +8 -3
  302. package/src/duckdb/src/function/table/system/duckdb_tables.cpp +18 -10
  303. package/src/duckdb/src/function/table/system/duckdb_temporary_files.cpp +1 -1
  304. package/src/duckdb/src/function/table/system/duckdb_types.cpp +12 -5
  305. package/src/duckdb/src/function/table/system/duckdb_views.cpp +9 -4
  306. package/src/duckdb/src/function/table/system/duckdb_which_secret.cpp +75 -0
  307. package/src/duckdb/src/function/table/system/pragma_database_size.cpp +4 -4
  308. package/src/duckdb/src/function/table/system/pragma_metadata_info.cpp +3 -3
  309. package/src/duckdb/src/function/table/system/pragma_storage_info.cpp +6 -6
  310. package/src/duckdb/src/function/table/system_functions.cpp +1 -0
  311. package/src/duckdb/src/function/table/table_scan.cpp +11 -20
  312. package/src/duckdb/src/function/table/unnest.cpp +1 -1
  313. package/src/duckdb/src/function/table/version/pragma_version.cpp +5 -5
  314. package/src/duckdb/src/function/table_function.cpp +5 -4
  315. package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +1 -10
  316. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_index_entry.hpp +1 -1
  317. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_schema_entry.hpp +2 -2
  318. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_table_entry.hpp +6 -8
  319. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/function_entry.hpp +1 -0
  320. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/schema_catalog_entry.hpp +3 -2
  321. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/sequence_catalog_entry.hpp +2 -5
  322. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp +3 -4
  323. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/type_catalog_entry.hpp +2 -0
  324. package/src/duckdb/src/include/duckdb/catalog/catalog_entry.hpp +4 -0
  325. package/src/duckdb/src/include/duckdb/catalog/catalog_entry_retriever.hpp +72 -0
  326. package/src/duckdb/src/include/duckdb/catalog/catalog_transaction.hpp +3 -0
  327. package/src/duckdb/src/include/duckdb/catalog/dependency.hpp +4 -0
  328. package/src/duckdb/src/include/duckdb/catalog/dependency_list.hpp +7 -1
  329. package/src/duckdb/src/include/duckdb/catalog/dependency_manager.hpp +2 -2
  330. package/src/duckdb/src/include/duckdb/catalog/standard_entry.hpp +2 -0
  331. package/src/duckdb/src/include/duckdb/common/arrow/appender/append_data.hpp +1 -0
  332. package/src/duckdb/src/include/duckdb/common/arrow/appender/enum_data.hpp +3 -3
  333. package/src/duckdb/src/include/duckdb/common/arrow/appender/map_data.hpp +1 -1
  334. package/src/duckdb/src/include/duckdb/common/arrow/appender/scalar_data.hpp +15 -0
  335. package/src/duckdb/src/include/duckdb/common/arrow/appender/varchar_data.hpp +3 -2
  336. package/src/duckdb/src/include/duckdb/common/bit_utils.hpp +63 -98
  337. package/src/duckdb/src/include/duckdb/common/bitpacking.hpp +4 -4
  338. package/src/duckdb/src/include/duckdb/common/constants.hpp +2 -0
  339. package/src/duckdb/src/include/duckdb/common/enable_shared_from_this_ipp.hpp +42 -0
  340. package/src/duckdb/src/include/duckdb/common/enum_util.hpp +51 -3
  341. package/src/duckdb/src/include/duckdb/common/enums/checkpoint_type.hpp +38 -0
  342. package/src/duckdb/src/include/duckdb/common/enums/copy_overwrite_mode.hpp +18 -0
  343. package/src/duckdb/src/include/duckdb/common/enums/logical_operator_type.hpp +1 -0
  344. package/src/duckdb/src/include/duckdb/common/enums/physical_operator_type.hpp +1 -0
  345. package/src/duckdb/src/include/duckdb/common/enums/relation_type.hpp +1 -0
  346. package/src/duckdb/src/include/duckdb/common/enums/scan_options.hpp +3 -1
  347. package/src/duckdb/src/include/duckdb/common/enums/scan_vector_type.hpp +17 -0
  348. package/src/duckdb/src/include/duckdb/common/enums/statement_type.hpp +1 -0
  349. package/src/duckdb/src/include/duckdb/common/enums/tableref_type.hpp +2 -1
  350. package/src/duckdb/src/include/duckdb/common/enums/undo_flags.hpp +2 -1
  351. package/src/duckdb/src/include/duckdb/common/exception.hpp +0 -1
  352. package/src/duckdb/src/include/duckdb/common/extra_type_info.hpp +15 -1
  353. package/src/duckdb/src/include/duckdb/common/file_opener.hpp +4 -0
  354. package/src/duckdb/src/include/duckdb/common/file_system.hpp +3 -0
  355. package/src/duckdb/src/include/duckdb/common/gzip_file_system.hpp +3 -0
  356. package/src/duckdb/src/include/duckdb/common/helper.hpp +22 -1
  357. package/src/duckdb/src/include/duckdb/common/hive_partitioning.hpp +3 -17
  358. package/src/duckdb/src/include/duckdb/common/http_state.hpp +1 -1
  359. package/src/duckdb/src/include/duckdb/common/insertion_order_preserving_map.hpp +129 -0
  360. package/src/duckdb/src/include/duckdb/common/multi_file_list.hpp +151 -0
  361. package/src/duckdb/src/include/duckdb/common/multi_file_reader.hpp +133 -56
  362. package/src/duckdb/src/include/duckdb/common/multi_file_reader_options.hpp +7 -3
  363. package/src/duckdb/src/include/duckdb/common/numeric_utils.hpp +3 -0
  364. package/src/duckdb/src/include/duckdb/common/operator/add.hpp +2 -0
  365. package/src/duckdb/src/include/duckdb/common/operator/decimal_cast_operators.hpp +233 -0
  366. package/src/duckdb/src/include/duckdb/common/operator/integer_cast_operator.hpp +5 -4
  367. package/src/duckdb/src/include/duckdb/common/operator/numeric_cast.hpp +2 -2
  368. package/src/duckdb/src/include/duckdb/common/optional_ptr.hpp +5 -0
  369. package/src/duckdb/src/include/duckdb/common/optionally_owned_ptr.hpp +91 -0
  370. package/src/duckdb/src/include/duckdb/common/platform.h +6 -1
  371. package/src/duckdb/src/include/duckdb/common/radix.hpp +12 -4
  372. package/src/duckdb/src/include/duckdb/common/re2_regex.hpp +3 -2
  373. package/src/duckdb/src/include/duckdb/common/row_operations/row_operations.hpp +2 -0
  374. package/src/duckdb/src/include/duckdb/common/serializer/binary_deserializer.hpp +2 -1
  375. package/src/duckdb/src/include/duckdb/common/serializer/binary_serializer.hpp +8 -6
  376. package/src/duckdb/src/include/duckdb/common/serializer/deserializer.hpp +36 -0
  377. package/src/duckdb/src/include/duckdb/common/serializer/serialization_traits.hpp +65 -0
  378. package/src/duckdb/src/include/duckdb/common/serializer/serializer.hpp +52 -6
  379. package/src/duckdb/src/include/duckdb/common/shared_ptr.hpp +36 -3
  380. package/src/duckdb/src/include/duckdb/common/shared_ptr_ipp.hpp +268 -0
  381. package/src/duckdb/src/include/duckdb/common/sort/duckdb_pdqsort.hpp +3 -3
  382. package/src/duckdb/src/include/duckdb/common/string.hpp +3 -2
  383. package/src/duckdb/src/include/duckdb/common/string_util.hpp +11 -7
  384. package/src/duckdb/src/include/duckdb/common/types/bit.hpp +1 -1
  385. package/src/duckdb/src/include/duckdb/common/types/cast_helpers.hpp +43 -215
  386. package/src/duckdb/src/include/duckdb/common/types/datetime.hpp +36 -11
  387. package/src/duckdb/src/include/duckdb/common/types/hash.hpp +1 -1
  388. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_segment.hpp +7 -1
  389. package/src/duckdb/src/include/duckdb/common/types/selection_vector.hpp +1 -1
  390. package/src/duckdb/src/include/duckdb/common/types/string_type.hpp +2 -0
  391. package/src/duckdb/src/include/duckdb/common/types/timestamp.hpp +2 -0
  392. package/src/duckdb/src/include/duckdb/common/types/validity_mask.hpp +1 -1
  393. package/src/duckdb/src/include/duckdb/common/types/value.hpp +4 -0
  394. package/src/duckdb/src/include/duckdb/common/types/vector.hpp +20 -15
  395. package/src/duckdb/src/include/duckdb/common/types.hpp +14 -2
  396. package/src/duckdb/src/include/duckdb/common/unique_ptr.hpp +7 -6
  397. package/src/duckdb/src/include/duckdb/common/vector.hpp +11 -0
  398. package/src/duckdb/src/include/duckdb/common/vector_size.hpp +1 -1
  399. package/src/duckdb/src/include/duckdb/common/weak_ptr_ipp.hpp +117 -0
  400. package/src/duckdb/src/include/duckdb/core_functions/aggregate/sum_helpers.hpp +3 -3
  401. package/src/duckdb/src/include/duckdb/core_functions/scalar/date_functions.hpp +18 -0
  402. package/src/duckdb/src/include/duckdb/execution/adaptive_filter.hpp +1 -0
  403. package/src/duckdb/src/include/duckdb/execution/expression_executor.hpp +1 -1
  404. package/src/duckdb/src/include/duckdb/execution/index/art/art.hpp +4 -4
  405. package/src/duckdb/src/include/duckdb/execution/index/art/node.hpp +1 -1
  406. package/src/duckdb/src/include/duckdb/execution/index/bound_index.hpp +145 -0
  407. package/src/duckdb/src/include/duckdb/execution/index/index_type.hpp +2 -2
  408. package/src/duckdb/src/include/duckdb/execution/index/unbound_index.hpp +63 -0
  409. package/src/duckdb/src/include/duckdb/execution/merge_sort_tree.hpp +24 -18
  410. package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_streaming_window.hpp +2 -0
  411. package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_window.hpp +2 -0
  412. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/base_scanner.hpp +10 -3
  413. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/column_count_scanner.hpp +1 -0
  414. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_error.hpp +6 -6
  415. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_reader_options.hpp +7 -6
  416. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/csv_sniffer.hpp +24 -4
  417. package/src/duckdb/src/include/duckdb/execution/operator/csv_scanner/string_value_scanner.hpp +90 -20
  418. package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_update_extensions.hpp +52 -0
  419. package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_batch_insert.hpp +3 -1
  420. package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_copy_to_file.hpp +2 -1
  421. package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_delete.hpp +5 -5
  422. package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_export.hpp +1 -0
  423. package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_insert.hpp +8 -5
  424. package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_update.hpp +4 -1
  425. package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_column_data_scan.hpp +4 -5
  426. package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_expression_scan.hpp +6 -2
  427. package/src/duckdb/src/include/duckdb/execution/operator/set/physical_cte.hpp +1 -1
  428. package/src/duckdb/src/include/duckdb/execution/operator/set/physical_recursive_cte.hpp +1 -1
  429. package/src/duckdb/src/include/duckdb/execution/physical_plan_generator.hpp +1 -1
  430. package/src/duckdb/src/include/duckdb/execution/reservoir_sample.hpp +63 -8
  431. package/src/duckdb/src/include/duckdb/function/function.hpp +0 -5
  432. package/src/duckdb/src/include/duckdb/function/function_binder.hpp +6 -3
  433. package/src/duckdb/src/include/duckdb/function/replacement_scan.hpp +25 -2
  434. package/src/duckdb/src/include/duckdb/function/scalar/regexp.hpp +1 -1
  435. package/src/duckdb/src/include/duckdb/function/scalar/sequence_functions.hpp +3 -4
  436. package/src/duckdb/src/include/duckdb/function/scalar/strftime_format.hpp +5 -0
  437. package/src/duckdb/src/include/duckdb/function/scalar/string_functions.hpp +1 -1
  438. package/src/duckdb/src/include/duckdb/function/scalar_function.hpp +13 -0
  439. package/src/duckdb/src/include/duckdb/function/table/arrow.hpp +7 -3
  440. package/src/duckdb/src/include/duckdb/function/table/read_csv.hpp +3 -0
  441. package/src/duckdb/src/include/duckdb/function/table/system_functions.hpp +4 -0
  442. package/src/duckdb/src/include/duckdb/function/table_function.hpp +15 -2
  443. package/src/duckdb/src/include/duckdb/logging/http_logger.hpp +81 -0
  444. package/src/duckdb/src/include/duckdb/main/appender.hpp +1 -3
  445. package/src/duckdb/src/include/duckdb/main/attached_database.hpp +7 -1
  446. package/src/duckdb/src/include/duckdb/main/buffered_data/buffered_data.hpp +1 -0
  447. package/src/duckdb/src/include/duckdb/main/capi/cast/generic.hpp +2 -2
  448. package/src/duckdb/src/include/duckdb/main/client_config.hpp +8 -0
  449. package/src/duckdb/src/include/duckdb/main/client_context.hpp +1 -19
  450. package/src/duckdb/src/include/duckdb/main/client_context_state.hpp +11 -1
  451. package/src/duckdb/src/include/duckdb/main/client_context_wrapper.hpp +27 -0
  452. package/src/duckdb/src/include/duckdb/main/client_data.hpp +4 -0
  453. package/src/duckdb/src/include/duckdb/main/config.hpp +40 -3
  454. package/src/duckdb/src/include/duckdb/main/connection_manager.hpp +7 -17
  455. package/src/duckdb/src/include/duckdb/main/database.hpp +25 -20
  456. package/src/duckdb/src/include/duckdb/main/extension.hpp +25 -0
  457. package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +155 -10
  458. package/src/duckdb/src/include/duckdb/main/extension_helper.hpp +79 -12
  459. package/src/duckdb/src/include/duckdb/main/extension_install_info.hpp +89 -0
  460. package/src/duckdb/src/include/duckdb/main/extension_util.hpp +3 -1
  461. package/src/duckdb/src/include/duckdb/main/external_dependencies.hpp +46 -4
  462. package/src/duckdb/src/include/duckdb/main/materialized_query_result.hpp +3 -0
  463. package/src/duckdb/src/include/duckdb/main/relation/materialized_relation.hpp +35 -0
  464. package/src/duckdb/src/include/duckdb/main/relation/query_relation.hpp +1 -1
  465. package/src/duckdb/src/include/duckdb/main/relation/table_function_relation.hpp +2 -2
  466. package/src/duckdb/src/include/duckdb/main/relation/table_relation.hpp +1 -1
  467. package/src/duckdb/src/include/duckdb/main/relation/value_relation.hpp +3 -3
  468. package/src/duckdb/src/include/duckdb/main/relation/view_relation.hpp +1 -1
  469. package/src/duckdb/src/include/duckdb/main/relation.hpp +5 -6
  470. package/src/duckdb/src/include/duckdb/main/settings.hpp +67 -0
  471. package/src/duckdb/src/include/duckdb/optimizer/filter_pushdown.hpp +4 -4
  472. package/src/duckdb/src/include/duckdb/optimizer/join_order/cost_model.hpp +1 -1
  473. package/src/duckdb/src/include/duckdb/optimizer/join_order/join_node.hpp +8 -15
  474. package/src/duckdb/src/include/duckdb/optimizer/join_order/join_order_optimizer.hpp +0 -51
  475. package/src/duckdb/src/include/duckdb/optimizer/join_order/plan_enumerator.hpp +10 -17
  476. package/src/duckdb/src/include/duckdb/optimizer/join_order/query_graph_manager.hpp +5 -7
  477. package/src/duckdb/src/include/duckdb/optimizer/matcher/set_matcher.hpp +2 -1
  478. package/src/duckdb/src/include/duckdb/optimizer/optimizer_extension.hpp +10 -2
  479. package/src/duckdb/src/include/duckdb/optimizer/rule/list.hpp +1 -0
  480. package/src/duckdb/src/include/duckdb/optimizer/rule/timestamp_comparison.hpp +30 -0
  481. package/src/duckdb/src/include/duckdb/parallel/event.hpp +1 -1
  482. package/src/duckdb/src/include/duckdb/parallel/interrupt.hpp +1 -0
  483. package/src/duckdb/src/include/duckdb/parallel/meta_pipeline.hpp +1 -1
  484. package/src/duckdb/src/include/duckdb/parallel/pipeline.hpp +1 -1
  485. package/src/duckdb/src/include/duckdb/parallel/task.hpp +1 -1
  486. package/src/duckdb/src/include/duckdb/parser/base_expression.hpp +1 -1
  487. package/src/duckdb/src/include/duckdb/parser/column_definition.hpp +2 -0
  488. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_info.hpp +1 -0
  489. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_scalar_function_info.hpp +1 -0
  490. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_function_info.hpp +1 -0
  491. package/src/duckdb/src/include/duckdb/parser/parsed_data/alter_table_info.hpp +12 -0
  492. package/src/duckdb/src/include/duckdb/parser/parsed_data/attach_info.hpp +1 -0
  493. package/src/duckdb/src/include/duckdb/parser/parsed_data/comment_on_column_info.hpp +3 -1
  494. package/src/duckdb/src/include/duckdb/parser/parsed_data/copy_info.hpp +10 -12
  495. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_info.hpp +6 -2
  496. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_schema_info.hpp +3 -30
  497. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_sequence_info.hpp +2 -0
  498. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_type_info.hpp +12 -1
  499. package/src/duckdb/src/include/duckdb/parser/parsed_data/create_view_info.hpp +1 -0
  500. package/src/duckdb/src/include/duckdb/parser/parsed_data/detach_info.hpp +1 -0
  501. package/src/duckdb/src/include/duckdb/parser/parsed_data/drop_info.hpp +1 -0
  502. package/src/duckdb/src/include/duckdb/parser/parsed_data/exported_table_data.hpp +5 -2
  503. package/src/duckdb/src/include/duckdb/parser/parsed_data/load_info.hpp +4 -7
  504. package/src/duckdb/src/include/duckdb/parser/parsed_data/parse_info.hpp +7 -1
  505. package/src/duckdb/src/include/duckdb/parser/parsed_data/pragma_info.hpp +2 -11
  506. package/src/duckdb/src/include/duckdb/parser/parsed_data/transaction_info.hpp +2 -0
  507. package/src/duckdb/src/include/duckdb/parser/parsed_data/update_extensions_info.hpp +36 -0
  508. package/src/duckdb/src/include/duckdb/parser/parsed_data/vacuum_info.hpp +1 -0
  509. package/src/duckdb/src/include/duckdb/parser/parser_extension.hpp +1 -0
  510. package/src/duckdb/src/include/duckdb/parser/query_node.hpp +2 -2
  511. package/src/duckdb/src/include/duckdb/parser/sql_statement.hpp +1 -4
  512. package/src/duckdb/src/include/duckdb/parser/statement/alter_statement.hpp +1 -0
  513. package/src/duckdb/src/include/duckdb/parser/statement/attach_statement.hpp +1 -0
  514. package/src/duckdb/src/include/duckdb/parser/statement/call_statement.hpp +1 -0
  515. package/src/duckdb/src/include/duckdb/parser/statement/copy_database_statement.hpp +1 -2
  516. package/src/duckdb/src/include/duckdb/parser/statement/copy_statement.hpp +1 -3
  517. package/src/duckdb/src/include/duckdb/parser/statement/detach_statement.hpp +1 -0
  518. package/src/duckdb/src/include/duckdb/parser/statement/drop_statement.hpp +1 -0
  519. package/src/duckdb/src/include/duckdb/parser/statement/execute_statement.hpp +1 -0
  520. package/src/duckdb/src/include/duckdb/parser/statement/explain_statement.hpp +1 -0
  521. package/src/duckdb/src/include/duckdb/parser/statement/export_statement.hpp +1 -0
  522. package/src/duckdb/src/include/duckdb/parser/statement/extension_statement.hpp +1 -0
  523. package/src/duckdb/src/include/duckdb/parser/statement/insert_statement.hpp +1 -0
  524. package/src/duckdb/src/include/duckdb/parser/statement/list.hpp +1 -0
  525. package/src/duckdb/src/include/duckdb/parser/statement/load_statement.hpp +1 -0
  526. package/src/duckdb/src/include/duckdb/parser/statement/logical_plan_statement.hpp +3 -0
  527. package/src/duckdb/src/include/duckdb/parser/statement/multi_statement.hpp +1 -0
  528. package/src/duckdb/src/include/duckdb/parser/statement/pragma_statement.hpp +1 -0
  529. package/src/duckdb/src/include/duckdb/parser/statement/prepare_statement.hpp +1 -0
  530. package/src/duckdb/src/include/duckdb/parser/statement/relation_statement.hpp +1 -0
  531. package/src/duckdb/src/include/duckdb/parser/statement/select_statement.hpp +1 -0
  532. package/src/duckdb/src/include/duckdb/parser/statement/set_statement.hpp +6 -4
  533. package/src/duckdb/src/include/duckdb/parser/statement/transaction_statement.hpp +1 -0
  534. package/src/duckdb/src/include/duckdb/parser/statement/update_extensions_statement.hpp +36 -0
  535. package/src/duckdb/src/include/duckdb/parser/statement/vacuum_statement.hpp +1 -0
  536. package/src/duckdb/src/include/duckdb/parser/tableref/column_data_ref.hpp +46 -0
  537. package/src/duckdb/src/include/duckdb/parser/tableref/list.hpp +1 -0
  538. package/src/duckdb/src/include/duckdb/parser/tableref/table_function_ref.hpp +0 -4
  539. package/src/duckdb/src/include/duckdb/parser/tableref.hpp +3 -0
  540. package/src/duckdb/src/include/duckdb/parser/tokens.hpp +2 -0
  541. package/src/duckdb/src/include/duckdb/parser/transformer.hpp +5 -0
  542. package/src/duckdb/src/include/duckdb/planner/bind_context.hpp +4 -4
  543. package/src/duckdb/src/include/duckdb/planner/binder.hpp +42 -16
  544. package/src/duckdb/src/include/duckdb/planner/bound_tokens.hpp +1 -0
  545. package/src/duckdb/src/include/duckdb/planner/expression_binder/alter_binder.hpp +7 -6
  546. package/src/duckdb/src/include/duckdb/planner/expression_binder/having_binder.hpp +2 -1
  547. package/src/duckdb/src/include/duckdb/planner/expression_binder/index_binder.hpp +5 -1
  548. package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +5 -0
  549. package/src/duckdb/src/include/duckdb/planner/logical_operator.hpp +0 -1
  550. package/src/duckdb/src/include/duckdb/planner/operator/logical_column_data_get.hpp +6 -2
  551. package/src/duckdb/src/include/duckdb/planner/operator/logical_comparison_join.hpp +7 -7
  552. package/src/duckdb/src/include/duckdb/planner/operator/logical_copy_to_file.hpp +2 -1
  553. package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +2 -0
  554. package/src/duckdb/src/include/duckdb/planner/operator/logical_export.hpp +7 -0
  555. package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +2 -0
  556. package/src/duckdb/src/include/duckdb/planner/operator/logical_top_n.hpp +3 -3
  557. package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +2 -0
  558. package/src/duckdb/src/include/duckdb/planner/parsed_data/bound_create_table_info.hpp +0 -4
  559. package/src/duckdb/src/include/duckdb/planner/table_binding.hpp +4 -4
  560. package/src/duckdb/src/include/duckdb/planner/tableref/bound_column_data_ref.hpp +30 -0
  561. package/src/duckdb/src/include/duckdb/planner/tableref/list.hpp +1 -0
  562. package/src/duckdb/src/include/duckdb/storage/buffer/block_handle.hpp +6 -3
  563. package/src/duckdb/src/include/duckdb/storage/buffer/buffer_pool.hpp +16 -7
  564. package/src/duckdb/src/include/duckdb/storage/buffer_manager.hpp +15 -3
  565. package/src/duckdb/src/include/duckdb/storage/checkpoint/row_group_writer.hpp +10 -7
  566. package/src/duckdb/src/include/duckdb/storage/checkpoint/table_data_writer.hpp +2 -0
  567. package/src/duckdb/src/include/duckdb/storage/checkpoint_manager.hpp +24 -15
  568. package/src/duckdb/src/include/duckdb/storage/compression/alp/algorithm/alp.hpp +8 -7
  569. package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_compress.hpp +2 -2
  570. package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_constants.hpp +5 -4
  571. package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_fetch.hpp +1 -1
  572. package/src/duckdb/src/include/duckdb/storage/compression/alp/alp_utils.hpp +3 -3
  573. package/src/duckdb/src/include/duckdb/storage/compression/alprd/algorithm/alprd.hpp +2 -1
  574. package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_analyze.hpp +5 -3
  575. package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_compress.hpp +2 -2
  576. package/src/duckdb/src/include/duckdb/storage/compression/alprd/alprd_fetch.hpp +1 -1
  577. package/src/duckdb/src/include/duckdb/storage/compression/chimp/algorithm/bit_reader.hpp +1 -1
  578. package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_fetch.hpp +1 -1
  579. package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_fetch.hpp +1 -1
  580. package/src/duckdb/src/include/duckdb/storage/data_table.hpp +55 -16
  581. package/src/duckdb/src/include/duckdb/storage/index.hpp +33 -97
  582. package/src/duckdb/src/include/duckdb/storage/object_cache.hpp +3 -3
  583. package/src/duckdb/src/include/duckdb/storage/optimistic_data_writer.hpp +1 -1
  584. package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +3 -3
  585. package/src/duckdb/src/include/duckdb/storage/standard_buffer_manager.hpp +22 -9
  586. package/src/duckdb/src/include/duckdb/storage/storage_extension.hpp +7 -0
  587. package/src/duckdb/src/include/duckdb/storage/storage_info.hpp +6 -3
  588. package/src/duckdb/src/include/duckdb/storage/storage_lock.hpp +17 -13
  589. package/src/duckdb/src/include/duckdb/storage/storage_manager.hpp +27 -8
  590. package/src/duckdb/src/include/duckdb/storage/string_uncompressed.hpp +3 -2
  591. package/src/duckdb/src/include/duckdb/storage/table/append_state.hpp +12 -0
  592. package/src/duckdb/src/include/duckdb/storage/table/array_column_data.hpp +5 -4
  593. package/src/duckdb/src/include/duckdb/storage/table/column_data.hpp +29 -10
  594. package/src/duckdb/src/include/duckdb/storage/table/column_segment.hpp +2 -1
  595. package/src/duckdb/src/include/duckdb/storage/table/data_table_info.hpp +32 -6
  596. package/src/duckdb/src/include/duckdb/storage/table/delete_state.hpp +23 -0
  597. package/src/duckdb/src/include/duckdb/storage/table/list_column_data.hpp +5 -4
  598. package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +14 -3
  599. package/src/duckdb/src/include/duckdb/storage/table/row_group_collection.hpp +3 -2
  600. package/src/duckdb/src/include/duckdb/storage/table/scan_state.hpp +4 -0
  601. package/src/duckdb/src/include/duckdb/storage/table/segment_tree.hpp +5 -5
  602. package/src/duckdb/src/include/duckdb/storage/table/standard_column_data.hpp +6 -6
  603. package/src/duckdb/src/include/duckdb/storage/table/struct_column_data.hpp +5 -4
  604. package/src/duckdb/src/include/duckdb/storage/table/table_index_list.hpp +25 -1
  605. package/src/duckdb/src/include/duckdb/storage/table/table_statistics.hpp +5 -2
  606. package/src/duckdb/src/include/duckdb/storage/table/update_state.hpp +20 -0
  607. package/src/duckdb/src/include/duckdb/storage/table/validity_column_data.hpp +1 -0
  608. package/src/duckdb/src/include/duckdb/storage/temporary_file_manager.hpp +20 -4
  609. package/src/duckdb/src/include/duckdb/storage/write_ahead_log.hpp +10 -5
  610. package/src/duckdb/src/include/duckdb/transaction/duck_transaction.hpp +19 -4
  611. package/src/duckdb/src/include/duckdb/transaction/duck_transaction_manager.hpp +30 -7
  612. package/src/duckdb/src/include/duckdb/transaction/local_storage.hpp +8 -5
  613. package/src/duckdb/src/include/duckdb/transaction/meta_transaction.hpp +1 -0
  614. package/src/duckdb/src/include/duckdb/transaction/transaction.hpp +8 -0
  615. package/src/duckdb/src/include/duckdb/transaction/undo_buffer.hpp +9 -1
  616. package/src/duckdb/src/include/duckdb.h +141 -15
  617. package/src/duckdb/src/main/appender.cpp +3 -1
  618. package/src/duckdb/src/main/attached_database.cpp +12 -9
  619. package/src/duckdb/src/main/capi/appender-c.cpp +4 -3
  620. package/src/duckdb/src/main/capi/arrow-c.cpp +4 -4
  621. package/src/duckdb/src/main/capi/helper-c.cpp +3 -3
  622. package/src/duckdb/src/main/capi/replacement_scan-c.cpp +6 -5
  623. package/src/duckdb/src/main/capi/result-c.cpp +19 -5
  624. package/src/duckdb/src/main/capi/stream-c.cpp +17 -8
  625. package/src/duckdb/src/main/capi/table_function-c.cpp +11 -7
  626. package/src/duckdb/src/main/client_context.cpp +32 -23
  627. package/src/duckdb/src/main/client_context_file_opener.cpp +31 -0
  628. package/src/duckdb/src/main/client_context_wrapper.cpp +22 -0
  629. package/src/duckdb/src/main/client_data.cpp +5 -3
  630. package/src/duckdb/src/main/config.cpp +73 -2
  631. package/src/duckdb/src/main/connection.cpp +11 -10
  632. package/src/duckdb/src/main/connection_manager.cpp +9 -23
  633. package/src/duckdb/src/main/database.cpp +26 -30
  634. package/src/duckdb/src/main/db_instance_cache.cpp +1 -1
  635. package/src/duckdb/src/main/extension/extension_helper.cpp +378 -21
  636. package/src/duckdb/src/main/extension/extension_install.cpp +301 -89
  637. package/src/duckdb/src/main/extension/extension_load.cpp +137 -135
  638. package/src/duckdb/src/main/extension/extension_util.cpp +8 -2
  639. package/src/duckdb/src/main/extension.cpp +56 -0
  640. package/src/duckdb/src/main/extension_install_info.cpp +116 -0
  641. package/src/duckdb/src/main/materialized_query_result.cpp +11 -0
  642. package/src/duckdb/src/main/query_profiler.cpp +1 -1
  643. package/src/duckdb/src/main/relation/create_view_relation.cpp +6 -0
  644. package/src/duckdb/src/main/relation/materialized_relation.cpp +58 -0
  645. package/src/duckdb/src/main/relation/query_relation.cpp +20 -1
  646. package/src/duckdb/src/main/relation/read_csv_relation.cpp +5 -3
  647. package/src/duckdb/src/main/relation/table_relation.cpp +4 -4
  648. package/src/duckdb/src/main/relation/value_relation.cpp +2 -2
  649. package/src/duckdb/src/main/relation/view_relation.cpp +1 -1
  650. package/src/duckdb/src/main/relation/write_csv_relation.cpp +1 -1
  651. package/src/duckdb/src/main/relation/write_parquet_relation.cpp +1 -1
  652. package/src/duckdb/src/main/relation.cpp +36 -32
  653. package/src/duckdb/src/main/secret/secret.cpp +1 -1
  654. package/src/duckdb/src/main/settings/settings.cpp +169 -11
  655. package/src/duckdb/src/optimizer/common_aggregate_optimizer.cpp +1 -1
  656. package/src/duckdb/src/optimizer/filter_combiner.cpp +3 -3
  657. package/src/duckdb/src/optimizer/filter_pushdown.cpp +3 -2
  658. package/src/duckdb/src/optimizer/join_order/cardinality_estimator.cpp +3 -3
  659. package/src/duckdb/src/optimizer/join_order/cost_model.cpp +1 -1
  660. package/src/duckdb/src/optimizer/join_order/join_node.cpp +4 -27
  661. package/src/duckdb/src/optimizer/join_order/join_order_optimizer.cpp +5 -8
  662. package/src/duckdb/src/optimizer/join_order/plan_enumerator.cpp +32 -107
  663. package/src/duckdb/src/optimizer/join_order/query_graph_manager.cpp +68 -61
  664. package/src/duckdb/src/optimizer/join_order/relation_manager.cpp +4 -2
  665. package/src/duckdb/src/optimizer/join_order/relation_statistics_helper.cpp +3 -3
  666. package/src/duckdb/src/optimizer/optimizer.cpp +3 -1
  667. package/src/duckdb/src/optimizer/pushdown/pushdown_aggregate.cpp +2 -2
  668. package/src/duckdb/src/optimizer/pushdown/pushdown_cross_product.cpp +4 -4
  669. package/src/duckdb/src/optimizer/pushdown/pushdown_left_join.cpp +2 -2
  670. package/src/duckdb/src/optimizer/pushdown/pushdown_mark_join.cpp +6 -6
  671. package/src/duckdb/src/optimizer/pushdown/pushdown_projection.cpp +1 -1
  672. package/src/duckdb/src/optimizer/pushdown/pushdown_semi_anti_join.cpp +1 -1
  673. package/src/duckdb/src/optimizer/pushdown/pushdown_set_operation.cpp +1 -1
  674. package/src/duckdb/src/optimizer/pushdown/pushdown_single_join.cpp +2 -2
  675. package/src/duckdb/src/optimizer/remove_duplicate_groups.cpp +1 -1
  676. package/src/duckdb/src/optimizer/remove_unused_columns.cpp +1 -1
  677. package/src/duckdb/src/optimizer/rule/arithmetic_simplification.cpp +1 -1
  678. package/src/duckdb/src/optimizer/rule/case_simplification.cpp +2 -2
  679. package/src/duckdb/src/optimizer/rule/conjunction_simplification.cpp +2 -1
  680. package/src/duckdb/src/optimizer/rule/constant_folding.cpp +1 -0
  681. package/src/duckdb/src/optimizer/rule/distributivity.cpp +1 -1
  682. package/src/duckdb/src/optimizer/rule/empty_needle_removal.cpp +1 -0
  683. package/src/duckdb/src/optimizer/rule/enum_comparison.cpp +1 -0
  684. package/src/duckdb/src/optimizer/rule/in_clause_simplification_rule.cpp +1 -0
  685. package/src/duckdb/src/optimizer/rule/move_constants.cpp +4 -0
  686. package/src/duckdb/src/optimizer/rule/ordered_aggregate_optimizer.cpp +1 -2
  687. package/src/duckdb/src/optimizer/rule/timestamp_comparison.cpp +107 -0
  688. package/src/duckdb/src/optimizer/statistics/expression/propagate_conjunction.cpp +1 -1
  689. package/src/duckdb/src/optimizer/statistics/expression/propagate_operator.cpp +4 -4
  690. package/src/duckdb/src/optimizer/statistics/operator/propagate_filter.cpp +3 -3
  691. package/src/duckdb/src/optimizer/statistics/operator/propagate_get.cpp +1 -1
  692. package/src/duckdb/src/optimizer/statistics/operator/propagate_join.cpp +6 -3
  693. package/src/duckdb/src/optimizer/statistics/operator/propagate_set_operation.cpp +2 -1
  694. package/src/duckdb/src/optimizer/topn_optimizer.cpp +2 -2
  695. package/src/duckdb/src/parallel/executor.cpp +12 -9
  696. package/src/duckdb/src/parallel/meta_pipeline.cpp +2 -2
  697. package/src/duckdb/src/parallel/pipeline.cpp +2 -2
  698. package/src/duckdb/src/parallel/task_scheduler.cpp +9 -3
  699. package/src/duckdb/src/parser/column_definition.cpp +1 -0
  700. package/src/duckdb/src/parser/constraints/foreign_key_constraint.cpp +9 -7
  701. package/src/duckdb/src/parser/expression/star_expression.cpp +2 -2
  702. package/src/duckdb/src/parser/parsed_data/alter_scalar_function_info.cpp +4 -0
  703. package/src/duckdb/src/parser/parsed_data/alter_table_function_info.cpp +4 -0
  704. package/src/duckdb/src/parser/parsed_data/alter_table_info.cpp +183 -0
  705. package/src/duckdb/src/parser/parsed_data/attach_info.cpp +23 -0
  706. package/src/duckdb/src/parser/parsed_data/comment_on_column_info.cpp +15 -2
  707. package/src/duckdb/src/parser/parsed_data/copy_info.cpp +100 -0
  708. package/src/duckdb/src/parser/parsed_data/create_index_info.cpp +16 -2
  709. package/src/duckdb/src/parser/parsed_data/create_info.cpp +2 -0
  710. package/src/duckdb/src/parser/parsed_data/create_schema_info.cpp +40 -0
  711. package/src/duckdb/src/parser/parsed_data/create_sequence_info.cpp +22 -0
  712. package/src/duckdb/src/parser/parsed_data/create_table_info.cpp +12 -4
  713. package/src/duckdb/src/parser/parsed_data/create_type_info.cpp +37 -14
  714. package/src/duckdb/src/parser/parsed_data/create_view_info.cpp +4 -4
  715. package/src/duckdb/src/parser/parsed_data/detach_info.cpp +12 -0
  716. package/src/duckdb/src/parser/parsed_data/drop_info.cpp +21 -0
  717. package/src/duckdb/src/parser/parsed_data/load_info.cpp +46 -0
  718. package/src/duckdb/src/parser/parsed_data/parse_info.cpp +50 -0
  719. package/src/duckdb/src/parser/parsed_data/pragma_info.cpp +33 -0
  720. package/src/duckdb/src/parser/parsed_data/transaction_info.cpp +22 -0
  721. package/src/duckdb/src/parser/parsed_data/vacuum_info.cpp +20 -0
  722. package/src/duckdb/src/parser/parsed_expression_iterator.cpp +1 -0
  723. package/src/duckdb/src/parser/parser.cpp +5 -4
  724. package/src/duckdb/src/parser/query_node.cpp +6 -2
  725. package/src/duckdb/src/parser/statement/alter_statement.cpp +4 -0
  726. package/src/duckdb/src/parser/statement/attach_statement.cpp +4 -0
  727. package/src/duckdb/src/parser/statement/call_statement.cpp +8 -0
  728. package/src/duckdb/src/parser/statement/copy_statement.cpp +1 -91
  729. package/src/duckdb/src/parser/statement/detach_statement.cpp +4 -0
  730. package/src/duckdb/src/parser/statement/drop_statement.cpp +4 -0
  731. package/src/duckdb/src/parser/statement/execute_statement.cpp +15 -0
  732. package/src/duckdb/src/parser/statement/explain_statement.cpp +19 -0
  733. package/src/duckdb/src/parser/statement/export_statement.cpp +18 -0
  734. package/src/duckdb/src/parser/statement/extension_statement.cpp +4 -0
  735. package/src/duckdb/src/parser/statement/load_statement.cpp +4 -0
  736. package/src/duckdb/src/parser/statement/multi_statement.cpp +8 -0
  737. package/src/duckdb/src/parser/statement/pragma_statement.cpp +4 -0
  738. package/src/duckdb/src/parser/statement/prepare_statement.cpp +13 -0
  739. package/src/duckdb/src/parser/statement/relation_statement.cpp +4 -0
  740. package/src/duckdb/src/parser/statement/set_statement.cpp +33 -4
  741. package/src/duckdb/src/parser/statement/transaction_statement.cpp +4 -0
  742. package/src/duckdb/src/parser/statement/update_extensions_statement.cpp +34 -0
  743. package/src/duckdb/src/parser/statement/vacuum_statement.cpp +4 -0
  744. package/src/duckdb/src/parser/tableref/column_data_ref.cpp +81 -0
  745. package/src/duckdb/src/parser/tableref.cpp +1 -0
  746. package/src/duckdb/src/parser/transform/expression/transform_boolean_test.cpp +2 -2
  747. package/src/duckdb/src/parser/transform/expression/transform_cast.cpp +1 -1
  748. package/src/duckdb/src/parser/transform/expression/transform_interval.cpp +6 -1
  749. package/src/duckdb/src/parser/transform/expression/transform_param_ref.cpp +1 -1
  750. package/src/duckdb/src/parser/transform/expression/transform_positional_reference.cpp +1 -1
  751. package/src/duckdb/src/parser/transform/expression/transform_subquery.cpp +16 -0
  752. package/src/duckdb/src/parser/transform/helpers/nodetype_to_string.cpp +2 -0
  753. package/src/duckdb/src/parser/transform/helpers/transform_typename.cpp +97 -63
  754. package/src/duckdb/src/parser/transform/statement/transform_checkpoint.cpp +2 -0
  755. package/src/duckdb/src/parser/transform/statement/transform_copy.cpp +1 -1
  756. package/src/duckdb/src/parser/transform/statement/transform_load.cpp +4 -2
  757. package/src/duckdb/src/parser/transform/statement/transform_update.cpp +19 -0
  758. package/src/duckdb/src/parser/transformer.cpp +5 -2
  759. package/src/duckdb/src/planner/bind_context.cpp +2 -2
  760. package/src/duckdb/src/planner/binder/expression/bind_aggregate_expression.cpp +35 -8
  761. package/src/duckdb/src/planner/binder/expression/bind_cast_expression.cpp +1 -1
  762. package/src/duckdb/src/planner/binder/expression/bind_function_expression.cpp +13 -7
  763. package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +1 -1
  764. package/src/duckdb/src/planner/binder/query_node/plan_setop.cpp +35 -2
  765. package/src/duckdb/src/planner/binder/query_node/plan_subquery.cpp +2 -4
  766. package/src/duckdb/src/planner/binder/statement/bind_attach.cpp +2 -0
  767. package/src/duckdb/src/planner/binder/statement/bind_call.cpp +2 -0
  768. package/src/duckdb/src/planner/binder/statement/bind_copy.cpp +24 -7
  769. package/src/duckdb/src/planner/binder/statement/bind_copy_database.cpp +21 -68
  770. package/src/duckdb/src/planner/binder/statement/bind_create.cpp +152 -28
  771. package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +115 -57
  772. package/src/duckdb/src/planner/binder/statement/bind_delete.cpp +4 -0
  773. package/src/duckdb/src/planner/binder/statement/bind_detach.cpp +2 -0
  774. package/src/duckdb/src/planner/binder/statement/bind_drop.cpp +2 -0
  775. package/src/duckdb/src/planner/binder/statement/bind_execute.cpp +4 -2
  776. package/src/duckdb/src/planner/binder/statement/bind_explain.cpp +2 -0
  777. package/src/duckdb/src/planner/binder/statement/bind_export.cpp +15 -4
  778. package/src/duckdb/src/planner/binder/statement/bind_extension.cpp +1 -0
  779. package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +5 -1
  780. package/src/duckdb/src/planner/binder/statement/bind_load.cpp +13 -0
  781. package/src/duckdb/src/planner/binder/statement/bind_logical_plan.cpp +2 -0
  782. package/src/duckdb/src/planner/binder/statement/bind_pragma.cpp +2 -0
  783. package/src/duckdb/src/planner/binder/statement/bind_prepare.cpp +1 -0
  784. package/src/duckdb/src/planner/binder/statement/bind_select.cpp +1 -0
  785. package/src/duckdb/src/planner/binder/statement/bind_set.cpp +4 -0
  786. package/src/duckdb/src/planner/binder/statement/bind_simple.cpp +6 -4
  787. package/src/duckdb/src/planner/binder/statement/bind_update.cpp +5 -1
  788. package/src/duckdb/src/planner/binder/statement/bind_update_extensions.cpp +28 -0
  789. package/src/duckdb/src/planner/binder/statement/bind_vacuum.cpp +2 -0
  790. package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +32 -29
  791. package/src/duckdb/src/planner/binder/tableref/bind_column_data_ref.cpp +16 -0
  792. package/src/duckdb/src/planner/binder/tableref/bind_pivot.cpp +7 -4
  793. package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +32 -22
  794. package/src/duckdb/src/planner/binder/tableref/plan_column_data_ref.cpp +15 -0
  795. package/src/duckdb/src/planner/binder/tableref/plan_joinref.cpp +29 -11
  796. package/src/duckdb/src/planner/binder.cpp +50 -30
  797. package/src/duckdb/src/planner/bound_parameter_map.cpp +1 -1
  798. package/src/duckdb/src/planner/bound_result_modifier.cpp +1 -1
  799. package/src/duckdb/src/planner/expression/bound_expression.cpp +3 -2
  800. package/src/duckdb/src/planner/expression_binder/alter_binder.cpp +24 -7
  801. package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +27 -2
  802. package/src/duckdb/src/planner/expression_binder/having_binder.cpp +34 -19
  803. package/src/duckdb/src/planner/expression_binder/index_binder.cpp +33 -0
  804. package/src/duckdb/src/planner/expression_binder/order_binder.cpp +10 -1
  805. package/src/duckdb/src/planner/expression_binder.cpp +4 -0
  806. package/src/duckdb/src/planner/expression_iterator.cpp +3 -1
  807. package/src/duckdb/src/planner/filter/constant_filter.cpp +1 -1
  808. package/src/duckdb/src/planner/operator/logical_column_data_get.cpp +16 -2
  809. package/src/duckdb/src/planner/operator/logical_copy_to_file.cpp +3 -3
  810. package/src/duckdb/src/planner/operator/logical_delete.cpp +2 -0
  811. package/src/duckdb/src/planner/operator/logical_get.cpp +4 -1
  812. package/src/duckdb/src/planner/operator/logical_insert.cpp +2 -0
  813. package/src/duckdb/src/planner/operator/logical_top_n.cpp +1 -1
  814. package/src/duckdb/src/planner/operator/logical_update.cpp +2 -0
  815. package/src/duckdb/src/planner/planner.cpp +35 -9
  816. package/src/duckdb/src/planner/subquery/flatten_dependent_join.cpp +34 -9
  817. package/src/duckdb/src/planner/table_binding.cpp +1 -1
  818. package/src/duckdb/src/storage/arena_allocator.cpp +5 -3
  819. package/src/duckdb/src/storage/buffer/block_handle.cpp +3 -3
  820. package/src/duckdb/src/storage/buffer/block_manager.cpp +1 -1
  821. package/src/duckdb/src/storage/buffer/buffer_pool.cpp +83 -22
  822. package/src/duckdb/src/storage/buffer/buffer_pool_reservation.cpp +2 -2
  823. package/src/duckdb/src/storage/buffer_manager.cpp +6 -2
  824. package/src/duckdb/src/storage/checkpoint/row_group_writer.cpp +9 -0
  825. package/src/duckdb/src/storage/checkpoint/table_data_writer.cpp +7 -2
  826. package/src/duckdb/src/storage/checkpoint_manager.cpp +68 -104
  827. package/src/duckdb/src/storage/compression/bitpacking.cpp +19 -13
  828. package/src/duckdb/src/storage/compression/dictionary_compression.cpp +9 -7
  829. package/src/duckdb/src/storage/compression/fixed_size_uncompressed.cpp +1 -1
  830. package/src/duckdb/src/storage/compression/fsst.cpp +11 -7
  831. package/src/duckdb/src/storage/compression/rle.cpp +1 -1
  832. package/src/duckdb/src/storage/compression/string_uncompressed.cpp +5 -4
  833. package/src/duckdb/src/storage/compression/validity_uncompressed.cpp +1 -1
  834. package/src/duckdb/src/storage/data_table.cpp +254 -101
  835. package/src/duckdb/src/storage/index.cpp +2 -106
  836. package/src/duckdb/src/storage/local_storage.cpp +38 -50
  837. package/src/duckdb/src/storage/metadata/metadata_manager.cpp +2 -2
  838. package/src/duckdb/src/storage/metadata/metadata_writer.cpp +1 -1
  839. package/src/duckdb/src/storage/optimistic_data_writer.cpp +9 -11
  840. package/src/duckdb/src/storage/partial_block_manager.cpp +6 -6
  841. package/src/duckdb/src/storage/serialization/serialize_create_info.cpp +8 -0
  842. package/src/duckdb/src/storage/serialization/serialize_dependency.cpp +49 -0
  843. package/src/duckdb/src/storage/serialization/serialize_extension_install_info.cpp +28 -0
  844. package/src/duckdb/src/storage/serialization/serialize_logical_operator.cpp +5 -2
  845. package/src/duckdb/src/storage/serialization/serialize_nodes.cpp +78 -2
  846. package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +21 -0
  847. package/src/duckdb/src/storage/serialization/serialize_tableref.cpp +16 -0
  848. package/src/duckdb/src/storage/serialization/serialize_types.cpp +6 -1
  849. package/src/duckdb/src/storage/single_file_block_manager.cpp +22 -19
  850. package/src/duckdb/src/storage/standard_buffer_manager.cpp +68 -40
  851. package/src/duckdb/src/storage/statistics/column_statistics.cpp +3 -3
  852. package/src/duckdb/src/storage/statistics/distinct_statistics.cpp +1 -1
  853. package/src/duckdb/src/storage/storage_info.cpp +67 -23
  854. package/src/duckdb/src/storage/storage_lock.cpp +77 -17
  855. package/src/duckdb/src/storage/storage_manager.cpp +73 -51
  856. package/src/duckdb/src/storage/table/array_column_data.cpp +13 -12
  857. package/src/duckdb/src/storage/table/column_data.cpp +80 -37
  858. package/src/duckdb/src/storage/table/column_data_checkpointer.cpp +1 -1
  859. package/src/duckdb/src/storage/table/column_segment.cpp +6 -5
  860. package/src/duckdb/src/storage/table/list_column_data.cpp +15 -14
  861. package/src/duckdb/src/storage/table/row_group.cpp +38 -23
  862. package/src/duckdb/src/storage/table/row_group_collection.cpp +52 -38
  863. package/src/duckdb/src/storage/table/row_version_manager.cpp +2 -2
  864. package/src/duckdb/src/storage/table/standard_column_data.cpp +28 -16
  865. package/src/duckdb/src/storage/table/struct_column_data.cpp +23 -16
  866. package/src/duckdb/src/storage/table/table_statistics.cpp +27 -8
  867. package/src/duckdb/src/storage/table/update_segment.cpp +6 -6
  868. package/src/duckdb/src/storage/table/validity_column_data.cpp +5 -0
  869. package/src/duckdb/src/storage/table_index_list.cpp +69 -42
  870. package/src/duckdb/src/storage/temporary_file_manager.cpp +111 -17
  871. package/src/duckdb/src/storage/temporary_memory_manager.cpp +4 -4
  872. package/src/duckdb/src/storage/wal_replay.cpp +27 -22
  873. package/src/duckdb/src/storage/write_ahead_log.cpp +42 -22
  874. package/src/duckdb/src/transaction/cleanup_state.cpp +4 -7
  875. package/src/duckdb/src/transaction/commit_state.cpp +17 -8
  876. package/src/duckdb/src/transaction/duck_transaction.cpp +60 -15
  877. package/src/duckdb/src/transaction/duck_transaction_manager.cpp +154 -121
  878. package/src/duckdb/src/transaction/meta_transaction.cpp +19 -1
  879. package/src/duckdb/src/transaction/rollback_state.cpp +2 -0
  880. package/src/duckdb/src/transaction/transaction.cpp +7 -7
  881. package/src/duckdb/src/transaction/undo_buffer.cpp +37 -17
  882. package/src/duckdb/third_party/concurrentqueue/concurrentqueue.h +5 -5
  883. package/src/duckdb/third_party/fsst/fsst.h +1 -1
  884. package/src/duckdb/third_party/jaro_winkler/details/common.hpp +9 -9
  885. package/src/duckdb/third_party/jaro_winkler/details/intrinsics.hpp +1 -1
  886. package/src/duckdb/third_party/jaro_winkler/details/jaro_impl.hpp +18 -18
  887. package/src/duckdb/third_party/libpg_query/include/nodes/nodes.hpp +1 -0
  888. package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +12 -0
  889. package/src/duckdb/third_party/libpg_query/include/parser/gram.hpp +555 -1032
  890. package/src/duckdb/third_party/libpg_query/include/parser/kwlist.hpp +3 -0
  891. package/src/duckdb/third_party/libpg_query/include/utils/datetime.hpp +1 -0
  892. package/src/duckdb/third_party/libpg_query/pg_functions.cpp +13 -6
  893. package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +23925 -23444
  894. package/src/duckdb/third_party/mbedtls/library/constant_time.cpp +1 -1
  895. package/src/duckdb/third_party/parquet/parquet_types.cpp +3 -0
  896. package/src/duckdb/third_party/parquet/parquet_types.h +2 -1
  897. package/src/duckdb/third_party/re2/re2/compile.cc +2 -2
  898. package/src/duckdb/third_party/re2/re2/dfa.cc +3 -8
  899. package/src/duckdb/third_party/re2/re2/onepass.cc +4 -3
  900. package/src/duckdb/third_party/re2/re2/prog.cc +10 -10
  901. package/src/duckdb/third_party/re2/re2/prog.h +8 -8
  902. package/src/duckdb/third_party/tdigest/t_digest.hpp +6 -6
  903. package/src/duckdb/third_party/utf8proc/include/utf8proc.hpp +1 -1
  904. package/src/duckdb/third_party/yyjson/include/yyjson.hpp +7930 -0
  905. package/src/duckdb/third_party/yyjson/yyjson.cpp +9490 -0
  906. package/src/duckdb/ub_src_catalog.cpp +2 -0
  907. package/src/duckdb/ub_src_common.cpp +2 -0
  908. package/src/duckdb/ub_src_execution_index.cpp +3 -1
  909. package/src/duckdb/ub_src_execution_operator_helper.cpp +2 -0
  910. package/src/duckdb/ub_src_function_table_system.cpp +2 -0
  911. package/src/duckdb/ub_src_main.cpp +4 -0
  912. package/src/duckdb/ub_src_main_relation.cpp +2 -0
  913. package/src/duckdb/ub_src_optimizer.cpp +8 -8
  914. package/src/duckdb/ub_src_optimizer_join_order.cpp +0 -2
  915. package/src/duckdb/ub_src_optimizer_rule.cpp +4 -2
  916. package/src/duckdb/ub_src_parser_parsed_data.cpp +10 -0
  917. package/src/duckdb/ub_src_parser_statement.cpp +2 -0
  918. package/src/duckdb/ub_src_parser_tableref.cpp +2 -0
  919. package/src/duckdb/ub_src_planner_binder_statement.cpp +2 -0
  920. package/src/duckdb/ub_src_planner_binder_tableref.cpp +4 -0
  921. package/src/duckdb/ub_src_storage_serialization.cpp +4 -0
  922. package/test/query_result.test.ts +9 -0
  923. package/test/replacement_scan.test.ts +2 -0
  924. package/src/duckdb/src/catalog/catalog_entry/ub_duckdb_catalog_entries.cpp +0 -16
  925. package/src/duckdb/src/catalog/default/ub_duckdb_catalog_default_entries.cpp +0 -5
  926. package/src/duckdb/src/catalog/ub_duckdb_catalog.cpp +0 -10
  927. package/src/duckdb/src/common/adbc/nanoarrow/ub_duckdb_adbc_nanoarrow.cpp +0 -5
  928. package/src/duckdb/src/common/adbc/ub_duckdb_adbc.cpp +0 -3
  929. package/src/duckdb/src/common/arrow/appender/ub_duckdb_common_arrow_appender.cpp +0 -6
  930. package/src/duckdb/src/common/arrow/ub_duckdb_common_arrow.cpp +0 -4
  931. package/src/duckdb/src/common/crypto/ub_duckdb_common_crypto.cpp +0 -2
  932. package/src/duckdb/src/common/enums/ub_duckdb_common_enums.cpp +0 -12
  933. package/src/duckdb/src/common/operator/ub_duckdb_common_operators.cpp +0 -4
  934. package/src/duckdb/src/common/progress_bar/ub_duckdb_progress_bar.cpp +0 -3
  935. package/src/duckdb/src/common/row_operations/ub_duckdb_row_operations.cpp +0 -9
  936. package/src/duckdb/src/common/serializer/ub_duckdb_common_serializer.cpp +0 -7
  937. package/src/duckdb/src/common/sort/ub_duckdb_sort.cpp +0 -7
  938. package/src/duckdb/src/common/types/column/ub_duckdb_common_types_column.cpp +0 -6
  939. package/src/duckdb/src/common/types/row/ub_duckdb_common_types_row.cpp +0 -11
  940. package/src/duckdb/src/common/types/ub_duckdb_common_types.cpp +0 -28
  941. package/src/duckdb/src/common/ub_duckdb_common.cpp +0 -34
  942. package/src/duckdb/src/common/value_operations/ub_duckdb_value_operations.cpp +0 -2
  943. package/src/duckdb/src/core_functions/aggregate/algebraic/ub_duckdb_aggr_algebraic.cpp +0 -5
  944. package/src/duckdb/src/core_functions/aggregate/distributive/ub_duckdb_aggr_distributive.cpp +0 -13
  945. package/src/duckdb/src/core_functions/aggregate/holistic/ub_duckdb_aggr_holistic.cpp +0 -5
  946. package/src/duckdb/src/core_functions/aggregate/nested/ub_duckdb_aggr_nested.cpp +0 -3
  947. package/src/duckdb/src/core_functions/aggregate/regression/ub_duckdb_aggr_regr.cpp +0 -8
  948. package/src/duckdb/src/core_functions/scalar/bit/ub_duckdb_func_bit.cpp +0 -2
  949. package/src/duckdb/src/core_functions/scalar/blob/ub_duckdb_func_blob.cpp +0 -3
  950. package/src/duckdb/src/core_functions/scalar/date/ub_duckdb_func_date.cpp +0 -12
  951. package/src/duckdb/src/core_functions/scalar/debug/ub_duckdb_func_debug.cpp +0 -2
  952. package/src/duckdb/src/core_functions/scalar/enum/ub_duckdb_func_enum.cpp +0 -2
  953. package/src/duckdb/src/core_functions/scalar/generic/ub_duckdb_func_generic.cpp +0 -9
  954. package/src/duckdb/src/core_functions/scalar/list/ub_duckdb_func_list.cpp +0 -11
  955. package/src/duckdb/src/core_functions/scalar/map/ub_duckdb_func_map_nested.cpp +0 -8
  956. package/src/duckdb/src/core_functions/scalar/math/ub_duckdb_func_math.cpp +0 -1
  957. package/src/duckdb/src/core_functions/scalar/operators/ub_duckdb_func_ops.cpp +0 -1
  958. package/src/duckdb/src/core_functions/scalar/random/ub_duckdb_func_random.cpp +0 -3
  959. package/src/duckdb/src/core_functions/scalar/string/ub_duckdb_func_string.cpp +0 -26
  960. package/src/duckdb/src/core_functions/scalar/struct/ub_duckdb_func_struct.cpp +0 -3
  961. package/src/duckdb/src/core_functions/scalar/union/ub_duckdb_func_union.cpp +0 -4
  962. package/src/duckdb/src/core_functions/ub_duckdb_core_functions.cpp +0 -3
  963. package/src/duckdb/src/execution/expression_executor/ub_duckdb_expression_executor.cpp +0 -11
  964. package/src/duckdb/src/execution/index/art/ub_duckdb_art_index_execution.cpp +0 -12
  965. package/src/duckdb/src/execution/index/art/ub_duckdb_execution_index_art.cpp +0 -11
  966. package/src/duckdb/src/execution/index/ub_duckdb_execution_index.cpp +0 -3
  967. package/src/duckdb/src/execution/nested_loop_join/ub_duckdb_nested_loop_join.cpp +0 -3
  968. package/src/duckdb/src/execution/operator/aggregate/ub_duckdb_operator_aggregate.cpp +0 -9
  969. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/ub_duckdb_operator_csv_sniffer.cpp +0 -7
  970. package/src/duckdb/src/execution/operator/csv_scanner/ub_duckdb_operator_csv_scanner.cpp +0 -10
  971. package/src/duckdb/src/execution/operator/filter/ub_duckdb_operator_filter.cpp +0 -2
  972. package/src/duckdb/src/execution/operator/helper/ub_duckdb_operator_helper.cpp +0 -18
  973. package/src/duckdb/src/execution/operator/join/ub_duckdb_operator_join.cpp +0 -16
  974. package/src/duckdb/src/execution/operator/order/ub_duckdb_operator_order.cpp +0 -3
  975. package/src/duckdb/src/execution/operator/persistent/ub_duckdb_operator_persistent.cpp +0 -10
  976. package/src/duckdb/src/execution/operator/projection/ub_duckdb_operator_projection.cpp +0 -5
  977. package/src/duckdb/src/execution/operator/scan/ub_duckdb_operator_scan.cpp +0 -7
  978. package/src/duckdb/src/execution/operator/schema/ub_duckdb_operator_schema.cpp +0 -12
  979. package/src/duckdb/src/execution/operator/set/ub_duckdb_operator_set.cpp +0 -4
  980. package/src/duckdb/src/execution/physical_plan/ub_duckdb_physical_plan.cpp +0 -44
  981. package/src/duckdb/src/execution/ub_duckdb_execution.cpp +0 -15
  982. package/src/duckdb/src/function/aggregate/algebraic/ub_duckdb_aggr_algebraic.cpp +0 -5
  983. package/src/duckdb/src/function/aggregate/distributive/ub_duckdb_aggr_distr.cpp +0 -3
  984. package/src/duckdb/src/function/aggregate/holistic/ub_duckdb_aggr_holistic.cpp +0 -5
  985. package/src/duckdb/src/function/aggregate/nested/ub_duckdb_aggr_nested.cpp +0 -3
  986. package/src/duckdb/src/function/aggregate/regression/ub_duckdb_aggr_regr.cpp +0 -8
  987. package/src/duckdb/src/function/aggregate/ub_duckdb_func_aggr.cpp +0 -3
  988. package/src/duckdb/src/function/cast/ub_duckdb_func_cast.cpp +0 -17
  989. package/src/duckdb/src/function/cast/union/ub_duckdb_union_cast.cpp +0 -2
  990. package/src/duckdb/src/function/pragma/ub_duckdb_func_pragma.cpp +0 -3
  991. package/src/duckdb/src/function/scalar/bit/ub_duckdb_func_bit.cpp +0 -2
  992. package/src/duckdb/src/function/scalar/blob/ub_duckdb_func_blob.cpp +0 -3
  993. package/src/duckdb/src/function/scalar/compressed_materialization/ub_duckdb_func_compressed_materialization.cpp +0 -3
  994. package/src/duckdb/src/function/scalar/date/ub_duckdb_func_date.cpp +0 -12
  995. package/src/duckdb/src/function/scalar/enum/ub_duckdb_func_enum.cpp +0 -2
  996. package/src/duckdb/src/function/scalar/generic/ub_duckdb_func_generic.cpp +0 -8
  997. package/src/duckdb/src/function/scalar/generic/ub_duckdb_func_generic_main.cpp +0 -2
  998. package/src/duckdb/src/function/scalar/list/ub_duckdb_func_list.cpp +0 -11
  999. package/src/duckdb/src/function/scalar/list/ub_duckdb_func_list_nested.cpp +0 -5
  1000. package/src/duckdb/src/function/scalar/map/ub_duckdb_func_map_nested.cpp +0 -7
  1001. package/src/duckdb/src/function/scalar/math/ub_duckdb_func_math.cpp +0 -4
  1002. package/src/duckdb/src/function/scalar/operators/ub_duckdb_func_ops.cpp +0 -6
  1003. package/src/duckdb/src/function/scalar/operators/ub_duckdb_func_ops_main.cpp +0 -5
  1004. package/src/duckdb/src/function/scalar/sequence/ub_duckdb_func_seq.cpp +0 -2
  1005. package/src/duckdb/src/function/scalar/string/regexp/ub_duckdb_func_string_regexp.cpp +0 -3
  1006. package/src/duckdb/src/function/scalar/string/ub_duckdb_func_string.cpp +0 -31
  1007. package/src/duckdb/src/function/scalar/string/ub_duckdb_func_string_main.cpp +0 -12
  1008. package/src/duckdb/src/function/scalar/struct/ub_duckdb_func_struct.cpp +0 -4
  1009. package/src/duckdb/src/function/scalar/struct/ub_duckdb_func_struct_main.cpp +0 -2
  1010. package/src/duckdb/src/function/scalar/system/ub_duckdb_func_system.cpp +0 -2
  1011. package/src/duckdb/src/function/scalar/ub_duckdb_func_scalar.cpp +0 -9
  1012. package/src/duckdb/src/function/scalar/union/ub_duckdb_func_union.cpp +0 -4
  1013. package/src/duckdb/src/function/table/arrow/ub_duckdb_arrow_conversion.cpp +0 -2
  1014. package/src/duckdb/src/function/table/system/ub_duckdb_table_func_system.cpp +0 -23
  1015. package/src/duckdb/src/function/table/ub_duckdb_func_table.cpp +0 -16
  1016. package/src/duckdb/src/function/table/version/ub_duckdb_func_table_version.cpp +0 -2
  1017. package/src/duckdb/src/function/ub_duckdb_function.cpp +0 -14
  1018. package/src/duckdb/src/main/capi/cast/ub_duckdb_main_capi_cast.cpp +0 -3
  1019. package/src/duckdb/src/main/capi/ub_duckdb_main_capi.cpp +0 -19
  1020. package/src/duckdb/src/main/chunk_scan_state/ub_duckdb_main_chunk_scan_state.cpp +0 -2
  1021. package/src/duckdb/src/main/extension/ub_duckdb_main_extension.cpp +0 -6
  1022. package/src/duckdb/src/main/relation/ub_duckdb_main_relation.cpp +0 -26
  1023. package/src/duckdb/src/main/settings/ub_duckdb_main_settings.cpp +0 -2
  1024. package/src/duckdb/src/main/ub_duckdb_main.cpp +0 -25
  1025. package/src/duckdb/src/optimizer/compressed_materialization/ub_duckdb_optimizer_compressed_materialization.cpp +0 -4
  1026. package/src/duckdb/src/optimizer/join_order/ub_duckdb_optimizer_join_order.cpp +0 -12
  1027. package/src/duckdb/src/optimizer/matcher/ub_duckdb_optimizer_matcher.cpp +0 -2
  1028. package/src/duckdb/src/optimizer/pullup/ub_duckdb_optimizer_pullup.cpp +0 -6
  1029. package/src/duckdb/src/optimizer/pushdown/ub_duckdb_optimizer_pushdown.cpp +0 -12
  1030. package/src/duckdb/src/optimizer/rule/ub_duckdb_optimizer_rules.cpp +0 -16
  1031. package/src/duckdb/src/optimizer/statistics/expression/ub_duckdb_optimizer_statistics_expr.cpp +0 -11
  1032. package/src/duckdb/src/optimizer/statistics/operator/ub_duckdb_optimizer_statistics_op.cpp +0 -11
  1033. package/src/duckdb/src/optimizer/ub_duckdb_optimizer.cpp +0 -20
  1034. package/src/duckdb/src/parallel/ub_duckdb_parallel.cpp +0 -15
  1035. package/src/duckdb/src/parser/constraints/ub_duckdb_constraints.cpp +0 -5
  1036. package/src/duckdb/src/parser/expression/ub_duckdb_expression.cpp +0 -18
  1037. package/src/duckdb/src/parser/parsed_data/ub_duckdb_parsed_data.cpp +0 -24
  1038. package/src/duckdb/src/parser/query_node/ub_duckdb_query_node.cpp +0 -5
  1039. package/src/duckdb/src/parser/statement/ub_duckdb_statement.cpp +0 -25
  1040. package/src/duckdb/src/parser/tableref/ub_duckdb_parser_tableref.cpp +0 -8
  1041. package/src/duckdb/src/parser/transform/constraint/ub_duckdb_transformer_constraint.cpp +0 -2
  1042. package/src/duckdb/src/parser/transform/expression/ub_duckdb_transformer_expression.cpp +0 -20
  1043. package/src/duckdb/src/parser/transform/helpers/ub_duckdb_transformer_helpers.cpp +0 -8
  1044. package/src/duckdb/src/parser/transform/statement/ub_duckdb_transformer_statement.cpp +0 -37
  1045. package/src/duckdb/src/parser/transform/tableref/ub_duckdb_transformer_tableref.cpp +0 -8
  1046. package/src/duckdb/src/parser/ub_duckdb_parser.cpp +0 -15
  1047. package/src/duckdb/src/planner/binder/expression/ub_duckdb_bind_expression.cpp +0 -20
  1048. package/src/duckdb/src/planner/binder/query_node/ub_duckdb_bind_query_node.cpp +0 -12
  1049. package/src/duckdb/src/planner/binder/statement/ub_duckdb_bind_statement.cpp +0 -26
  1050. package/src/duckdb/src/planner/binder/tableref/ub_duckdb_bind_tableref.cpp +0 -17
  1051. package/src/duckdb/src/planner/expression/ub_duckdb_planner_expression.cpp +0 -19
  1052. package/src/duckdb/src/planner/expression_binder/ub_duckdb_expression_binders.cpp +0 -20
  1053. package/src/duckdb/src/planner/filter/ub_duckdb_planner_filter.cpp +0 -4
  1054. package/src/duckdb/src/planner/operator/ub_duckdb_planner_operator.cpp +0 -43
  1055. package/src/duckdb/src/planner/parsed_data/ub_duckdb_planner_parsed_data.cpp +0 -2
  1056. package/src/duckdb/src/planner/subquery/ub_duckdb_planner_subquery.cpp +0 -4
  1057. package/src/duckdb/src/planner/ub_duckdb_planner.cpp +0 -15
  1058. package/src/duckdb/src/storage/buffer/ub_duckdb_storage_buffer.cpp +0 -6
  1059. package/src/duckdb/src/storage/checkpoint/ub_duckdb_storage_checkpoint.cpp +0 -5
  1060. package/src/duckdb/src/storage/compression/chimp/ub_duckdb_storage_compression_chimp.cpp +0 -6
  1061. package/src/duckdb/src/storage/compression/ub_duckdb_storage_compression.cpp +0 -12
  1062. package/src/duckdb/src/storage/metadata/ub_duckdb_storage_metadata.cpp +0 -4
  1063. package/src/duckdb/src/storage/serialization/ub_duckdb_storage_serialization.cpp +0 -16
  1064. package/src/duckdb/src/storage/statistics/ub_duckdb_storage_statistics.cpp +0 -10
  1065. package/src/duckdb/src/storage/table/ub_duckdb_storage_table.cpp +0 -17
  1066. package/src/duckdb/src/storage/ub_duckdb_storage.cpp +0 -20
  1067. package/src/duckdb/src/transaction/ub_duckdb_transaction.cpp +0 -11
@@ -35,6 +35,13 @@
35
35
  #endif
36
36
  #endif
37
37
 
38
+ //! In the future, we are planning to move extension functions to a separate header. For now you can set the define
39
+ //! below to remove the functions that are planned to be moved out of this header.
40
+ // #define DUCKDB_NO_EXTENSION_FUNCTIONS
41
+
42
+ //! Set the define below to remove all functions that are deprecated or planned to be deprecated
43
+ // #define DUCKDB_API_NO_DEPRECATED
44
+
38
45
  //! API versions
39
46
  //! If no explicit API version is defined, the latest API version is used.
40
47
  //! Note that using older API versions (i.e. not using DUCKDB_API_LATEST) is deprecated.
@@ -433,6 +440,7 @@ typedef struct _duckdb_value {
433
440
  // Table function types
434
441
  //===--------------------------------------------------------------------===//
435
442
 
443
+ #ifndef DUCKDB_NO_EXTENSION_FUNCTIONS
436
444
  //! A table function. Must be destroyed with `duckdb_destroy_table_function`.
437
445
  typedef void *duckdb_table_function;
438
446
 
@@ -463,6 +471,7 @@ typedef void *duckdb_replacement_scan_info;
463
471
 
464
472
  //! A replacement scan function that can be added to a database.
465
473
  typedef void (*duckdb_replacement_callback_t)(duckdb_replacement_scan_info info, const char *table_name, void *data);
474
+ #endif
466
475
 
467
476
  //===--------------------------------------------------------------------===//
468
477
  // Arrow-related types
@@ -709,13 +718,17 @@ Returns the number of columns present in a the result object.
709
718
  */
710
719
  DUCKDB_API idx_t duckdb_column_count(duckdb_result *result);
711
720
 
721
+ #ifndef DUCKDB_API_NO_DEPRECATED
712
722
  /*!
723
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
724
+
713
725
  Returns the number of rows present in the result object.
714
726
 
715
727
  * result: The result object.
716
728
  * returns: The number of rows present in the result object.
717
729
  */
718
730
  DUCKDB_API idx_t duckdb_row_count(duckdb_result *result);
731
+ #endif
719
732
 
720
733
  /*!
721
734
  Returns the number of rows changed by the query stored in the result. This is relevant only for INSERT/UPDATE/DELETE
@@ -726,6 +739,7 @@ queries. For other queries the rows_changed will be 0.
726
739
  */
727
740
  DUCKDB_API idx_t duckdb_rows_changed(duckdb_result *result);
728
741
 
742
+ #ifndef DUCKDB_API_NO_DEPRECATED
729
743
  /*!
730
744
  **DEPRECATED**: Prefer using `duckdb_result_get_chunk` instead.
731
745
 
@@ -769,6 +783,7 @@ if (nullmask[row]) {
769
783
  * returns: The nullmask of the specified column.
770
784
  */
771
785
  DUCKDB_API bool *duckdb_nullmask_data(duckdb_result *result, idx_t col);
786
+ #endif
772
787
 
773
788
  /*!
774
789
  Returns the error message contained within the result. The error is only set if `duckdb_query` returns `DuckDBError`.
@@ -783,8 +798,10 @@ DUCKDB_API const char *duckdb_result_error(duckdb_result *result);
783
798
  //===--------------------------------------------------------------------===//
784
799
  // Result Functions
785
800
  //===--------------------------------------------------------------------===//
786
-
801
+ #ifndef DUCKDB_API_NO_DEPRECATED
787
802
  /*!
803
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
804
+
788
805
  Fetches a data chunk from the duckdb_result. This function should be called repeatedly until the result is exhausted.
789
806
 
790
807
  The result must be destroyed with `duckdb_destroy_data_chunk`.
@@ -804,6 +821,8 @@ Use `duckdb_result_chunk_count` to figure out how many chunks there are in the r
804
821
  DUCKDB_API duckdb_data_chunk duckdb_result_get_chunk(duckdb_result result, idx_t chunk_index);
805
822
 
806
823
  /*!
824
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
825
+
807
826
  Checks if the type of the internal result is StreamQueryResult.
808
827
 
809
828
  * result: The result object to check.
@@ -812,12 +831,15 @@ Checks if the type of the internal result is StreamQueryResult.
812
831
  DUCKDB_API bool duckdb_result_is_streaming(duckdb_result result);
813
832
 
814
833
  /*!
834
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
835
+
815
836
  Returns the number of data chunks present in the result.
816
837
 
817
838
  * result: The result object
818
839
  * returns: Number of data chunks present in the result.
819
840
  */
820
841
  DUCKDB_API idx_t duckdb_result_chunk_count(duckdb_result result);
842
+ #endif
821
843
 
822
844
  /*!
823
845
  Returns the return_type of the given result, or DUCKDB_RETURN_TYPE_INVALID on error
@@ -827,6 +849,7 @@ Returns the return_type of the given result, or DUCKDB_RETURN_TYPE_INVALID on er
827
849
  */
828
850
  DUCKDB_API duckdb_result_type duckdb_result_return_type(duckdb_result result);
829
851
 
852
+ #ifndef DUCKDB_API_NO_DEPRECATED
830
853
  //===--------------------------------------------------------------------===//
831
854
  // Safe fetch functions
832
855
  //===--------------------------------------------------------------------===//
@@ -837,91 +860,127 @@ DUCKDB_API duckdb_result_type duckdb_result_return_type(duckdb_result result);
837
860
  // For fast access of values prefer using `duckdb_result_get_chunk`
838
861
 
839
862
  /*!
863
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
864
+
840
865
  * returns: The boolean value at the specified location, or false if the value cannot be converted.
841
866
  */
842
867
  DUCKDB_API bool duckdb_value_boolean(duckdb_result *result, idx_t col, idx_t row);
843
868
 
844
869
  /*!
870
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
871
+
845
872
  * returns: The int8_t value at the specified location, or 0 if the value cannot be converted.
846
873
  */
847
874
  DUCKDB_API int8_t duckdb_value_int8(duckdb_result *result, idx_t col, idx_t row);
848
875
 
849
876
  /*!
877
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
878
+
850
879
  * returns: The int16_t value at the specified location, or 0 if the value cannot be converted.
851
880
  */
852
881
  DUCKDB_API int16_t duckdb_value_int16(duckdb_result *result, idx_t col, idx_t row);
853
882
 
854
883
  /*!
884
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
885
+
855
886
  * returns: The int32_t value at the specified location, or 0 if the value cannot be converted.
856
887
  */
857
888
  DUCKDB_API int32_t duckdb_value_int32(duckdb_result *result, idx_t col, idx_t row);
858
889
 
859
890
  /*!
891
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
892
+
860
893
  * returns: The int64_t value at the specified location, or 0 if the value cannot be converted.
861
894
  */
862
895
  DUCKDB_API int64_t duckdb_value_int64(duckdb_result *result, idx_t col, idx_t row);
863
896
 
864
897
  /*!
898
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
899
+
865
900
  * returns: The duckdb_hugeint value at the specified location, or 0 if the value cannot be converted.
866
901
  */
867
902
  DUCKDB_API duckdb_hugeint duckdb_value_hugeint(duckdb_result *result, idx_t col, idx_t row);
868
903
 
869
904
  /*!
905
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
906
+
870
907
  * returns: The duckdb_uhugeint value at the specified location, or 0 if the value cannot be converted.
871
908
  */
872
909
  DUCKDB_API duckdb_uhugeint duckdb_value_uhugeint(duckdb_result *result, idx_t col, idx_t row);
873
910
 
874
911
  /*!
912
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
913
+
875
914
  * returns: The duckdb_decimal value at the specified location, or 0 if the value cannot be converted.
876
915
  */
877
916
  DUCKDB_API duckdb_decimal duckdb_value_decimal(duckdb_result *result, idx_t col, idx_t row);
878
917
 
879
918
  /*!
919
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
920
+
880
921
  * returns: The uint8_t value at the specified location, or 0 if the value cannot be converted.
881
922
  */
882
923
  DUCKDB_API uint8_t duckdb_value_uint8(duckdb_result *result, idx_t col, idx_t row);
883
924
 
884
925
  /*!
926
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
927
+
885
928
  * returns: The uint16_t value at the specified location, or 0 if the value cannot be converted.
886
929
  */
887
930
  DUCKDB_API uint16_t duckdb_value_uint16(duckdb_result *result, idx_t col, idx_t row);
888
931
 
889
932
  /*!
933
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
934
+
890
935
  * returns: The uint32_t value at the specified location, or 0 if the value cannot be converted.
891
936
  */
892
937
  DUCKDB_API uint32_t duckdb_value_uint32(duckdb_result *result, idx_t col, idx_t row);
893
938
 
894
939
  /*!
940
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
941
+
895
942
  * returns: The uint64_t value at the specified location, or 0 if the value cannot be converted.
896
943
  */
897
944
  DUCKDB_API uint64_t duckdb_value_uint64(duckdb_result *result, idx_t col, idx_t row);
898
945
 
899
946
  /*!
947
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
948
+
900
949
  * returns: The float value at the specified location, or 0 if the value cannot be converted.
901
950
  */
902
951
  DUCKDB_API float duckdb_value_float(duckdb_result *result, idx_t col, idx_t row);
903
952
 
904
953
  /*!
954
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
955
+
905
956
  * returns: The double value at the specified location, or 0 if the value cannot be converted.
906
957
  */
907
958
  DUCKDB_API double duckdb_value_double(duckdb_result *result, idx_t col, idx_t row);
908
959
 
909
960
  /*!
961
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
962
+
910
963
  * returns: The duckdb_date value at the specified location, or 0 if the value cannot be converted.
911
964
  */
912
965
  DUCKDB_API duckdb_date duckdb_value_date(duckdb_result *result, idx_t col, idx_t row);
913
966
 
914
967
  /*!
968
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
969
+
915
970
  * returns: The duckdb_time value at the specified location, or 0 if the value cannot be converted.
916
971
  */
917
972
  DUCKDB_API duckdb_time duckdb_value_time(duckdb_result *result, idx_t col, idx_t row);
918
973
 
919
974
  /*!
975
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
976
+
920
977
  * returns: The duckdb_timestamp value at the specified location, or 0 if the value cannot be converted.
921
978
  */
922
979
  DUCKDB_API duckdb_timestamp duckdb_value_timestamp(duckdb_result *result, idx_t col, idx_t row);
923
980
 
924
981
  /*!
982
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
983
+
925
984
  * returns: The duckdb_interval value at the specified location, or 0 if the value cannot be converted.
926
985
  */
927
986
  DUCKDB_API duckdb_interval duckdb_value_interval(duckdb_result *result, idx_t col, idx_t row);
@@ -934,7 +993,10 @@ converted. The result must be freed with `duckdb_free`.
934
993
  DUCKDB_API char *duckdb_value_varchar(duckdb_result *result, idx_t col, idx_t row);
935
994
 
936
995
  /*!
937
- * returns: The string value at the specified location.
996
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
997
+
998
+ * returns: The string value at the specified location. Attempts to cast the result value to string.
999
+ * No support for nested types, and for other complex types.
938
1000
  * The resulting field "string.data" must be freed with `duckdb_free.`
939
1001
  */
940
1002
  DUCKDB_API duckdb_string duckdb_value_string(duckdb_result *result, idx_t col, idx_t row);
@@ -960,15 +1022,20 @@ The result must NOT be freed.
960
1022
  DUCKDB_API duckdb_string duckdb_value_string_internal(duckdb_result *result, idx_t col, idx_t row);
961
1023
 
962
1024
  /*!
1025
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
1026
+
963
1027
  * returns: The duckdb_blob value at the specified location. Returns a blob with blob.data set to nullptr if the
964
1028
  value cannot be converted. The resulting field "blob.data" must be freed with `duckdb_free.`
965
1029
  */
966
1030
  DUCKDB_API duckdb_blob duckdb_value_blob(duckdb_result *result, idx_t col, idx_t row);
967
1031
 
968
1032
  /*!
1033
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
1034
+
969
1035
  * returns: Returns true if the value at the specified index is NULL, and false otherwise.
970
1036
  */
971
1037
  DUCKDB_API bool duckdb_value_is_null(duckdb_result *result, idx_t col, idx_t row);
1038
+ #endif
972
1039
 
973
1040
  //===--------------------------------------------------------------------===//
974
1041
  // Helpers
@@ -1404,7 +1471,10 @@ Note that the result must be freed with `duckdb_destroy_result`.
1404
1471
  DUCKDB_API duckdb_state duckdb_execute_prepared(duckdb_prepared_statement prepared_statement,
1405
1472
  duckdb_result *out_result);
1406
1473
 
1474
+ #ifndef DUCKDB_API_NO_DEPRECATED
1407
1475
  /*!
1476
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
1477
+
1408
1478
  Executes the prepared statement with the given bound parameters, and returns an optionally-streaming query result.
1409
1479
  To determine if the resulting query was in fact streamed, use `duckdb_result_is_streaming`
1410
1480
 
@@ -1419,6 +1489,7 @@ Note that the result must be freed with `duckdb_destroy_result`.
1419
1489
  */
1420
1490
  DUCKDB_API duckdb_state duckdb_execute_prepared_streaming(duckdb_prepared_statement prepared_statement,
1421
1491
  duckdb_result *out_result);
1492
+ #endif
1422
1493
 
1423
1494
  //===--------------------------------------------------------------------===//
1424
1495
  // Extract Statements
@@ -1491,8 +1562,10 @@ Note that after calling `duckdb_pending_prepared`, the pending result should alw
1491
1562
  */
1492
1563
  DUCKDB_API duckdb_state duckdb_pending_prepared(duckdb_prepared_statement prepared_statement,
1493
1564
  duckdb_pending_result *out_result);
1494
-
1565
+ #ifndef DUCKDB_API_NO_DEPRECATED
1495
1566
  /*!
1567
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
1568
+
1496
1569
  Executes the prepared statement with the given bound parameters, and returns a pending result.
1497
1570
  This pending result will create a streaming duckdb_result when executed.
1498
1571
  The pending result represents an intermediate structure for a query that is not yet fully executed.
@@ -1506,6 +1579,7 @@ Note that after calling `duckdb_pending_prepared_streaming`, the pending result
1506
1579
  */
1507
1580
  DUCKDB_API duckdb_state duckdb_pending_prepared_streaming(duckdb_prepared_statement prepared_statement,
1508
1581
  duckdb_pending_result *out_result);
1582
+ #endif
1509
1583
 
1510
1584
  /*!
1511
1585
  Closes the pending result and de-allocates all memory allocated for the result.
@@ -2169,6 +2243,7 @@ Equivalent to `duckdb_validity_set_row_validity` with valid set to true.
2169
2243
  */
2170
2244
  DUCKDB_API void duckdb_validity_set_row_valid(uint64_t *validity, idx_t row);
2171
2245
 
2246
+ #ifndef DUCKDB_NO_EXTENSION_FUNCTIONS
2172
2247
  //===--------------------------------------------------------------------===//
2173
2248
  // Table Functions
2174
2249
  //===--------------------------------------------------------------------===//
@@ -2515,6 +2590,7 @@ Report that an error has occurred while executing the replacement scan.
2515
2590
  * error: The error message
2516
2591
  */
2517
2592
  DUCKDB_API void duckdb_replacement_scan_set_error(duckdb_replacement_scan_info info, const char *error);
2593
+ #endif
2518
2594
 
2519
2595
  //===--------------------------------------------------------------------===//
2520
2596
  // Appender
@@ -2578,11 +2654,10 @@ The error message should not be freed. It will be de-allocated when `duckdb_appe
2578
2654
  DUCKDB_API const char *duckdb_appender_error(duckdb_appender appender);
2579
2655
 
2580
2656
  /*!
2581
- Flush the appender to the table, forcing the cache of the appender to be cleared and the data to be appended to the
2582
- base table.
2583
-
2584
- This should generally not be used unless you know what you are doing. Instead, call `duckdb_appender_destroy` when you
2585
- are done with the appender.
2657
+ Flush the appender to the table, forcing the cache of the appender to be cleared. If flushing the data triggers a
2658
+ constraint violation or any other error, then all data is invalidated, and this function returns DuckDBError.
2659
+ It is not possible to append more values. Call duckdb_appender_error to obtain the error message followed by
2660
+ duckdb_appender_destroy to destroy the invalidated appender.
2586
2661
 
2587
2662
  * appender: The appender to flush.
2588
2663
  * returns: `DuckDBSuccess` on success or `DuckDBError` on failure.
@@ -2590,9 +2665,10 @@ are done with the appender.
2590
2665
  DUCKDB_API duckdb_state duckdb_appender_flush(duckdb_appender appender);
2591
2666
 
2592
2667
  /*!
2593
- Close the appender, flushing all intermediate state in the appender to the table and closing it for further appends.
2594
-
2595
- This is generally not necessary. Call `duckdb_appender_destroy` instead.
2668
+ Closes the appender by flushing all intermediate states and closing it for further appends. If flushing the data
2669
+ triggers a constraint violation or any other error, then all data is invalidated, and this function returns DuckDBError.
2670
+ Call duckdb_appender_error to obtain the error message followed by duckdb_appender_destroy to destroy the invalidated
2671
+ appender.
2596
2672
 
2597
2673
  * appender: The appender to flush and close.
2598
2674
  * returns: `DuckDBSuccess` on success or `DuckDBError` on failure.
@@ -2600,8 +2676,11 @@ This is generally not necessary. Call `duckdb_appender_destroy` instead.
2600
2676
  DUCKDB_API duckdb_state duckdb_appender_close(duckdb_appender appender);
2601
2677
 
2602
2678
  /*!
2603
- Close the appender and destroy it. Flushing all intermediate state in the appender to the table, and de-allocating
2604
- all memory associated with the appender.
2679
+ Closes the appender by flushing all intermediate states to the table and destroying it. By destroying it, this function
2680
+ de-allocates all memory associated with the appender. If flushing the data triggers a constraint violation,
2681
+ then all data is invalidated, and this function returns DuckDBError. Due to the destruction of the appender, it is no
2682
+ longer possible to obtain the specific error message with duckdb_appender_error. Therefore, call duckdb_appender_close
2683
+ before destroying the appender, if you need insights into the specific error.
2605
2684
 
2606
2685
  * appender: The appender to flush, close and destroy.
2607
2686
  * returns: `DuckDBSuccess` on success or `DuckDBError` on failure.
@@ -2739,11 +2818,14 @@ If the append is successful, DuckDBSuccess is returned.
2739
2818
  */
2740
2819
  DUCKDB_API duckdb_state duckdb_append_data_chunk(duckdb_appender appender, duckdb_data_chunk chunk);
2741
2820
 
2821
+ #ifndef DUCKDB_API_NO_DEPRECATED
2742
2822
  //===--------------------------------------------------------------------===//
2743
2823
  // Arrow Interface
2744
2824
  //===--------------------------------------------------------------------===//
2745
2825
 
2746
2826
  /*!
2827
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2828
+
2747
2829
  Executes a SQL query within a connection and stores the full (materialized) result in an arrow structure.
2748
2830
  If the query fails to execute, DuckDBError is returned and the error message can be retrieved by calling
2749
2831
  `duckdb_query_arrow_error`.
@@ -2759,6 +2841,8 @@ query fails, otherwise the error stored within the result will not be freed corr
2759
2841
  DUCKDB_API duckdb_state duckdb_query_arrow(duckdb_connection connection, const char *query, duckdb_arrow *out_result);
2760
2842
 
2761
2843
  /*!
2844
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2845
+
2762
2846
  Fetch the internal arrow schema from the arrow result. Remember to call release on the respective
2763
2847
  ArrowSchema object.
2764
2848
 
@@ -2769,6 +2853,8 @@ ArrowSchema object.
2769
2853
  DUCKDB_API duckdb_state duckdb_query_arrow_schema(duckdb_arrow result, duckdb_arrow_schema *out_schema);
2770
2854
 
2771
2855
  /*!
2856
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2857
+
2772
2858
  Fetch the internal arrow schema from the prepared statement. Remember to call release on the respective
2773
2859
  ArrowSchema object.
2774
2860
 
@@ -2779,6 +2865,8 @@ ArrowSchema object.
2779
2865
  DUCKDB_API duckdb_state duckdb_prepared_arrow_schema(duckdb_prepared_statement prepared,
2780
2866
  duckdb_arrow_schema *out_schema);
2781
2867
  /*!
2868
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2869
+
2782
2870
  Convert a data chunk into an arrow struct array. Remember to call release on the respective
2783
2871
  ArrowArray object.
2784
2872
 
@@ -2789,6 +2877,8 @@ ArrowArray object.
2789
2877
  DUCKDB_API void duckdb_result_arrow_array(duckdb_result result, duckdb_data_chunk chunk, duckdb_arrow_array *out_array);
2790
2878
 
2791
2879
  /*!
2880
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2881
+
2792
2882
  Fetch an internal arrow struct array from the arrow result. Remember to call release on the respective
2793
2883
  ArrowArray object.
2794
2884
 
@@ -2802,6 +2892,8 @@ So consume the out_array before calling this function again.
2802
2892
  DUCKDB_API duckdb_state duckdb_query_arrow_array(duckdb_arrow result, duckdb_arrow_array *out_array);
2803
2893
 
2804
2894
  /*!
2895
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2896
+
2805
2897
  Returns the number of columns present in the arrow result object.
2806
2898
 
2807
2899
  * result: The result object.
@@ -2810,6 +2902,8 @@ Returns the number of columns present in the arrow result object.
2810
2902
  DUCKDB_API idx_t duckdb_arrow_column_count(duckdb_arrow result);
2811
2903
 
2812
2904
  /*!
2905
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2906
+
2813
2907
  Returns the number of rows present in the arrow result object.
2814
2908
 
2815
2909
  * result: The result object.
@@ -2818,6 +2912,8 @@ Returns the number of rows present in the arrow result object.
2818
2912
  DUCKDB_API idx_t duckdb_arrow_row_count(duckdb_arrow result);
2819
2913
 
2820
2914
  /*!
2915
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2916
+
2821
2917
  Returns the number of rows changed by the query stored in the arrow result. This is relevant only for
2822
2918
  INSERT/UPDATE/DELETE queries. For other queries the rows_changed will be 0.
2823
2919
 
@@ -2827,7 +2923,9 @@ INSERT/UPDATE/DELETE queries. For other queries the rows_changed will be 0.
2827
2923
  DUCKDB_API idx_t duckdb_arrow_rows_changed(duckdb_arrow result);
2828
2924
 
2829
2925
  /*!
2830
- Returns the error message contained within the result. The error is only set if `duckdb_query_arrow` returns
2926
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2927
+
2928
+ Returns the error message contained within the result. The error is only set if `duckdb_query_arrow` returns
2831
2929
  `DuckDBError`.
2832
2930
 
2833
2931
  The error message should not be freed. It will be de-allocated when `duckdb_destroy_arrow` is called.
@@ -2838,6 +2936,8 @@ The error message should not be freed. It will be de-allocated when `duckdb_dest
2838
2936
  DUCKDB_API const char *duckdb_query_arrow_error(duckdb_arrow result);
2839
2937
 
2840
2938
  /*!
2939
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2940
+
2841
2941
  Closes the result and de-allocates all memory allocated for the arrow result.
2842
2942
 
2843
2943
  * result: The result to destroy.
@@ -2845,6 +2945,8 @@ Closes the result and de-allocates all memory allocated for the arrow result.
2845
2945
  DUCKDB_API void duckdb_destroy_arrow(duckdb_arrow *result);
2846
2946
 
2847
2947
  /*!
2948
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2949
+
2848
2950
  Releases the arrow array stream and de-allocates its memory.
2849
2951
 
2850
2952
  * stream: The arrow array stream to destroy.
@@ -2852,6 +2954,8 @@ Releases the arrow array stream and de-allocates its memory.
2852
2954
  DUCKDB_API void duckdb_destroy_arrow_stream(duckdb_arrow_stream *stream_p);
2853
2955
 
2854
2956
  /*!
2957
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2958
+
2855
2959
  Executes the prepared statement with the given bound parameters, and returns an arrow query result.
2856
2960
  Note that after running `duckdb_execute_prepared_arrow`, `duckdb_destroy_arrow` must be called on the result object.
2857
2961
 
@@ -2863,6 +2967,8 @@ DUCKDB_API duckdb_state duckdb_execute_prepared_arrow(duckdb_prepared_statement
2863
2967
  duckdb_arrow *out_result);
2864
2968
 
2865
2969
  /*!
2970
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2971
+
2866
2972
  Scans the Arrow stream and creates a view with the given name.
2867
2973
 
2868
2974
  * connection: The connection on which to execute the scan.
@@ -2874,6 +2980,8 @@ DUCKDB_API duckdb_state duckdb_arrow_scan(duckdb_connection connection, const ch
2874
2980
  duckdb_arrow_stream arrow);
2875
2981
 
2876
2982
  /*!
2983
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
2984
+
2877
2985
  Scans the Arrow array and creates a view with the given name.
2878
2986
  Note that after running `duckdb_arrow_array_scan`, `duckdb_destroy_arrow_stream` must be called on the out stream.
2879
2987
 
@@ -2887,7 +2995,9 @@ Note that after running `duckdb_arrow_array_scan`, `duckdb_destroy_arrow_stream`
2887
2995
  DUCKDB_API duckdb_state duckdb_arrow_array_scan(duckdb_connection connection, const char *table_name,
2888
2996
  duckdb_arrow_schema arrow_schema, duckdb_arrow_array arrow_array,
2889
2997
  duckdb_arrow_stream *out_stream);
2998
+ #endif
2890
2999
 
3000
+ #ifndef DUCKDB_NO_EXTENSION_FUNCTIONS
2891
3001
  //===--------------------------------------------------------------------===//
2892
3002
  // Threading Information
2893
3003
  //===--------------------------------------------------------------------===//
@@ -2968,12 +3078,15 @@ Returns true if the execution of the current query is finished.
2968
3078
  * con: The connection on which to check
2969
3079
  */
2970
3080
  DUCKDB_API bool duckdb_execution_is_finished(duckdb_connection con);
3081
+ #endif
2971
3082
 
2972
3083
  //===--------------------------------------------------------------------===//
2973
3084
  // Streaming Result Interface
2974
3085
  //===--------------------------------------------------------------------===//
2975
-
3086
+ #ifndef DUCKDB_API_NO_DEPRECATED
2976
3087
  /*!
3088
+ **DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
3089
+
2977
3090
  Fetches a data chunk from the (streaming) duckdb_result. This function should be called repeatedly until the result is
2978
3091
  exhausted.
2979
3092
 
@@ -2990,6 +3103,19 @@ It is not known beforehand how many chunks will be returned by this result.
2990
3103
  * returns: The resulting data chunk. Returns `NULL` if the result has an error.
2991
3104
  */
2992
3105
  DUCKDB_API duckdb_data_chunk duckdb_stream_fetch_chunk(duckdb_result result);
3106
+ #endif
3107
+
3108
+ /*!
3109
+ Fetches a data chunk from a duckdb_result. This function should be called repeatedly until the result is exhausted.
3110
+
3111
+ The result must be destroyed with `duckdb_destroy_data_chunk`.
3112
+
3113
+ It is not known beforehand how many chunks will be returned by this result.
3114
+
3115
+ * result: The result object to fetch the data chunk from.
3116
+ * returns: The resulting data chunk. Returns `NULL` if the result has an error.
3117
+ */
3118
+ DUCKDB_API duckdb_data_chunk duckdb_fetch_chunk(duckdb_result result);
2993
3119
 
2994
3120
  #ifdef __cplusplus
2995
3121
  }
@@ -376,7 +376,9 @@ void Appender::FlushInternal(ColumnDataCollection &collection) {
376
376
  }
377
377
 
378
378
  void InternalAppender::FlushInternal(ColumnDataCollection &collection) {
379
- table.GetStorage().LocalAppend(table, context, collection);
379
+ auto binder = Binder::CreateBinder(context);
380
+ auto bound_constraints = binder->BindConstraints(table);
381
+ table.GetStorage().LocalAppend(table, context, collection, bound_constraints);
380
382
  }
381
383
 
382
384
  void BaseAppender::Close() {
@@ -41,14 +41,15 @@ AttachedDatabase::AttachedDatabase(DatabaseInstance &db, Catalog &catalog_p, str
41
41
  internal = true;
42
42
  }
43
43
 
44
- AttachedDatabase::AttachedDatabase(DatabaseInstance &db, Catalog &catalog_p, StorageExtension &storage_extension,
44
+ AttachedDatabase::AttachedDatabase(DatabaseInstance &db, Catalog &catalog_p, StorageExtension &storage_extension_p,
45
45
  ClientContext &context, string name_p, const AttachInfo &info,
46
46
  AccessMode access_mode)
47
- : CatalogEntry(CatalogType::DATABASE_ENTRY, catalog_p, std::move(name_p)), db(db), parent_catalog(&catalog_p) {
47
+ : CatalogEntry(CatalogType::DATABASE_ENTRY, catalog_p, std::move(name_p)), db(db), parent_catalog(&catalog_p),
48
+ storage_extension(&storage_extension_p) {
48
49
  type = access_mode == AccessMode::READ_ONLY ? AttachedDatabaseType::READ_ONLY_DATABASE
49
50
  : AttachedDatabaseType::READ_WRITE_DATABASE;
50
- catalog =
51
- storage_extension.attach(storage_extension.storage_info.get(), context, *this, name, *info.Copy(), access_mode);
51
+ catalog = storage_extension->attach(storage_extension->storage_info.get(), context, *this, name, *info.Copy(),
52
+ access_mode);
52
53
  if (!catalog) {
53
54
  throw InternalException("AttachedDatabase - attach function did not return a catalog");
54
55
  }
@@ -57,7 +58,7 @@ AttachedDatabase::AttachedDatabase(DatabaseInstance &db, Catalog &catalog_p, Sto
57
58
  storage = make_uniq<SingleFileStorageManager>(*this, info.path, access_mode == AccessMode::READ_ONLY);
58
59
  }
59
60
  transaction_manager =
60
- storage_extension.create_transaction_manager(storage_extension.storage_info.get(), *this, *catalog);
61
+ storage_extension->create_transaction_manager(storage_extension->storage_info.get(), *this, *catalog);
61
62
  if (!transaction_manager) {
62
63
  throw InternalException(
63
64
  "AttachedDatabase - create_transaction_manager function did not return a transaction manager");
@@ -82,7 +83,7 @@ bool AttachedDatabase::IsReadOnly() const {
82
83
  }
83
84
 
84
85
  bool AttachedDatabase::NameIsReserved(const string &name) {
85
- return name == DEFAULT_SCHEMA || name == TEMP_CATALOG;
86
+ return name == DEFAULT_SCHEMA || name == TEMP_CATALOG || name == SYSTEM_CATALOG;
86
87
  }
87
88
 
88
89
  string AttachedDatabase::ExtractDatabaseName(const string &dbpath, FileSystem &fs) {
@@ -96,14 +97,14 @@ string AttachedDatabase::ExtractDatabaseName(const string &dbpath, FileSystem &f
96
97
  return name;
97
98
  }
98
99
 
99
- void AttachedDatabase::Initialize(optional_ptr<ClientContext> context) {
100
+ void AttachedDatabase::Initialize() {
100
101
  if (IsSystem()) {
101
102
  catalog->Initialize(true);
102
103
  } else {
103
104
  catalog->Initialize(false);
104
105
  }
105
106
  if (storage) {
106
- storage->Initialize(context);
107
+ storage->Initialize();
107
108
  }
108
109
  }
109
110
 
@@ -168,7 +169,9 @@ void AttachedDatabase::Close() {
168
169
  if (!config.options.checkpoint_on_shutdown) {
169
170
  return;
170
171
  }
171
- storage->CreateCheckpoint(true);
172
+ CheckpointOptions options;
173
+ options.wal_action = CheckpointWALAction::DELETE_WAL;
174
+ storage->CreateCheckpoint(options);
172
175
  }
173
176
  } catch (...) { // NOLINT
174
177
  }
@@ -42,13 +42,13 @@ duckdb_state duckdb_appender_destroy(duckdb_appender *appender) {
42
42
  if (!appender || !*appender) {
43
43
  return DuckDBError;
44
44
  }
45
- duckdb_appender_close(*appender);
45
+ auto state = duckdb_appender_close(*appender);
46
46
  auto wrapper = reinterpret_cast<AppenderWrapper *>(*appender);
47
47
  if (wrapper) {
48
48
  delete wrapper;
49
49
  }
50
50
  *appender = nullptr;
51
- return DuckDBSuccess;
51
+ return state;
52
52
  }
53
53
 
54
54
  template <class FUN>
@@ -67,7 +67,7 @@ duckdb_state duckdb_appender_run_function(duckdb_appender appender, FUN &&functi
67
67
  wrapper->error = error.RawMessage();
68
68
  return DuckDBError;
69
69
  } catch (...) { // LCOV_EXCL_START
70
- wrapper->error = "Unknown error";
70
+ wrapper->error = "Unknown appender error.";
71
71
  return DuckDBError;
72
72
  } // LCOV_EXCL_STOP
73
73
  return DuckDBSuccess;
@@ -199,6 +199,7 @@ duckdb_state duckdb_append_varchar(duckdb_appender appender, const char *val) {
199
199
  duckdb_state duckdb_append_varchar_length(duckdb_appender appender, const char *val, idx_t length) {
200
200
  return duckdb_append_internal<string_t>(appender, string_t(val, duckdb::UnsafeNumericCast<uint32_t>(length)));
201
201
  }
202
+
202
203
  duckdb_state duckdb_append_blob(duckdb_appender appender, const void *data, idx_t length) {
203
204
  auto value = duckdb::Value::BLOB((duckdb::const_data_ptr_t)data, length);
204
205
  return duckdb_append_internal<duckdb::Value>(appender, value);
@@ -127,7 +127,7 @@ idx_t duckdb_arrow_rows_changed(duckdb_arrow result) {
127
127
  auto rows = collection.GetRows();
128
128
  D_ASSERT(row_count == 1);
129
129
  D_ASSERT(rows.size() == 1);
130
- rows_changed = rows[0].GetValue(0).GetValue<int64_t>();
130
+ rows_changed = duckdb::NumericCast<idx_t>(rows[0].GetValue(0).GetValue<int64_t>());
131
131
  }
132
132
  return rows_changed;
133
133
  }
@@ -291,8 +291,8 @@ duckdb_state duckdb_arrow_scan(duckdb_connection connection, const char *table_n
291
291
  }
292
292
 
293
293
  typedef void (*release_fn_t)(ArrowSchema *);
294
- std::vector<release_fn_t> release_fns(schema.n_children);
295
- for (int64_t i = 0; i < schema.n_children; i++) {
294
+ std::vector<release_fn_t> release_fns(duckdb::NumericCast<idx_t>(schema.n_children));
295
+ for (idx_t i = 0; i < duckdb::NumericCast<idx_t>(schema.n_children); i++) {
296
296
  auto child = schema.children[i];
297
297
  release_fns[i] = child->release;
298
298
  child->release = arrow_array_stream_wrapper::EmptySchemaRelease;
@@ -301,7 +301,7 @@ duckdb_state duckdb_arrow_scan(duckdb_connection connection, const char *table_n
301
301
  auto ret = arrow_array_stream_wrapper::Ingest(connection, table_name, stream);
302
302
 
303
303
  // Restore release functions.
304
- for (int64_t i = 0; i < schema.n_children; i++) {
304
+ for (idx_t i = 0; i < duckdb::NumericCast<idx_t>(schema.n_children); i++) {
305
305
  schema.children[i]->release = release_fns[i];
306
306
  }
307
307