duckdb 0.7.2-dev3546.0 → 0.7.2-dev3666.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 (77) hide show
  1. package/package.json +1 -1
  2. package/src/database.cpp +1 -0
  3. package/src/duckdb/extension/json/buffered_json_reader.cpp +56 -17
  4. package/src/duckdb/extension/json/include/buffered_json_reader.hpp +56 -31
  5. package/src/duckdb/extension/json/include/json_common.hpp +5 -4
  6. package/src/duckdb/extension/json/include/json_executors.hpp +13 -18
  7. package/src/duckdb/extension/json/include/json_functions.hpp +3 -0
  8. package/src/duckdb/extension/json/include/json_scan.hpp +106 -153
  9. package/src/duckdb/extension/json/include/json_transform.hpp +2 -2
  10. package/src/duckdb/extension/json/json_common.cpp +1 -1
  11. package/src/duckdb/extension/json/json_functions/copy_json.cpp +94 -38
  12. package/src/duckdb/extension/json/json_functions/json_contains.cpp +7 -8
  13. package/src/duckdb/extension/json/json_functions/json_create.cpp +7 -7
  14. package/src/duckdb/extension/json/json_functions/json_merge_patch.cpp +4 -4
  15. package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +4 -4
  16. package/src/duckdb/extension/json/json_functions/json_structure.cpp +7 -5
  17. package/src/duckdb/extension/json/json_functions/json_transform.cpp +10 -8
  18. package/src/duckdb/extension/json/json_functions/json_valid.cpp +1 -1
  19. package/src/duckdb/extension/json/json_functions/read_json.cpp +166 -169
  20. package/src/duckdb/extension/json/json_functions/read_json_objects.cpp +37 -16
  21. package/src/duckdb/extension/json/json_functions.cpp +11 -4
  22. package/src/duckdb/extension/json/json_scan.cpp +593 -374
  23. package/src/duckdb/extension/parquet/parquet-extension.cpp +5 -0
  24. package/src/duckdb/src/common/file_system.cpp +26 -6
  25. package/src/duckdb/src/common/local_file_system.cpp +0 -13
  26. package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +12 -6
  27. package/src/duckdb/src/execution/operator/persistent/csv_reader_options.cpp +10 -0
  28. package/src/duckdb/src/function/pragma/pragma_queries.cpp +5 -3
  29. package/src/duckdb/src/function/table/copy_csv.cpp +66 -12
  30. package/src/duckdb/src/function/table/read_csv.cpp +13 -3
  31. package/src/duckdb/src/function/table/version/pragma_version.cpp +8 -2
  32. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/column_dependency_manager.hpp +1 -1
  33. package/src/duckdb/src/include/duckdb/catalog/catalog_search_path.hpp +1 -1
  34. package/src/duckdb/src/include/duckdb/catalog/similar_catalog_entry.hpp +1 -1
  35. package/src/duckdb/src/include/duckdb/common/exception.hpp +3 -3
  36. package/src/duckdb/src/include/duckdb/common/file_system.hpp +5 -0
  37. package/src/duckdb/src/include/duckdb/common/http_state.hpp +2 -1
  38. package/src/duckdb/src/include/duckdb/common/hugeint.hpp +6 -6
  39. package/src/duckdb/src/include/duckdb/common/limits.hpp +46 -46
  40. package/src/duckdb/src/include/duckdb/common/operator/cast_operators.hpp +8 -8
  41. package/src/duckdb/src/include/duckdb/common/operator/comparison_operators.hpp +6 -6
  42. package/src/duckdb/src/include/duckdb/common/operator/convert_to_string.hpp +1 -1
  43. package/src/duckdb/src/include/duckdb/common/operator/decimal_cast_operators.hpp +2 -4
  44. package/src/duckdb/src/include/duckdb/common/operator/string_cast.hpp +1 -1
  45. package/src/duckdb/src/include/duckdb/common/operator/subtract.hpp +1 -1
  46. package/src/duckdb/src/include/duckdb/common/preserved_error.hpp +1 -1
  47. package/src/duckdb/src/include/duckdb/common/re2_regex.hpp +1 -1
  48. package/src/duckdb/src/include/duckdb/common/string_util.hpp +7 -7
  49. package/src/duckdb/src/include/duckdb/common/types/chunk_collection.hpp +10 -10
  50. package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +12 -12
  51. package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_iterators.hpp +2 -2
  52. package/src/duckdb/src/include/duckdb/common/types/value.hpp +1 -1
  53. package/src/duckdb/src/include/duckdb/common/types.hpp +2 -2
  54. package/src/duckdb/src/include/duckdb/common/winapi.hpp +1 -1
  55. package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +1 -1
  56. package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_reader_options.hpp +8 -3
  57. package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +10 -14
  58. package/src/duckdb/src/include/duckdb/function/table_function.hpp +1 -1
  59. package/src/duckdb/src/include/duckdb/function/udf_function.hpp +56 -50
  60. package/src/duckdb/src/include/duckdb/main/appender.hpp +2 -2
  61. package/src/duckdb/src/include/duckdb/main/client_context.hpp +2 -2
  62. package/src/duckdb/src/include/duckdb/main/client_data.hpp +3 -1
  63. package/src/duckdb/src/include/duckdb/main/connection.hpp +8 -9
  64. package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +1 -0
  65. package/src/duckdb/src/include/duckdb/main/query_result.hpp +3 -3
  66. package/src/duckdb/src/include/duckdb/main/relation.hpp +6 -7
  67. package/src/duckdb/src/include/duckdb/optimizer/optimizer_extension.hpp +1 -1
  68. package/src/duckdb/src/include/duckdb/parser/column_list.hpp +7 -7
  69. package/src/duckdb/src/include/duckdb/parser/parser_extension.hpp +2 -2
  70. package/src/duckdb/src/include/duckdb/parser/sql_statement.hpp +1 -1
  71. package/src/duckdb/src/include/duckdb/parser/statement/select_statement.hpp +1 -1
  72. package/src/duckdb/src/include/duckdb/planner/operator_extension.hpp +2 -2
  73. package/src/duckdb/src/include/duckdb/storage/storage_extension.hpp +2 -2
  74. package/src/duckdb/src/planner/binder/statement/bind_copy.cpp +9 -4
  75. package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +1 -1
  76. package/src/duckdb/src/storage/single_file_block_manager.cpp +0 -4
  77. package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +5735 -5773
@@ -19,10 +19,10 @@ namespace duckdb {
19
19
 
20
20
  template <class T>
21
21
  struct NumericLimits {
22
- DUCKDB_API static constexpr T Minimum() {
22
+ static constexpr T Minimum() {
23
23
  return std::numeric_limits<T>::lowest();
24
24
  };
25
- DUCKDB_API static constexpr T Maximum() {
25
+ static constexpr T Maximum() {
26
26
  return std::numeric_limits<T>::max();
27
27
  };
28
28
  DUCKDB_API static bool IsSigned();
@@ -31,169 +31,169 @@ struct NumericLimits {
31
31
 
32
32
  template <>
33
33
  struct NumericLimits<int8_t> {
34
- DUCKDB_API static constexpr int8_t Minimum() {
34
+ static constexpr int8_t Minimum() {
35
35
  return std::numeric_limits<int8_t>::lowest();
36
36
  };
37
- DUCKDB_API static constexpr int8_t Maximum() {
37
+ static constexpr int8_t Maximum() {
38
38
  return std::numeric_limits<int8_t>::max();
39
39
  };
40
- DUCKDB_API static bool IsSigned() {
40
+ static bool IsSigned() {
41
41
  return true;
42
42
  }
43
- DUCKDB_API static idx_t Digits() {
43
+ static idx_t Digits() {
44
44
  return 3;
45
45
  }
46
46
  };
47
47
  template <>
48
48
  struct NumericLimits<int16_t> {
49
- DUCKDB_API static constexpr int16_t Minimum() {
49
+ static constexpr int16_t Minimum() {
50
50
  return std::numeric_limits<int16_t>::lowest();
51
51
  };
52
- DUCKDB_API static constexpr int16_t Maximum() {
52
+ static constexpr int16_t Maximum() {
53
53
  return std::numeric_limits<int16_t>::max();
54
54
  };
55
- DUCKDB_API static bool IsSigned() {
55
+ static bool IsSigned() {
56
56
  return true;
57
57
  }
58
- DUCKDB_API static idx_t Digits() {
58
+ static idx_t Digits() {
59
59
  return 5;
60
60
  }
61
61
  };
62
62
  template <>
63
63
  struct NumericLimits<int32_t> {
64
- DUCKDB_API static constexpr int32_t Minimum() {
64
+ static constexpr int32_t Minimum() {
65
65
  return std::numeric_limits<int32_t>::lowest();
66
66
  };
67
- DUCKDB_API static constexpr int32_t Maximum() {
67
+ static constexpr int32_t Maximum() {
68
68
  return std::numeric_limits<int32_t>::max();
69
69
  };
70
- DUCKDB_API static bool IsSigned() {
70
+ static bool IsSigned() {
71
71
  return true;
72
72
  }
73
- DUCKDB_API static idx_t Digits() {
73
+ static idx_t Digits() {
74
74
  return 10;
75
75
  }
76
76
  };
77
77
 
78
78
  template <>
79
79
  struct NumericLimits<int64_t> {
80
- DUCKDB_API static constexpr int64_t Minimum() {
80
+ static constexpr int64_t Minimum() {
81
81
  return std::numeric_limits<int64_t>::lowest();
82
82
  };
83
- DUCKDB_API static constexpr int64_t Maximum() {
83
+ static constexpr int64_t Maximum() {
84
84
  return std::numeric_limits<int64_t>::max();
85
85
  };
86
- DUCKDB_API static bool IsSigned() {
86
+ static bool IsSigned() {
87
87
  return true;
88
88
  }
89
- DUCKDB_API static idx_t Digits() {
89
+ static idx_t Digits() {
90
90
  return 19;
91
91
  }
92
92
  };
93
93
  template <>
94
94
  struct NumericLimits<hugeint_t> {
95
- DUCKDB_API static constexpr hugeint_t Minimum() {
95
+ static constexpr hugeint_t Minimum() {
96
96
  return {std::numeric_limits<int64_t>::lowest(), 1};
97
97
  };
98
- DUCKDB_API static constexpr hugeint_t Maximum() {
98
+ static constexpr hugeint_t Maximum() {
99
99
  return {std::numeric_limits<int64_t>::max(), std::numeric_limits<uint64_t>::max()};
100
100
  };
101
- DUCKDB_API static bool IsSigned() {
101
+ static bool IsSigned() {
102
102
  return true;
103
103
  }
104
- DUCKDB_API static idx_t Digits() {
104
+ static idx_t Digits() {
105
105
  return 39;
106
106
  }
107
107
  };
108
108
 
109
109
  template <>
110
110
  struct NumericLimits<uint8_t> {
111
- DUCKDB_API static constexpr uint8_t Minimum() {
111
+ static constexpr uint8_t Minimum() {
112
112
  return std::numeric_limits<uint8_t>::lowest();
113
113
  };
114
- DUCKDB_API static constexpr uint8_t Maximum() {
114
+ static constexpr uint8_t Maximum() {
115
115
  return std::numeric_limits<uint8_t>::max();
116
116
  };
117
- DUCKDB_API static bool IsSigned() {
117
+ static bool IsSigned() {
118
118
  return false;
119
119
  }
120
- DUCKDB_API static idx_t Digits() {
120
+ static idx_t Digits() {
121
121
  return 3;
122
122
  }
123
123
  };
124
124
 
125
125
  template <>
126
126
  struct NumericLimits<uint16_t> {
127
- DUCKDB_API static constexpr uint16_t Minimum() {
127
+ static constexpr uint16_t Minimum() {
128
128
  return std::numeric_limits<uint16_t>::lowest();
129
129
  };
130
- DUCKDB_API static constexpr uint16_t Maximum() {
130
+ static constexpr uint16_t Maximum() {
131
131
  return std::numeric_limits<uint16_t>::max();
132
132
  };
133
- DUCKDB_API static bool IsSigned() {
133
+ static bool IsSigned() {
134
134
  return false;
135
135
  }
136
- DUCKDB_API static idx_t Digits() {
136
+ static idx_t Digits() {
137
137
  return 5;
138
138
  }
139
139
  };
140
140
  template <>
141
141
  struct NumericLimits<uint32_t> {
142
- DUCKDB_API static constexpr uint32_t Minimum() {
142
+ static constexpr uint32_t Minimum() {
143
143
  return std::numeric_limits<uint32_t>::lowest();
144
144
  };
145
- DUCKDB_API static constexpr uint32_t Maximum() {
145
+ static constexpr uint32_t Maximum() {
146
146
  return std::numeric_limits<uint32_t>::max();
147
147
  };
148
- DUCKDB_API static bool IsSigned() {
148
+ static bool IsSigned() {
149
149
  return false;
150
150
  }
151
- DUCKDB_API static idx_t Digits() {
151
+ static idx_t Digits() {
152
152
  return 10;
153
153
  }
154
154
  };
155
155
  template <>
156
156
  struct NumericLimits<uint64_t> {
157
- DUCKDB_API static constexpr uint64_t Minimum() {
157
+ static constexpr uint64_t Minimum() {
158
158
  return std::numeric_limits<uint64_t>::lowest();
159
159
  };
160
- DUCKDB_API static constexpr uint64_t Maximum() {
160
+ static constexpr uint64_t Maximum() {
161
161
  return std::numeric_limits<uint64_t>::max();
162
162
  };
163
- DUCKDB_API static bool IsSigned() {
163
+ static bool IsSigned() {
164
164
  return false;
165
165
  }
166
- DUCKDB_API static idx_t Digits() {
166
+ static idx_t Digits() {
167
167
  return 20;
168
168
  }
169
169
  };
170
170
  template <>
171
171
  struct NumericLimits<float> {
172
- DUCKDB_API static constexpr float Minimum() {
172
+ static constexpr float Minimum() {
173
173
  return std::numeric_limits<float>::lowest();
174
174
  };
175
- DUCKDB_API static constexpr float Maximum() {
175
+ static constexpr float Maximum() {
176
176
  return std::numeric_limits<float>::max();
177
177
  };
178
- DUCKDB_API static bool IsSigned() {
178
+ static bool IsSigned() {
179
179
  return true;
180
180
  }
181
- DUCKDB_API static idx_t Digits() {
181
+ static idx_t Digits() {
182
182
  return 127;
183
183
  }
184
184
  };
185
185
  template <>
186
186
  struct NumericLimits<double> {
187
- DUCKDB_API static constexpr double Minimum() {
187
+ static constexpr double Minimum() {
188
188
  return std::numeric_limits<double>::lowest();
189
189
  };
190
- DUCKDB_API static constexpr double Maximum() {
190
+ static constexpr double Maximum() {
191
191
  return std::numeric_limits<double>::max();
192
192
  };
193
- DUCKDB_API static bool IsSigned() {
193
+ static bool IsSigned() {
194
194
  return true;
195
195
  }
196
- DUCKDB_API static idx_t Digits() {
196
+ static idx_t Digits() {
197
197
  return 250;
198
198
  }
199
199
  };
@@ -22,21 +22,21 @@ class Vector;
22
22
 
23
23
  struct TryCast {
24
24
  template <class SRC, class DST>
25
- DUCKDB_API static inline bool Operation(SRC input, DST &result, bool strict = false) {
25
+ static inline bool Operation(SRC input, DST &result, bool strict = false) {
26
26
  throw NotImplementedException("Unimplemented type for cast (%s -> %s)", GetTypeId<SRC>(), GetTypeId<DST>());
27
27
  }
28
28
  };
29
29
 
30
30
  struct TryCastErrorMessage {
31
31
  template <class SRC, class DST>
32
- DUCKDB_API static inline bool Operation(SRC input, DST &result, string *error_message, bool strict = false) {
32
+ static inline bool Operation(SRC input, DST &result, string *error_message, bool strict = false) {
33
33
  throw NotImplementedException("Unimplemented type for cast (%s -> %s)", GetTypeId<SRC>(), GetTypeId<DST>());
34
34
  }
35
35
  };
36
36
 
37
37
  struct TryCastErrorMessageCommaSeparated {
38
38
  template <class SRC, class DST>
39
- DUCKDB_API static inline bool Operation(SRC input, DST &result, string *error_message, bool strict = false) {
39
+ static inline bool Operation(SRC input, DST &result, string *error_message, bool strict = false) {
40
40
  throw NotImplementedException("Unimplemented type for cast (%s -> %s)", GetTypeId<SRC>(), GetTypeId<DST>());
41
41
  }
42
42
  };
@@ -520,21 +520,21 @@ DUCKDB_API bool TryCastErrorMessage::Operation(string_t input, interval_t &resul
520
520
  //===--------------------------------------------------------------------===//
521
521
  struct TryCastToTimestampNS {
522
522
  template <class SRC, class DST>
523
- DUCKDB_API static inline bool Operation(SRC input, DST &result, bool strict = false) {
523
+ static inline bool Operation(SRC input, DST &result, bool strict = false) {
524
524
  throw InternalException("Unsupported type for try cast to timestamp (ns)");
525
525
  }
526
526
  };
527
527
 
528
528
  struct TryCastToTimestampMS {
529
529
  template <class SRC, class DST>
530
- DUCKDB_API static inline bool Operation(SRC input, DST &result, bool strict = false) {
530
+ static inline bool Operation(SRC input, DST &result, bool strict = false) {
531
531
  throw InternalException("Unsupported type for try cast to timestamp (ms)");
532
532
  }
533
533
  };
534
534
 
535
535
  struct TryCastToTimestampSec {
536
536
  template <class SRC, class DST>
537
- DUCKDB_API static inline bool Operation(SRC input, DST &result, bool strict = false) {
537
+ static inline bool Operation(SRC input, DST &result, bool strict = false) {
538
538
  throw InternalException("Unsupported type for try cast to timestamp (s)");
539
539
  }
540
540
  };
@@ -702,8 +702,8 @@ duckdb::string_t CastFromUUID::Operation(duckdb::hugeint_t input, Vector &vector
702
702
 
703
703
  struct TryCastToUUID {
704
704
  template <class SRC, class DST>
705
- DUCKDB_API static inline bool Operation(SRC input, DST &result, Vector &result_vector, string *error_message,
706
- bool strict = false) {
705
+ static inline bool Operation(SRC input, DST &result, Vector &result_vector, string *error_message,
706
+ bool strict = false) {
707
707
  throw InternalException("Unsupported type for try cast to uuid");
708
708
  }
709
709
  };
@@ -23,41 +23,41 @@ namespace duckdb {
23
23
  //===--------------------------------------------------------------------===//
24
24
  struct Equals {
25
25
  template <class T>
26
- DUCKDB_API static inline bool Operation(const T &left, const T &right) {
26
+ static inline bool Operation(const T &left, const T &right) {
27
27
  return left == right;
28
28
  }
29
29
  };
30
30
  struct NotEquals {
31
31
  template <class T>
32
- DUCKDB_API static inline bool Operation(const T &left, const T &right) {
32
+ static inline bool Operation(const T &left, const T &right) {
33
33
  return !Equals::Operation(left, right);
34
34
  }
35
35
  };
36
36
 
37
37
  struct GreaterThan {
38
38
  template <class T>
39
- DUCKDB_API static inline bool Operation(const T &left, const T &right) {
39
+ static inline bool Operation(const T &left, const T &right) {
40
40
  return left > right;
41
41
  }
42
42
  };
43
43
 
44
44
  struct GreaterThanEquals {
45
45
  template <class T>
46
- DUCKDB_API static inline bool Operation(const T &left, const T &right) {
46
+ static inline bool Operation(const T &left, const T &right) {
47
47
  return !GreaterThan::Operation(right, left);
48
48
  }
49
49
  };
50
50
 
51
51
  struct LessThan {
52
52
  template <class T>
53
- DUCKDB_API static inline bool Operation(const T &left, const T &right) {
53
+ static inline bool Operation(const T &left, const T &right) {
54
54
  return GreaterThan::Operation(right, left);
55
55
  }
56
56
  };
57
57
 
58
58
  struct LessThanEquals {
59
59
  template <class T>
60
- DUCKDB_API static inline bool Operation(const T &left, const T &right) {
60
+ static inline bool Operation(const T &left, const T &right) {
61
61
  return !GreaterThan::Operation(left, right);
62
62
  }
63
63
  };
@@ -17,7 +17,7 @@ namespace duckdb {
17
17
 
18
18
  struct ConvertToString {
19
19
  template <class SRC>
20
- DUCKDB_API static inline string Operation(SRC input) {
20
+ static inline string Operation(SRC input) {
21
21
  throw InternalException("Unrecognized type for ConvertToString %s", GetTypeId<SRC>());
22
22
  }
23
23
  };
@@ -17,16 +17,14 @@ namespace duckdb {
17
17
  //===--------------------------------------------------------------------===//
18
18
  struct TryCastToDecimal {
19
19
  template <class SRC, class DST>
20
- DUCKDB_API static inline bool Operation(SRC input, DST &result, string *error_message, uint8_t width,
21
- uint8_t scale) {
20
+ static inline bool Operation(SRC input, DST &result, string *error_message, uint8_t width, uint8_t scale) {
22
21
  throw NotImplementedException("Unimplemented type for TryCastToDecimal!");
23
22
  }
24
23
  };
25
24
 
26
25
  struct TryCastToDecimalCommaSeparated {
27
26
  template <class SRC, class DST>
28
- DUCKDB_API static inline bool Operation(SRC input, DST &result, string *error_message, uint8_t width,
29
- uint8_t scale) {
27
+ static inline bool Operation(SRC input, DST &result, string *error_message, uint8_t width, uint8_t scale) {
30
28
  throw NotImplementedException("Unimplemented type for TryCastToDecimal!");
31
29
  }
32
30
  };
@@ -20,7 +20,7 @@ class Vector;
20
20
 
21
21
  struct StringCast {
22
22
  template <class SRC>
23
- DUCKDB_API static inline string_t Operation(SRC input, Vector &result) {
23
+ static inline string_t Operation(SRC input, Vector &result) {
24
24
  throw NotImplementedException("Unimplemented type for string cast!");
25
25
  }
26
26
  };
@@ -72,7 +72,7 @@ bool TrySubtractOperator::Operation(hugeint_t left, hugeint_t right, hugeint_t &
72
72
 
73
73
  struct SubtractOperatorOverflowCheck {
74
74
  template <class TA, class TB, class TR>
75
- DUCKDB_API static inline TR Operation(TA left, TB right) {
75
+ static inline TR Operation(TA left, TB right) {
76
76
  TR result;
77
77
  if (!TrySubtractOperator::Operation(left, right, result)) {
78
78
  throw OutOfRangeException("Overflow in subtraction of %s (%d - %d)!", TypeIdToString(GetTypeId<TA>()), left,
@@ -39,7 +39,7 @@ public:
39
39
  //! Let's us do things like 'if (error)'
40
40
  DUCKDB_API operator bool() const;
41
41
  DUCKDB_API bool operator==(const PreservedError &other) const;
42
- DUCKDB_API const shared_ptr<Exception> &GetError() {
42
+ const shared_ptr<Exception> &GetError() {
43
43
  return exception_instance;
44
44
  }
45
45
 
@@ -15,7 +15,7 @@ enum class RegexOptions : uint8_t { NONE, CASE_INSENSITIVE };
15
15
  class Regex {
16
16
  public:
17
17
  DUCKDB_API Regex(const std::string &pattern, RegexOptions options = RegexOptions::NONE);
18
- DUCKDB_API Regex(const char *pattern, RegexOptions options = RegexOptions::NONE) : Regex(std::string(pattern)) {
18
+ Regex(const char *pattern, RegexOptions options = RegexOptions::NONE) : Regex(std::string(pattern)) {
19
19
  }
20
20
  const duckdb_re2::RE2 &GetRegex() const {
21
21
  return *regex;
@@ -45,25 +45,25 @@ public:
45
45
  throw InvalidInputException("Invalid input for binary digit: %s", string(c, 1));
46
46
  }
47
47
 
48
- DUCKDB_API static bool CharacterIsSpace(char c) {
48
+ static bool CharacterIsSpace(char c) {
49
49
  return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r';
50
50
  }
51
- DUCKDB_API static bool CharacterIsNewline(char c) {
51
+ static bool CharacterIsNewline(char c) {
52
52
  return c == '\n' || c == '\r';
53
53
  }
54
- DUCKDB_API static bool CharacterIsDigit(char c) {
54
+ static bool CharacterIsDigit(char c) {
55
55
  return c >= '0' && c <= '9';
56
56
  }
57
- DUCKDB_API static bool CharacterIsHex(char c) {
57
+ static bool CharacterIsHex(char c) {
58
58
  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
59
59
  }
60
- DUCKDB_API static char CharacterToLower(char c) {
60
+ static char CharacterToLower(char c) {
61
61
  if (c >= 'A' && c <= 'Z') {
62
62
  return c - ('A' - 'a');
63
63
  }
64
64
  return c;
65
65
  }
66
- DUCKDB_API static char CharacterIsAlpha(char c) {
66
+ static char CharacterIsAlpha(char c) {
67
67
  return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
68
68
  }
69
69
  static bool CharacterIsOperator(char c) {
@@ -200,7 +200,7 @@ public:
200
200
 
201
201
  //! Returns true if two null-terminated strings are equal or point to the same address.
202
202
  //! Returns false if only one of the strings is nullptr
203
- DUCKDB_API static bool Equals(const char *s1, const char *s2) {
203
+ static bool Equals(const char *s1, const char *s2) {
204
204
  if (s1 == s2) {
205
205
  return true;
206
206
  }
@@ -30,7 +30,7 @@ public:
30
30
  explicit ChunkCollection(ClientContext &context);
31
31
 
32
32
  //! The types of columns in the ChunkCollection
33
- DUCKDB_API vector<LogicalType> &Types() {
33
+ vector<LogicalType> &Types() {
34
34
  return types;
35
35
  }
36
36
  const vector<LogicalType> &Types() const {
@@ -38,12 +38,12 @@ public:
38
38
  }
39
39
 
40
40
  //! The amount of rows in the ChunkCollection
41
- DUCKDB_API const idx_t &Count() const {
41
+ const idx_t &Count() const {
42
42
  return count;
43
43
  }
44
44
 
45
45
  //! The amount of columns in the ChunkCollection
46
- DUCKDB_API idx_t ColumnCount() const {
46
+ idx_t ColumnCount() const {
47
47
  return types.size();
48
48
  }
49
49
 
@@ -76,12 +76,12 @@ public:
76
76
  DUCKDB_API void Print() const;
77
77
 
78
78
  //! Gets a reference to the chunk at the given index
79
- DUCKDB_API DataChunk &GetChunkForRow(idx_t row_index) {
79
+ DataChunk &GetChunkForRow(idx_t row_index) {
80
80
  return *chunks[LocateChunk(row_index)];
81
81
  }
82
82
 
83
83
  //! Gets a reference to the chunk at the given index
84
- DUCKDB_API DataChunk &GetChunk(idx_t chunk_index) {
84
+ DataChunk &GetChunk(idx_t chunk_index) {
85
85
  D_ASSERT(chunk_index < chunks.size());
86
86
  return *chunks[chunk_index];
87
87
  }
@@ -90,21 +90,21 @@ public:
90
90
  return *chunks[chunk_index];
91
91
  }
92
92
 
93
- DUCKDB_API const vector<unique_ptr<DataChunk>> &Chunks() {
93
+ const vector<unique_ptr<DataChunk>> &Chunks() {
94
94
  return chunks;
95
95
  }
96
96
 
97
- DUCKDB_API idx_t ChunkCount() const {
97
+ idx_t ChunkCount() const {
98
98
  return chunks.size();
99
99
  }
100
100
 
101
- DUCKDB_API void Reset() {
101
+ void Reset() {
102
102
  count = 0;
103
103
  chunks.clear();
104
104
  types.clear();
105
105
  }
106
106
 
107
- DUCKDB_API unique_ptr<DataChunk> Fetch() {
107
+ unique_ptr<DataChunk> Fetch() {
108
108
  if (ChunkCount() == 0) {
109
109
  return nullptr;
110
110
  }
@@ -115,7 +115,7 @@ public:
115
115
  }
116
116
 
117
117
  //! Locates the chunk that belongs to the specific index
118
- DUCKDB_API idx_t LocateChunk(idx_t index) {
118
+ idx_t LocateChunk(idx_t index) {
119
119
  idx_t result = index / STANDARD_VECTOR_SIZE;
120
120
  D_ASSERT(result < chunks.size());
121
121
  return result;
@@ -44,20 +44,20 @@ public:
44
44
 
45
45
  public:
46
46
  //! The types of columns in the ColumnDataCollection
47
- DUCKDB_API vector<LogicalType> &Types() {
47
+ vector<LogicalType> &Types() {
48
48
  return types;
49
49
  }
50
- DUCKDB_API const vector<LogicalType> &Types() const {
50
+ const vector<LogicalType> &Types() const {
51
51
  return types;
52
52
  }
53
53
 
54
54
  //! The amount of rows in the ColumnDataCollection
55
- DUCKDB_API const idx_t &Count() const {
55
+ const idx_t &Count() const {
56
56
  return count;
57
57
  }
58
58
 
59
59
  //! The amount of columns in the ColumnDataCollection
60
- DUCKDB_API idx_t ColumnCount() const {
60
+ idx_t ColumnCount() const {
61
61
  return types.size();
62
62
  }
63
63
 
@@ -177,32 +177,32 @@ public:
177
177
 
178
178
  public:
179
179
  // container API
180
- DUCKDB_API bool empty() const {
180
+ bool empty() const {
181
181
  return rows.empty();
182
182
  }
183
- DUCKDB_API idx_t size() const {
183
+ idx_t size() const {
184
184
  return rows.size();
185
185
  }
186
186
 
187
187
  DUCKDB_API ColumnDataRow &operator[](idx_t i);
188
188
  DUCKDB_API const ColumnDataRow &operator[](idx_t i) const;
189
189
 
190
- DUCKDB_API vector<ColumnDataRow>::iterator begin() {
190
+ vector<ColumnDataRow>::iterator begin() {
191
191
  return rows.begin();
192
192
  }
193
- DUCKDB_API vector<ColumnDataRow>::iterator end() {
193
+ vector<ColumnDataRow>::iterator end() {
194
194
  return rows.end();
195
195
  }
196
- DUCKDB_API vector<ColumnDataRow>::const_iterator cbegin() const {
196
+ vector<ColumnDataRow>::const_iterator cbegin() const {
197
197
  return rows.cbegin();
198
198
  }
199
- DUCKDB_API vector<ColumnDataRow>::const_iterator cend() const {
199
+ vector<ColumnDataRow>::const_iterator cend() const {
200
200
  return rows.cend();
201
201
  }
202
- DUCKDB_API vector<ColumnDataRow>::const_iterator begin() const {
202
+ vector<ColumnDataRow>::const_iterator begin() const {
203
203
  return rows.begin();
204
204
  }
205
- DUCKDB_API vector<ColumnDataRow>::const_iterator end() const {
205
+ vector<ColumnDataRow>::const_iterator end() const {
206
206
  return rows.end();
207
207
  }
208
208
 
@@ -43,10 +43,10 @@ private:
43
43
  };
44
44
 
45
45
  public:
46
- DUCKDB_API ColumnDataChunkIterator begin() {
46
+ ColumnDataChunkIterator begin() {
47
47
  return ColumnDataChunkIterator(&collection, column_ids);
48
48
  }
49
- DUCKDB_API ColumnDataChunkIterator end() {
49
+ ColumnDataChunkIterator end() {
50
50
  return ColumnDataChunkIterator(nullptr, vector<column_t>());
51
51
  }
52
52
  };
@@ -165,7 +165,7 @@ public:
165
165
 
166
166
  //! Create a blob Value from a data pointer and a length: no bytes are interpreted
167
167
  DUCKDB_API static Value BLOB(const_data_ptr_t data, idx_t len);
168
- DUCKDB_API static Value BLOB_RAW(const string &data) { // NOLINT
168
+ static Value BLOB_RAW(const string &data) { // NOLINT
169
169
  return Value::BLOB((const_data_ptr_t)data.c_str(), data.size());
170
170
  }
171
171
  //! Creates a blob by casting a specified string to a blob (i.e. interpreting \x characters)
@@ -308,14 +308,14 @@ struct LogicalType {
308
308
  DUCKDB_API static LogicalType FormatDeserialize(FormatDeserializer &deserializer);
309
309
 
310
310
 
311
- DUCKDB_API static bool TypeIsTimestamp(LogicalTypeId id) {
311
+ static bool TypeIsTimestamp(LogicalTypeId id) {
312
312
  return (id == LogicalTypeId::TIMESTAMP ||
313
313
  id == LogicalTypeId::TIMESTAMP_MS ||
314
314
  id == LogicalTypeId::TIMESTAMP_NS ||
315
315
  id == LogicalTypeId::TIMESTAMP_SEC ||
316
316
  id == LogicalTypeId::TIMESTAMP_TZ);
317
317
  }
318
- DUCKDB_API static bool TypeIsTimestamp(const LogicalType& type) {
318
+ static bool TypeIsTimestamp(const LogicalType& type) {
319
319
  return TypeIsTimestamp(type.id());
320
320
  }
321
321
  DUCKDB_API string ToString() const;
@@ -9,7 +9,7 @@
9
9
  #pragma once
10
10
 
11
11
  #ifndef DUCKDB_API
12
- #ifdef _WIN32
12
+ #if defined(_WIN32) && !defined(__MINGW32__)
13
13
  #if defined(DUCKDB_BUILD_LIBRARY) && !defined(DUCKDB_BUILD_LOADABLE_EXTENSION)
14
14
  #define DUCKDB_API __declspec(dllexport)
15
15
  #else
@@ -48,7 +48,7 @@ struct ExecuteFunctionState : public ExpressionState {
48
48
  unique_ptr<FunctionLocalState> local_state;
49
49
 
50
50
  public:
51
- DUCKDB_API static FunctionLocalState *GetFunctionState(ExpressionState &state) {
51
+ static FunctionLocalState *GetFunctionState(ExpressionState &state) {
52
52
  return ((ExecuteFunctionState &)state).local_state.get();
53
53
  }
54
54
  };