@avidian/duckdb-bun 0.0.0-stage → 1.0.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 (231) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +284 -2
  3. package/package.json +95 -4
  4. package/src/bindings/api/appender.ts +288 -0
  5. package/src/bindings/api/data-chunk.ts +58 -0
  6. package/src/bindings/api/database.ts +232 -0
  7. package/src/bindings/api/datetime.ts +158 -0
  8. package/src/bindings/api/index.ts +13 -0
  9. package/src/bindings/api/logical-types.ts +227 -0
  10. package/src/bindings/api/query.ts +616 -0
  11. package/src/bindings/api/scalar-function.ts +274 -0
  12. package/src/bindings/api/table-function.ts +339 -0
  13. package/src/bindings/api/values.ts +546 -0
  14. package/src/bindings/api/vector.ts +266 -0
  15. package/src/bindings/generated/capi.ts +695 -0
  16. package/src/bindings/generated/contract.ts +162 -0
  17. package/src/bindings/index.ts +10 -0
  18. package/src/bindings/runtime/convert.ts +307 -0
  19. package/src/bindings/runtime/diagnostics.ts +45 -0
  20. package/src/bindings/runtime/dispatch.ts +200 -0
  21. package/src/bindings/runtime/exception.ts +103 -0
  22. package/src/bindings/runtime/flags.ts +19 -0
  23. package/src/bindings/runtime/handle.ts +217 -0
  24. package/src/bindings/runtime/kinds.ts +53 -0
  25. package/src/bindings/runtime/marshal.ts +190 -0
  26. package/src/bindings/runtime/native.ts +150 -0
  27. package/src/bindings/runtime/ring.ts +54 -0
  28. package/src/bindings/runtime/scope.ts +133 -0
  29. package/src/bindings/runtime/trace.ts +65 -0
  30. package/src/connection.ts +35 -0
  31. package/src/database.ts +27 -0
  32. package/src/errors.ts +30 -0
  33. package/src/file-assets.d.ts +10 -0
  34. package/src/index.ts +17 -0
  35. package/src/library.ts +83 -0
  36. package/src/neo.ts +16 -0
  37. package/src/reader.ts +47 -0
  38. package/src/statement.ts +61 -0
  39. package/src/types.ts +52 -0
  40. package/src/version.ts +6 -0
  41. package/vendor/node-api/LICENSE +7 -0
  42. package/vendor/node-api/PROVENANCE.md +54 -0
  43. package/vendor/node-api/node-bindings.d.ts +1669 -0
  44. package/vendor/node-api/src/DuckDBAppender.ts +237 -0
  45. package/vendor/node-api/src/DuckDBClientContext.ts +13 -0
  46. package/vendor/node-api/src/DuckDBConnection.ts +315 -0
  47. package/vendor/node-api/src/DuckDBDataChunk.ts +412 -0
  48. package/vendor/node-api/src/DuckDBDataChunkWriter.ts +144 -0
  49. package/vendor/node-api/src/DuckDBExtractedStatements.ts +37 -0
  50. package/vendor/node-api/src/DuckDBInstance.ts +35 -0
  51. package/vendor/node-api/src/DuckDBInstanceCache.ts +29 -0
  52. package/vendor/node-api/src/DuckDBLogicalType.ts +446 -0
  53. package/vendor/node-api/src/DuckDBMaterializedResult.ts +39 -0
  54. package/vendor/node-api/src/DuckDBPendingResult.ts +83 -0
  55. package/vendor/node-api/src/DuckDBPreparedStatement.ts +376 -0
  56. package/vendor/node-api/src/DuckDBPreparedStatementCollection.ts +5 -0
  57. package/vendor/node-api/src/DuckDBPreparedStatementWeakRefCollection.ts +31 -0
  58. package/vendor/node-api/src/DuckDBResult.ts +403 -0
  59. package/vendor/node-api/src/DuckDBResultReader.ts +283 -0
  60. package/vendor/node-api/src/DuckDBScalarFunction.ts +149 -0
  61. package/vendor/node-api/src/DuckDBScalarFunctionBindInfo.ts +34 -0
  62. package/vendor/node-api/src/DuckDBScalarFunctionInfo.ts +34 -0
  63. package/vendor/node-api/src/DuckDBScalarFunctionInitInfo.ts +35 -0
  64. package/vendor/node-api/src/DuckDBTableFunction.ts +149 -0
  65. package/vendor/node-api/src/DuckDBTableFunctionBindInfo.ts +56 -0
  66. package/vendor/node-api/src/DuckDBTableFunctionInfo.ts +36 -0
  67. package/vendor/node-api/src/DuckDBTableFunctionInitInfo.ts +52 -0
  68. package/vendor/node-api/src/DuckDBType.ts +1 -0
  69. package/vendor/node-api/src/DuckDBTypeId.ts +46 -0
  70. package/vendor/node-api/src/DuckDBValueConverter.ts +23 -0
  71. package/vendor/node-api/src/DuckDBValueConverters.ts +461 -0
  72. package/vendor/node-api/src/DuckDBVector.ts +1 -0
  73. package/vendor/node-api/src/JS.ts +11 -0
  74. package/vendor/node-api/src/JSDuckDBValueConverter.ts +85 -0
  75. package/vendor/node-api/src/JSInputTypeForTypeId.ts +101 -0
  76. package/vendor/node-api/src/JSToDuckDBValueConverter.ts +136 -0
  77. package/vendor/node-api/src/JSTypeForTypeId.ts +78 -0
  78. package/vendor/node-api/src/Json.ts +7 -0
  79. package/vendor/node-api/src/JsonDuckDBValueConverter.ts +72 -0
  80. package/vendor/node-api/src/JsonTypeForTypeId.ts +86 -0
  81. package/vendor/node-api/src/ToDuckDBValueConverter.ts +68 -0
  82. package/vendor/node-api/src/ToDuckDBValueConverters.ts +303 -0
  83. package/vendor/node-api/src/configurationOptionDescriptions.ts +13 -0
  84. package/vendor/node-api/src/conversion/bytesFromString.ts +5 -0
  85. package/vendor/node-api/src/conversion/dateTimeStringConversion.ts +343 -0
  86. package/vendor/node-api/src/conversion/displayStringForDuckDBValue.ts +12 -0
  87. package/vendor/node-api/src/conversion/stringFromBlob.ts +48 -0
  88. package/vendor/node-api/src/conversion/stringFromDecimal.ts +129 -0
  89. package/vendor/node-api/src/conversion/varintDecode.ts +42 -0
  90. package/vendor/node-api/src/convertColumnsFromChunks.ts +28 -0
  91. package/vendor/node-api/src/convertColumnsObjectFromChunks.ts +29 -0
  92. package/vendor/node-api/src/convertRowObjectsFromChunks.ts +21 -0
  93. package/vendor/node-api/src/convertRowsFromChunks.ts +16 -0
  94. package/vendor/node-api/src/createConfig.ts +14 -0
  95. package/vendor/node-api/src/createDuckDBValueConverter.ts +17 -0
  96. package/vendor/node-api/src/createResult.ts +15 -0
  97. package/vendor/node-api/src/createValue.ts +355 -0
  98. package/vendor/node-api/src/duckdb.ts +51 -0
  99. package/vendor/node-api/src/enums.ts +7 -0
  100. package/vendor/node-api/src/getColumnsFromChunks.ts +13 -0
  101. package/vendor/node-api/src/getColumnsObjectFromChunks.ts +16 -0
  102. package/vendor/node-api/src/getRowObjectsFromChunks.ts +13 -0
  103. package/vendor/node-api/src/getRowsFromChunks.ts +12 -0
  104. package/vendor/node-api/src/index.ts +3 -0
  105. package/vendor/node-api/src/readValue.ts +31 -0
  106. package/vendor/node-api/src/sleep.ts +5 -0
  107. package/vendor/node-api/src/sql.ts +7 -0
  108. package/vendor/node-api/src/tsconfig.json +7 -0
  109. package/vendor/node-api/src/typeForValue.ts +144 -0
  110. package/vendor/node-api/src/types/BaseDuckDBType.ts +31 -0
  111. package/vendor/node-api/src/types/DuckDBAnyType.ts +13 -0
  112. package/vendor/node-api/src/types/DuckDBArrayType.ts +43 -0
  113. package/vendor/node-api/src/types/DuckDBBigIntType.ts +21 -0
  114. package/vendor/node-api/src/types/DuckDBBigNumType.ts +21 -0
  115. package/vendor/node-api/src/types/DuckDBBitType.ts +13 -0
  116. package/vendor/node-api/src/types/DuckDBBlobType.ts +13 -0
  117. package/vendor/node-api/src/types/DuckDBBooleanType.ts +13 -0
  118. package/vendor/node-api/src/types/DuckDBDateType.ts +29 -0
  119. package/vendor/node-api/src/types/DuckDBDecimalType.ts +46 -0
  120. package/vendor/node-api/src/types/DuckDBDoubleType.ts +21 -0
  121. package/vendor/node-api/src/types/DuckDBEnumType.ts +111 -0
  122. package/vendor/node-api/src/types/DuckDBFloatType.ts +21 -0
  123. package/vendor/node-api/src/types/DuckDBGeometryType.ts +36 -0
  124. package/vendor/node-api/src/types/DuckDBHugeIntType.ts +21 -0
  125. package/vendor/node-api/src/types/DuckDBIntegerLiteralType.ts +13 -0
  126. package/vendor/node-api/src/types/DuckDBIntegerType.ts +21 -0
  127. package/vendor/node-api/src/types/DuckDBIntervalType.ts +13 -0
  128. package/vendor/node-api/src/types/DuckDBListType.ts +35 -0
  129. package/vendor/node-api/src/types/DuckDBMapType.ts +47 -0
  130. package/vendor/node-api/src/types/DuckDBSQLNullType.ts +17 -0
  131. package/vendor/node-api/src/types/DuckDBSmallIntType.ts +21 -0
  132. package/vendor/node-api/src/types/DuckDBStringLiteralType.ts +13 -0
  133. package/vendor/node-api/src/types/DuckDBStructType.ts +104 -0
  134. package/vendor/node-api/src/types/DuckDBTimeNSType.ts +20 -0
  135. package/vendor/node-api/src/types/DuckDBTimeTZType.ts +23 -0
  136. package/vendor/node-api/src/types/DuckDBTimeType.ts +20 -0
  137. package/vendor/node-api/src/types/DuckDBTimestampMillisecondsType.ts +29 -0
  138. package/vendor/node-api/src/types/DuckDBTimestampNanosecondsType.ts +29 -0
  139. package/vendor/node-api/src/types/DuckDBTimestampSecondsType.ts +29 -0
  140. package/vendor/node-api/src/types/DuckDBTimestampTZNanosecondsType.ts +32 -0
  141. package/vendor/node-api/src/types/DuckDBTimestampTZType.ts +32 -0
  142. package/vendor/node-api/src/types/DuckDBTimestampType.ts +32 -0
  143. package/vendor/node-api/src/types/DuckDBTinyIntType.ts +21 -0
  144. package/vendor/node-api/src/types/DuckDBType.ts +86 -0
  145. package/vendor/node-api/src/types/DuckDBUBigIntType.ts +21 -0
  146. package/vendor/node-api/src/types/DuckDBUHugeIntType.ts +21 -0
  147. package/vendor/node-api/src/types/DuckDBUIntegerType.ts +21 -0
  148. package/vendor/node-api/src/types/DuckDBUSmallIntType.ts +21 -0
  149. package/vendor/node-api/src/types/DuckDBUTinyIntType.ts +21 -0
  150. package/vendor/node-api/src/types/DuckDBUUIDType.ts +20 -0
  151. package/vendor/node-api/src/types/DuckDBUnionType.ts +74 -0
  152. package/vendor/node-api/src/types/DuckDBVarCharType.ts +13 -0
  153. package/vendor/node-api/src/types/DuckDBVariantType.ts +13 -0
  154. package/vendor/node-api/src/types/index.ts +44 -0
  155. package/vendor/node-api/src/values/DuckDBArrayValue.ts +18 -0
  156. package/vendor/node-api/src/values/DuckDBBitValue.ts +117 -0
  157. package/vendor/node-api/src/values/DuckDBBlobValue.ts +26 -0
  158. package/vendor/node-api/src/values/DuckDBDateValue.ts +43 -0
  159. package/vendor/node-api/src/values/DuckDBDecimalValue.ts +44 -0
  160. package/vendor/node-api/src/values/DuckDBGeometryValue.ts +30 -0
  161. package/vendor/node-api/src/values/DuckDBIntervalValue.ts +22 -0
  162. package/vendor/node-api/src/values/DuckDBListValue.ts +18 -0
  163. package/vendor/node-api/src/values/DuckDBMapValue.ts +25 -0
  164. package/vendor/node-api/src/values/DuckDBStructValue.ts +22 -0
  165. package/vendor/node-api/src/values/DuckDBTimeNSValue.ts +23 -0
  166. package/vendor/node-api/src/values/DuckDBTimeTZValue.ts +96 -0
  167. package/vendor/node-api/src/values/DuckDBTimeValue.ts +34 -0
  168. package/vendor/node-api/src/values/DuckDBTimestampMillisecondsValue.ts +29 -0
  169. package/vendor/node-api/src/values/DuckDBTimestampNanosecondsValue.ts +28 -0
  170. package/vendor/node-api/src/values/DuckDBTimestampSecondsValue.ts +28 -0
  171. package/vendor/node-api/src/values/DuckDBTimestampTZNanosecondsValue.ts +44 -0
  172. package/vendor/node-api/src/values/DuckDBTimestampTZValue.ts +54 -0
  173. package/vendor/node-api/src/values/DuckDBTimestampValue.ts +45 -0
  174. package/vendor/node-api/src/values/DuckDBTupleValue.ts +22 -0
  175. package/vendor/node-api/src/values/DuckDBUUIDValue.ts +48 -0
  176. package/vendor/node-api/src/values/DuckDBUnionValue.ts +22 -0
  177. package/vendor/node-api/src/values/DuckDBValue.ts +53 -0
  178. package/vendor/node-api/src/values/DuckDBVariantValue.ts +34 -0
  179. package/vendor/node-api/src/values/index.ts +24 -0
  180. package/vendor/node-api/src/vectors/DuckDBArrayVector.ts +107 -0
  181. package/vendor/node-api/src/vectors/DuckDBBigIntVector.ts +75 -0
  182. package/vendor/node-api/src/vectors/DuckDBBigNumVector.ts +98 -0
  183. package/vendor/node-api/src/vectors/DuckDBBitVector.ts +102 -0
  184. package/vendor/node-api/src/vectors/DuckDBBlobVector.ts +112 -0
  185. package/vendor/node-api/src/vectors/DuckDBBooleanVector.ts +84 -0
  186. package/vendor/node-api/src/vectors/DuckDBDateVector.ts +80 -0
  187. package/vendor/node-api/src/vectors/DuckDBDecimal128Vector.ts +107 -0
  188. package/vendor/node-api/src/vectors/DuckDBDecimal16Vector.ts +104 -0
  189. package/vendor/node-api/src/vectors/DuckDBDecimal32Vector.ts +104 -0
  190. package/vendor/node-api/src/vectors/DuckDBDecimal64Vector.ts +104 -0
  191. package/vendor/node-api/src/vectors/DuckDBDoubleVector.ts +68 -0
  192. package/vendor/node-api/src/vectors/DuckDBEnum16Vector.ts +75 -0
  193. package/vendor/node-api/src/vectors/DuckDBEnum32Vector.ts +75 -0
  194. package/vendor/node-api/src/vectors/DuckDBEnum8Vector.ts +75 -0
  195. package/vendor/node-api/src/vectors/DuckDBFloatVector.ts +68 -0
  196. package/vendor/node-api/src/vectors/DuckDBGeometryVector.ts +97 -0
  197. package/vendor/node-api/src/vectors/DuckDBHugeIntVector.ts +89 -0
  198. package/vendor/node-api/src/vectors/DuckDBIntegerVector.ts +75 -0
  199. package/vendor/node-api/src/vectors/DuckDBIntervalVector.ts +100 -0
  200. package/vendor/node-api/src/vectors/DuckDBListVector.ts +221 -0
  201. package/vendor/node-api/src/vectors/DuckDBMapVector.ts +88 -0
  202. package/vendor/node-api/src/vectors/DuckDBSQLNullVector.ts +53 -0
  203. package/vendor/node-api/src/vectors/DuckDBSmallIntVector.ts +75 -0
  204. package/vendor/node-api/src/vectors/DuckDBStructVector.ts +138 -0
  205. package/vendor/node-api/src/vectors/DuckDBTimeNSVector.ts +80 -0
  206. package/vendor/node-api/src/vectors/DuckDBTimeTZVector.ts +80 -0
  207. package/vendor/node-api/src/vectors/DuckDBTimeVector.ts +80 -0
  208. package/vendor/node-api/src/vectors/DuckDBTimestampMillisecondsVector.ts +88 -0
  209. package/vendor/node-api/src/vectors/DuckDBTimestampNanosecondsVector.ts +88 -0
  210. package/vendor/node-api/src/vectors/DuckDBTimestampSecondsVector.ts +88 -0
  211. package/vendor/node-api/src/vectors/DuckDBTimestampTZNanosecondsVector.ts +88 -0
  212. package/vendor/node-api/src/vectors/DuckDBTimestampTZVector.ts +86 -0
  213. package/vendor/node-api/src/vectors/DuckDBTimestampVector.ts +83 -0
  214. package/vendor/node-api/src/vectors/DuckDBTinyIntVector.ts +75 -0
  215. package/vendor/node-api/src/vectors/DuckDBTupleVector.ts +125 -0
  216. package/vendor/node-api/src/vectors/DuckDBUBigIntVector.ts +75 -0
  217. package/vendor/node-api/src/vectors/DuckDBUHugeIntVector.ts +89 -0
  218. package/vendor/node-api/src/vectors/DuckDBUIntegerVector.ts +75 -0
  219. package/vendor/node-api/src/vectors/DuckDBUSmallIntVector.ts +75 -0
  220. package/vendor/node-api/src/vectors/DuckDBUTinyIntVector.ts +75 -0
  221. package/vendor/node-api/src/vectors/DuckDBUUIDVector.ts +89 -0
  222. package/vendor/node-api/src/vectors/DuckDBUnionVector.ts +84 -0
  223. package/vendor/node-api/src/vectors/DuckDBValidity.ts +104 -0
  224. package/vendor/node-api/src/vectors/DuckDBVarCharVector.ts +100 -0
  225. package/vendor/node-api/src/vectors/DuckDBVariantVector.ts +609 -0
  226. package/vendor/node-api/src/vectors/DuckDBVector.ts +33 -0
  227. package/vendor/node-api/src/vectors/createVector.ts +269 -0
  228. package/vendor/node-api/src/vectors/dataAccessors.ts +387 -0
  229. package/vendor/node-api/src/vectors/index.ts +50 -0
  230. package/vendor/node-api/src/vectors/vectorRegistry.ts +24 -0
  231. package/vendor/node-api/src/version.ts +5 -0
@@ -0,0 +1,269 @@
1
+ import duckdb from "../../../../src/bindings/index.ts";
2
+ import { DuckDBLogicalType } from '../DuckDBLogicalType';
3
+ import {
4
+ DuckDBArrayType,
5
+ DuckDBDecimalType,
6
+ DuckDBEnumType,
7
+ DuckDBListType,
8
+ DuckDBMapType,
9
+ DuckDBStructType,
10
+ DuckDBType,
11
+ DuckDBUnionType,
12
+ } from '../DuckDBType';
13
+ import { DuckDBTypeId } from '../DuckDBTypeId';
14
+ import { DuckDBVector } from './DuckDBVector';
15
+ import { DuckDBArrayVector } from './DuckDBArrayVector';
16
+ import { DuckDBBigIntVector } from './DuckDBBigIntVector';
17
+ import { DuckDBBigNumVector } from './DuckDBBigNumVector';
18
+ import { DuckDBBitVector } from './DuckDBBitVector';
19
+ import { DuckDBBlobVector } from './DuckDBBlobVector';
20
+ import { DuckDBBooleanVector } from './DuckDBBooleanVector';
21
+ import { DuckDBDateVector } from './DuckDBDateVector';
22
+ import { DuckDBDecimal128Vector } from './DuckDBDecimal128Vector';
23
+ import { DuckDBDecimal16Vector } from './DuckDBDecimal16Vector';
24
+ import { DuckDBDecimal32Vector } from './DuckDBDecimal32Vector';
25
+ import { DuckDBDecimal64Vector } from './DuckDBDecimal64Vector';
26
+ import { DuckDBDoubleVector } from './DuckDBDoubleVector';
27
+ import { DuckDBEnum16Vector } from './DuckDBEnum16Vector';
28
+ import { DuckDBEnum32Vector } from './DuckDBEnum32Vector';
29
+ import { DuckDBEnum8Vector } from './DuckDBEnum8Vector';
30
+ import { DuckDBFloatVector } from './DuckDBFloatVector';
31
+ import { DuckDBGeometryVector } from './DuckDBGeometryVector';
32
+ import { DuckDBHugeIntVector } from './DuckDBHugeIntVector';
33
+ import { DuckDBIntegerVector } from './DuckDBIntegerVector';
34
+ import { DuckDBIntervalVector } from './DuckDBIntervalVector';
35
+ import { DuckDBListVector } from './DuckDBListVector';
36
+ import { DuckDBMapVector } from './DuckDBMapVector';
37
+ import { DuckDBSmallIntVector } from './DuckDBSmallIntVector';
38
+ import { DuckDBSQLNullVector } from './DuckDBSQLNullVector';
39
+ import { DuckDBStructVector } from './DuckDBStructVector';
40
+ import { DuckDBTupleVector } from './DuckDBTupleVector';
41
+ import { DuckDBTimeNSVector } from './DuckDBTimeNSVector';
42
+ import { DuckDBTimeTZVector } from './DuckDBTimeTZVector';
43
+ import { DuckDBTimeVector } from './DuckDBTimeVector';
44
+ import { DuckDBTimestampMillisecondsVector } from './DuckDBTimestampMillisecondsVector';
45
+ import { DuckDBTimestampNanosecondsVector } from './DuckDBTimestampNanosecondsVector';
46
+ import { DuckDBTimestampSecondsVector } from './DuckDBTimestampSecondsVector';
47
+ import { DuckDBTimestampTZVector } from './DuckDBTimestampTZVector';
48
+ import { DuckDBTimestampTZNanosecondsVector } from './DuckDBTimestampTZNanosecondsVector';
49
+ import { DuckDBTimestampVector } from './DuckDBTimestampVector';
50
+ import { DuckDBTinyIntVector } from './DuckDBTinyIntVector';
51
+ import { DuckDBUBigIntVector } from './DuckDBUBigIntVector';
52
+ import { DuckDBUHugeIntVector } from './DuckDBUHugeIntVector';
53
+ import { DuckDBUIntegerVector } from './DuckDBUIntegerVector';
54
+ import { DuckDBUSmallIntVector } from './DuckDBUSmallIntVector';
55
+ import { DuckDBUTinyIntVector } from './DuckDBUTinyIntVector';
56
+ import { DuckDBUUIDVector } from './DuckDBUUIDVector';
57
+ import { DuckDBUnionVector } from './DuckDBUnionVector';
58
+ import { DuckDBVarCharVector } from './DuckDBVarCharVector';
59
+ import { DuckDBVariantVector } from './DuckDBVariantVector';
60
+ import { vectorRegistry } from './vectorRegistry';
61
+
62
+ function createVector(
63
+ vector: duckdb.Vector,
64
+ itemCount: number,
65
+ knownType?: DuckDBType
66
+ ): DuckDBVector {
67
+ const vectorType = knownType
68
+ ? knownType
69
+ : DuckDBLogicalType.create(
70
+ duckdb.vector_get_column_type(vector)
71
+ ).asType();
72
+ switch (vectorType.typeId) {
73
+ case DuckDBTypeId.BOOLEAN:
74
+ return DuckDBBooleanVector.fromRawVector(vector, itemCount);
75
+ case DuckDBTypeId.TINYINT:
76
+ return DuckDBTinyIntVector.fromRawVector(vector, itemCount);
77
+ case DuckDBTypeId.SMALLINT:
78
+ return DuckDBSmallIntVector.fromRawVector(vector, itemCount);
79
+ case DuckDBTypeId.INTEGER:
80
+ return DuckDBIntegerVector.fromRawVector(vector, itemCount);
81
+ case DuckDBTypeId.BIGINT:
82
+ return DuckDBBigIntVector.fromRawVector(vector, itemCount);
83
+ case DuckDBTypeId.UTINYINT:
84
+ return DuckDBUTinyIntVector.fromRawVector(vector, itemCount);
85
+ case DuckDBTypeId.USMALLINT:
86
+ return DuckDBUSmallIntVector.fromRawVector(vector, itemCount);
87
+ case DuckDBTypeId.UINTEGER:
88
+ return DuckDBUIntegerVector.fromRawVector(vector, itemCount);
89
+ case DuckDBTypeId.UBIGINT:
90
+ return DuckDBUBigIntVector.fromRawVector(vector, itemCount);
91
+ case DuckDBTypeId.FLOAT:
92
+ return DuckDBFloatVector.fromRawVector(vector, itemCount);
93
+ case DuckDBTypeId.DOUBLE:
94
+ return DuckDBDoubleVector.fromRawVector(vector, itemCount);
95
+ case DuckDBTypeId.TIMESTAMP:
96
+ return DuckDBTimestampVector.fromRawVector(vector, itemCount);
97
+ case DuckDBTypeId.DATE:
98
+ return DuckDBDateVector.fromRawVector(vector, itemCount);
99
+ case DuckDBTypeId.TIME:
100
+ return DuckDBTimeVector.fromRawVector(vector, itemCount);
101
+ case DuckDBTypeId.INTERVAL:
102
+ return DuckDBIntervalVector.fromRawVector(vector, itemCount);
103
+ case DuckDBTypeId.HUGEINT:
104
+ return DuckDBHugeIntVector.fromRawVector(vector, itemCount);
105
+ case DuckDBTypeId.UHUGEINT:
106
+ return DuckDBUHugeIntVector.fromRawVector(vector, itemCount);
107
+ case DuckDBTypeId.VARCHAR:
108
+ return DuckDBVarCharVector.fromRawVector(vector, itemCount);
109
+ case DuckDBTypeId.BLOB:
110
+ return DuckDBBlobVector.fromRawVector(vector, itemCount);
111
+ case DuckDBTypeId.DECIMAL:
112
+ if (vectorType instanceof DuckDBDecimalType) {
113
+ const { width } = vectorType;
114
+ if (width <= 0) {
115
+ throw new Error(`DECIMAL width not positive: ${width}`);
116
+ } else if (width <= 4) {
117
+ return DuckDBDecimal16Vector.fromRawVector(
118
+ vectorType,
119
+ vector,
120
+ itemCount
121
+ );
122
+ } else if (width <= 9) {
123
+ return DuckDBDecimal32Vector.fromRawVector(
124
+ vectorType,
125
+ vector,
126
+ itemCount
127
+ );
128
+ } else if (width <= 18) {
129
+ return DuckDBDecimal64Vector.fromRawVector(
130
+ vectorType,
131
+ vector,
132
+ itemCount
133
+ );
134
+ } else if (width <= 38) {
135
+ return DuckDBDecimal128Vector.fromRawVector(
136
+ vectorType,
137
+ vector,
138
+ itemCount
139
+ );
140
+ } else {
141
+ throw new Error(`DECIMAL width too large: ${width}`);
142
+ }
143
+ }
144
+ throw new Error(
145
+ 'DuckDBType has DECIMAL type id but is not an instance of DuckDBDecimalType'
146
+ );
147
+ case DuckDBTypeId.TIMESTAMP_S:
148
+ return DuckDBTimestampSecondsVector.fromRawVector(vector, itemCount);
149
+ case DuckDBTypeId.TIMESTAMP_MS:
150
+ return DuckDBTimestampMillisecondsVector.fromRawVector(
151
+ vector,
152
+ itemCount
153
+ );
154
+ case DuckDBTypeId.TIMESTAMP_NS:
155
+ return DuckDBTimestampNanosecondsVector.fromRawVector(
156
+ vector,
157
+ itemCount
158
+ );
159
+ case DuckDBTypeId.ENUM:
160
+ if (vectorType instanceof DuckDBEnumType) {
161
+ const { internalTypeId } = vectorType;
162
+ switch (internalTypeId) {
163
+ case DuckDBTypeId.UTINYINT:
164
+ return DuckDBEnum8Vector.fromRawVector(
165
+ vectorType,
166
+ vector,
167
+ itemCount
168
+ );
169
+ case DuckDBTypeId.USMALLINT:
170
+ return DuckDBEnum16Vector.fromRawVector(
171
+ vectorType,
172
+ vector,
173
+ itemCount
174
+ );
175
+ case DuckDBTypeId.UINTEGER:
176
+ return DuckDBEnum32Vector.fromRawVector(
177
+ vectorType,
178
+ vector,
179
+ itemCount
180
+ );
181
+ default:
182
+ throw new Error(
183
+ `unsupported ENUM internal type: ${internalTypeId}`
184
+ );
185
+ }
186
+ }
187
+ throw new Error(
188
+ 'DuckDBType has ENUM type id but is not an instance of DuckDBEnumType'
189
+ );
190
+ case DuckDBTypeId.LIST:
191
+ if (vectorType instanceof DuckDBListType) {
192
+ return DuckDBListVector.fromRawVector(vectorType, vector, itemCount);
193
+ }
194
+ throw new Error(
195
+ 'DuckDBType has LIST type id but is not an instance of DuckDBListType'
196
+ );
197
+ case DuckDBTypeId.STRUCT:
198
+ if (vectorType instanceof DuckDBStructType) {
199
+ if (vectorType.isTuple) {
200
+ return DuckDBTupleVector.fromRawVector(
201
+ vectorType,
202
+ vector,
203
+ itemCount
204
+ );
205
+ }
206
+ return DuckDBStructVector.fromRawVector(
207
+ vectorType,
208
+ vector,
209
+ itemCount
210
+ );
211
+ }
212
+ throw new Error(
213
+ 'DuckDBType has STRUCT type id but is not an instance of DuckDBStructType'
214
+ );
215
+ case DuckDBTypeId.MAP:
216
+ if (vectorType instanceof DuckDBMapType) {
217
+ return DuckDBMapVector.fromRawVector(vectorType, vector, itemCount);
218
+ }
219
+ throw new Error(
220
+ 'DuckDBType has MAP type id but is not an instance of DuckDBMapType'
221
+ );
222
+ case DuckDBTypeId.ARRAY:
223
+ if (vectorType instanceof DuckDBArrayType) {
224
+ return DuckDBArrayVector.fromRawVector(vectorType, vector, itemCount);
225
+ }
226
+ throw new Error(
227
+ 'DuckDBType has ARRAY type id but is not an instance of DuckDBArrayType'
228
+ );
229
+ case DuckDBTypeId.UUID:
230
+ return DuckDBUUIDVector.fromRawVector(vector, itemCount);
231
+ case DuckDBTypeId.UNION:
232
+ if (vectorType instanceof DuckDBUnionType) {
233
+ return DuckDBUnionVector.fromRawVector(vectorType, vector, itemCount);
234
+ }
235
+ throw new Error(
236
+ 'DuckDBType has UNION type id but is not an instance of DuckDBUnionType'
237
+ );
238
+ case DuckDBTypeId.BIT:
239
+ return DuckDBBitVector.fromRawVector(vector, itemCount);
240
+ case DuckDBTypeId.TIME_TZ:
241
+ return DuckDBTimeTZVector.fromRawVector(vector, itemCount);
242
+ case DuckDBTypeId.TIMESTAMP_TZ:
243
+ return DuckDBTimestampTZVector.fromRawVector(vector, itemCount);
244
+ case DuckDBTypeId.ANY:
245
+ throw new Error(`Invalid vector type: ANY`);
246
+ case DuckDBTypeId.BIGNUM:
247
+ return DuckDBBigNumVector.fromRawVector(vector, itemCount);
248
+ case DuckDBTypeId.SQLNULL:
249
+ return DuckDBSQLNullVector.fromRawVector(vector, itemCount);
250
+ case DuckDBTypeId.STRING_LITERAL:
251
+ throw new Error(`Invalid vector type: STRING_LITERAL`);
252
+ case DuckDBTypeId.INTEGER_LITERAL:
253
+ throw new Error(`Invalid vector type: INTEGER_LITERAL`);
254
+ case DuckDBTypeId.TIME_NS:
255
+ return DuckDBTimeNSVector.fromRawVector(vector, itemCount);
256
+ case DuckDBTypeId.GEOMETRY:
257
+ return DuckDBGeometryVector.fromRawVector(vector, itemCount);
258
+ case DuckDBTypeId.VARIANT:
259
+ return DuckDBVariantVector.fromRawVector(vector, itemCount);
260
+ case DuckDBTypeId.TIMESTAMP_TZ_NS:
261
+ return DuckDBTimestampTZNanosecondsVector.fromRawVector(vector, itemCount);
262
+ default:
263
+ throw new Error(
264
+ `Invalid type id: ${(vectorType as DuckDBType).typeId}`
265
+ );
266
+ }
267
+ }
268
+
269
+ vectorRegistry.create = createVector;
@@ -0,0 +1,387 @@
1
+ import duckdb from "../../../../src/bindings/index.ts";
2
+ import os from 'os';
3
+ import { DuckDBDecimalType } from '../DuckDBType';
4
+ import { DuckDBDecimalValue } from '../values';
5
+
6
+ export const littleEndian = os.endianness() === 'LE';
7
+
8
+ // function getInt8(dataView: DataView, offset: number): number {
9
+ // return dataView.getInt8(offset);
10
+ // }
11
+
12
+ export function getUInt8(dataView: DataView, offset: number): number {
13
+ return dataView.getUint8(offset);
14
+ }
15
+
16
+ export function getInt16(dataView: DataView, offset: number): number {
17
+ return dataView.getInt16(offset, littleEndian);
18
+ }
19
+
20
+ export function getUInt16(dataView: DataView, offset: number): number {
21
+ return dataView.getUint16(offset, littleEndian);
22
+ }
23
+
24
+ export function getInt32(dataView: DataView, offset: number): number {
25
+ return dataView.getInt32(offset, littleEndian);
26
+ }
27
+
28
+ export function getUInt32(dataView: DataView, offset: number): number {
29
+ return dataView.getUint32(offset, littleEndian);
30
+ }
31
+
32
+ export function getInt64(dataView: DataView, offset: number): bigint {
33
+ return dataView.getBigInt64(offset, littleEndian);
34
+ }
35
+
36
+ export function getUInt64(dataView: DataView, offset: number): bigint {
37
+ return dataView.getBigUint64(offset, littleEndian);
38
+ }
39
+
40
+ // function getFloat32(dataView: DataView, offset: number): number {
41
+ // return dataView.getFloat32(offset, littleEndian);
42
+ // }
43
+
44
+ // function getFloat64(dataView: DataView, offset: number): number {
45
+ // return dataView.getFloat64(offset, littleEndian);
46
+ // }
47
+
48
+ export function getInt128(dataView: DataView, offset: number): bigint {
49
+ const lower = getUInt64(dataView, offset);
50
+ const upper = getInt64(dataView, offset + 8);
51
+ return (upper << BigInt(64)) + lower;
52
+ }
53
+
54
+ export function getUInt128(dataView: DataView, offset: number): bigint {
55
+ const lower = getUInt64(dataView, offset);
56
+ const upper = getUInt64(dataView, offset + 8);
57
+ return (BigInt.asUintN(64, upper) << BigInt(64)) | BigInt.asUintN(64, lower);
58
+ }
59
+
60
+ export function getStringBytes(dataView: DataView, offset: number): Uint8Array {
61
+ const lengthInBytes = dataView.getUint32(offset, true);
62
+ if (lengthInBytes <= 12) {
63
+ return new Uint8Array(
64
+ dataView.buffer,
65
+ dataView.byteOffset + offset + 4,
66
+ lengthInBytes
67
+ );
68
+ } else {
69
+ return duckdb.get_data_from_pointer(
70
+ dataView.buffer as ArrayBuffer,
71
+ dataView.byteOffset + offset + 8,
72
+ lengthInBytes
73
+ );
74
+ }
75
+ }
76
+
77
+ export const textDecoder = new TextDecoder();
78
+
79
+ export function getString(dataView: DataView, offset: number): string {
80
+ const stringBytes = getStringBytes(dataView, offset);
81
+ return textDecoder.decode(stringBytes);
82
+ }
83
+
84
+ export function getBuffer(dataView: DataView, offset: number): Buffer {
85
+ const stringBytes = getStringBytes(dataView, offset);
86
+ return Buffer.from(stringBytes);
87
+ }
88
+
89
+ export function getBigNumFromBytes(bytes: Uint8Array): bigint {
90
+ const firstByte = bytes[0];
91
+ const positive = (firstByte & 0x80) > 0;
92
+ const uint64Mask = positive ? 0n : 0xffffffffffffffffn;
93
+ const uint8Mask = positive ? 0 : 0xff;
94
+ const dv = new DataView( // bytes is big endian
95
+ bytes.buffer,
96
+ bytes.byteOffset + 3,
97
+ bytes.byteLength - 3
98
+ );
99
+ const lastUint64Offset = dv.byteLength - 8;
100
+ let offset = 0;
101
+ let result = 0n;
102
+ while (offset <= lastUint64Offset) {
103
+ result = (result << 64n) | (dv.getBigUint64(offset) ^ uint64Mask);
104
+ offset += 8;
105
+ }
106
+ while (offset < dv.byteLength) {
107
+ result = (result << 8n) | BigInt(dv.getUint8(offset) ^ uint8Mask);
108
+ offset += 1;
109
+ }
110
+ return positive ? result : -result;
111
+ }
112
+
113
+ export function getBytesFromBigNum(bignum: bigint): Uint8Array {
114
+ const numberBytes: number[] = []; // little endian
115
+ const negative = bignum < 0;
116
+ if (bignum === 0n) {
117
+ numberBytes.push(0);
118
+ } else {
119
+ let vi = bignum < 0 ? -bignum : bignum;
120
+ while (vi !== 0n) {
121
+ numberBytes.push(Number(BigInt.asUintN(8, vi)));
122
+ vi >>= 8n;
123
+ }
124
+ }
125
+ const bigNumBytes = new Uint8Array(3 + numberBytes.length); // big endian
126
+ let header = 0x800000 | numberBytes.length;
127
+ if (negative) {
128
+ header = ~header;
129
+ }
130
+ bigNumBytes[0] = 0xff & (header >> 16);
131
+ bigNumBytes[1] = 0xff & (header >> 8);
132
+ bigNumBytes[2] = 0xff & header;
133
+ for (let i = 0; i < numberBytes.length; i++) {
134
+ const byte = numberBytes[numberBytes.length - 1 - i];
135
+ bigNumBytes[3 + i] = negative ? ~byte : byte;
136
+ }
137
+ return bigNumBytes;
138
+ }
139
+
140
+ export function getBoolean1(dataView: DataView, offset: number): boolean {
141
+ return getUInt8(dataView, offset) !== 0;
142
+ }
143
+
144
+ export function getBoolean2(dataView: DataView, offset: number): boolean {
145
+ return getUInt16(dataView, offset) !== 0;
146
+ }
147
+
148
+ export function getBoolean4(dataView: DataView, offset: number): boolean {
149
+ return getUInt32(dataView, offset) !== 0;
150
+ }
151
+
152
+ export function getBoolean8(dataView: DataView, offset: number): boolean {
153
+ return getUInt64(dataView, offset) !== BigInt(0);
154
+ }
155
+
156
+ export function makeGetBoolean(): (dataView: DataView, offset: number) => boolean {
157
+ switch (duckdb.sizeof_bool) {
158
+ case 1:
159
+ return getBoolean1;
160
+ case 2:
161
+ return getBoolean2;
162
+ case 4:
163
+ return getBoolean4;
164
+ case 8:
165
+ return getBoolean8;
166
+ default:
167
+ throw new Error(`Unsupported boolean size: ${duckdb.sizeof_bool}`);
168
+ }
169
+ }
170
+
171
+ export const getBoolean = makeGetBoolean();
172
+
173
+ // Range checks for fixed-width integers
174
+
175
+ // Writing a number to a DataView applies the JS ToInt32 and ToUint32 operations,
176
+ // which wrap out-of-range values modulo the type's width and truncate fractional
177
+ // ones; writing a bigint wraps in the same way. Doing that for data values would
178
+ // silently store something other than what the caller supplied, so the setters
179
+ // below check first. See duckdb/duckdb-node-neo#469.
180
+ //
181
+ // The vectors backed by a typed array rather than a DataView repeat these checks
182
+ // inline instead of calling them: they sit in the inner loop of every bulk write,
183
+ // and calling across a module boundary there costs about 20% of write throughput.
184
+ // Keep the two in sync; api/test/integer-ranges.test.ts checks every bound.
185
+
186
+ function checkUInt8(value: number): number {
187
+ if (!Number.isInteger(value)) {
188
+ throw new Error(`number is not an integer`);
189
+ }
190
+ if (value < 0 || value > 255) {
191
+ throw new Error(`number out of uint8 range`);
192
+ }
193
+ return value;
194
+ }
195
+
196
+ function checkInt16(value: number): number {
197
+ if (!Number.isInteger(value)) {
198
+ throw new Error(`number is not an integer`);
199
+ }
200
+ if (value < -32768 || value > 32767) {
201
+ throw new Error(`number out of int16 range`);
202
+ }
203
+ return value;
204
+ }
205
+
206
+ function checkUInt16(value: number): number {
207
+ if (!Number.isInteger(value)) {
208
+ throw new Error(`number is not an integer`);
209
+ }
210
+ if (value < 0 || value > 65535) {
211
+ throw new Error(`number out of uint16 range`);
212
+ }
213
+ return value;
214
+ }
215
+
216
+ function checkInt32(value: number): number {
217
+ if (!Number.isInteger(value)) {
218
+ throw new Error(`number is not an integer`);
219
+ }
220
+ if (value < -2147483648 || value > 2147483647) {
221
+ throw new Error(`number out of int32 range`);
222
+ }
223
+ return value;
224
+ }
225
+
226
+ function checkUInt32(value: number): number {
227
+ if (!Number.isInteger(value)) {
228
+ throw new Error(`number is not an integer`);
229
+ }
230
+ if (value < 0 || value > 4294967295) {
231
+ throw new Error(`number out of uint32 range`);
232
+ }
233
+ return value;
234
+ }
235
+
236
+ function checkInt64(value: bigint): bigint {
237
+ if (BigInt.asIntN(64, value) !== value) {
238
+ throw new Error(`bigint out of int64 range`);
239
+ }
240
+ return value;
241
+ }
242
+
243
+ function checkUInt64(value: bigint): bigint {
244
+ if (BigInt.asUintN(64, value) !== value) {
245
+ throw new Error(`bigint out of uint64 range`);
246
+ }
247
+ return value;
248
+ }
249
+
250
+ function checkInt128(value: bigint): bigint {
251
+ if (BigInt.asIntN(128, value) !== value) {
252
+ throw new Error(`bigint out of int128 range`);
253
+ }
254
+ return value;
255
+ }
256
+
257
+ function checkUInt128(value: bigint): bigint {
258
+ if (BigInt.asUintN(128, value) !== value) {
259
+ throw new Error(`bigint out of uint128 range`);
260
+ }
261
+ return value;
262
+ }
263
+
264
+ // function setInt8(dataView: DataView, offset: number, value: number) {
265
+ // dataView.setInt8(offset, value);
266
+ // }
267
+
268
+ export function setUInt8(dataView: DataView, offset: number, value: number) {
269
+ dataView.setUint8(offset, checkUInt8(value));
270
+ }
271
+
272
+ export function setInt16(dataView: DataView, offset: number, value: number) {
273
+ dataView.setInt16(offset, checkInt16(value), littleEndian);
274
+ }
275
+
276
+ export function setUInt16(dataView: DataView, offset: number, value: number) {
277
+ dataView.setUint16(offset, checkUInt16(value), littleEndian);
278
+ }
279
+
280
+ export function setInt32(dataView: DataView, offset: number, value: number) {
281
+ dataView.setInt32(offset, checkInt32(value), littleEndian);
282
+ }
283
+
284
+ export function setUInt32(dataView: DataView, offset: number, value: number) {
285
+ dataView.setUint32(offset, checkUInt32(value), littleEndian);
286
+ }
287
+
288
+ export function setInt64(dataView: DataView, offset: number, value: bigint) {
289
+ dataView.setBigInt64(offset, checkInt64(value), littleEndian);
290
+ }
291
+
292
+ export function setUInt64(dataView: DataView, offset: number, value: bigint) {
293
+ dataView.setBigUint64(offset, checkUInt64(value), littleEndian);
294
+ }
295
+
296
+ export function setInt128(dataView: DataView, offset: number, value: bigint) {
297
+ checkInt128(value);
298
+ const lower = BigInt.asUintN(64, value);
299
+ const upper = BigInt.asIntN(64, value >> BigInt(64));
300
+ dataView.setBigUint64(offset, lower, littleEndian);
301
+ dataView.setBigInt64(offset + 8, upper, littleEndian);
302
+ }
303
+
304
+ export function setUInt128(dataView: DataView, offset: number, value: bigint) {
305
+ checkUInt128(value);
306
+ const lower = BigInt.asUintN(64, value);
307
+ const upper = BigInt.asUintN(64, value >> BigInt(64));
308
+ dataView.setBigUint64(offset, lower, littleEndian);
309
+ dataView.setBigUint64(offset + 8, upper, littleEndian);
310
+ }
311
+
312
+ export function setBoolean1(dataView: DataView, offset: number, value: boolean) {
313
+ setUInt8(dataView, offset, value ? 1 : 0);
314
+ }
315
+
316
+ export function setBoolean2(dataView: DataView, offset: number, value: boolean) {
317
+ setUInt16(dataView, offset, value ? 1 : 0);
318
+ }
319
+
320
+ export function setBoolean4(dataView: DataView, offset: number, value: boolean) {
321
+ setUInt32(dataView, offset, value ? 1 : 0);
322
+ }
323
+
324
+ export function setBoolean8(dataView: DataView, offset: number, value: boolean) {
325
+ setUInt64(dataView, offset, value ? BigInt(1) : BigInt(0));
326
+ }
327
+
328
+ export function makeSetBoolean(): (
329
+ dataView: DataView,
330
+ offset: number,
331
+ value: boolean
332
+ ) => void {
333
+ switch (duckdb.sizeof_bool) {
334
+ case 1:
335
+ return setBoolean1;
336
+ case 2:
337
+ return setBoolean2;
338
+ case 4:
339
+ return setBoolean4;
340
+ case 8:
341
+ return setBoolean8;
342
+ default:
343
+ throw new Error(`Unsupported boolean size: ${duckdb.sizeof_bool}`);
344
+ }
345
+ }
346
+
347
+ export const setBoolean = makeSetBoolean();
348
+
349
+ export function getDecimal16(
350
+ dataView: DataView,
351
+ offset: number,
352
+ type: DuckDBDecimalType
353
+ ): DuckDBDecimalValue {
354
+ const value = getInt16(dataView, offset);
355
+ return new DuckDBDecimalValue(BigInt(value), type.width, type.scale);
356
+ }
357
+
358
+ export function getDecimal32(
359
+ dataView: DataView,
360
+ offset: number,
361
+ type: DuckDBDecimalType
362
+ ): DuckDBDecimalValue {
363
+ const value = getInt32(dataView, offset);
364
+ return new DuckDBDecimalValue(BigInt(value), type.width, type.scale);
365
+ }
366
+
367
+ export function getDecimal64(
368
+ dataView: DataView,
369
+ offset: number,
370
+ type: DuckDBDecimalType
371
+ ): DuckDBDecimalValue {
372
+ const value = getInt64(dataView, offset);
373
+ return new DuckDBDecimalValue(value, type.width, type.scale);
374
+ }
375
+
376
+ export function getDecimal128(
377
+ dataView: DataView,
378
+ offset: number,
379
+ type: DuckDBDecimalType
380
+ ): DuckDBDecimalValue {
381
+ const value = getInt128(dataView, offset);
382
+ return new DuckDBDecimalValue(value, type.width, type.scale);
383
+ }
384
+
385
+ export function vectorData(vector: duckdb.Vector, byteCount: number): Uint8Array {
386
+ return duckdb.vector_get_data(vector, byteCount);
387
+ }
@@ -0,0 +1,50 @@
1
+ export * from './DuckDBArrayVector';
2
+ export * from './DuckDBBigIntVector';
3
+ export * from './DuckDBBigNumVector';
4
+ export * from './DuckDBBitVector';
5
+ export * from './DuckDBBlobVector';
6
+ export * from './DuckDBBooleanVector';
7
+ export * from './DuckDBDateVector';
8
+ export * from './DuckDBDecimal128Vector';
9
+ export * from './DuckDBDecimal16Vector';
10
+ export * from './DuckDBDecimal32Vector';
11
+ export * from './DuckDBDecimal64Vector';
12
+ export * from './DuckDBDoubleVector';
13
+ export * from './DuckDBEnum16Vector';
14
+ export * from './DuckDBEnum32Vector';
15
+ export * from './DuckDBEnum8Vector';
16
+ export * from './DuckDBFloatVector';
17
+ export * from './DuckDBGeometryVector';
18
+ export * from './DuckDBHugeIntVector';
19
+ export * from './DuckDBIntegerVector';
20
+ export * from './DuckDBIntervalVector';
21
+ export * from './DuckDBListVector';
22
+ export * from './DuckDBMapVector';
23
+ export * from './DuckDBSmallIntVector';
24
+ export * from './DuckDBSQLNullVector';
25
+ export * from './DuckDBStructVector';
26
+ export * from './DuckDBTimeNSVector';
27
+ export * from './DuckDBTimeTZVector';
28
+ export * from './DuckDBTimeVector';
29
+ export * from './DuckDBTimestampMillisecondsVector';
30
+ export * from './DuckDBTimestampNanosecondsVector';
31
+ export * from './DuckDBTimestampSecondsVector';
32
+ export * from './DuckDBTimestampTZVector';
33
+ export * from './DuckDBTimestampTZNanosecondsVector';
34
+ export * from './DuckDBTimestampVector';
35
+ export * from './DuckDBTinyIntVector';
36
+ export * from './DuckDBTupleVector';
37
+ export * from './DuckDBUBigIntVector';
38
+ export * from './DuckDBUHugeIntVector';
39
+ export * from './DuckDBUIntegerVector';
40
+ export * from './DuckDBUSmallIntVector';
41
+ export * from './DuckDBUTinyIntVector';
42
+ export * from './DuckDBUUIDVector';
43
+ export * from './DuckDBUnionVector';
44
+ export * from './DuckDBVarCharVector';
45
+ export * from './DuckDBVariantVector';
46
+ export * from './DuckDBVector';
47
+
48
+ // Side-effect import: registers the concrete DuckDBVector.create() factory.
49
+ // Keep last so the base class and all subclasses are defined first.
50
+ import './createVector';