@haybarn/node-api 1.5.6-rc1 → 2.0.0-rc5

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 (285) hide show
  1. package/README.md +315 -21
  2. package/lib/DuckDBAppender.d.ts +8 -2
  3. package/lib/DuckDBAppender.js +19 -1
  4. package/lib/DuckDBConnection.d.ts +2 -0
  5. package/lib/DuckDBConnection.js +4 -1
  6. package/lib/DuckDBDataChunk.d.ts +30 -0
  7. package/lib/DuckDBDataChunk.js +94 -1
  8. package/lib/DuckDBDataChunkWriter.d.ts +74 -0
  9. package/lib/DuckDBDataChunkWriter.js +109 -0
  10. package/lib/DuckDBLogicalType.d.ts +5 -1
  11. package/lib/DuckDBLogicalType.js +18 -1
  12. package/lib/DuckDBMaterializedResult.d.ts +8 -1
  13. package/lib/DuckDBMaterializedResult.js +22 -2
  14. package/lib/DuckDBPendingResult.d.ts +16 -1
  15. package/lib/DuckDBPendingResult.js +19 -2
  16. package/lib/DuckDBPreparedStatement.d.ts +4 -1
  17. package/lib/DuckDBPreparedStatement.js +17 -4
  18. package/lib/DuckDBResult.d.ts +21 -1
  19. package/lib/DuckDBResult.js +87 -5
  20. package/lib/DuckDBResultReader.d.ts +5 -0
  21. package/lib/DuckDBResultReader.js +9 -2
  22. package/lib/DuckDBScalarFunction.d.ts +9 -5
  23. package/lib/DuckDBScalarFunction.js +14 -5
  24. package/lib/DuckDBScalarFunctionBindInfo.d.ts +16 -0
  25. package/lib/{DuckDBBindInfo.js → DuckDBScalarFunctionBindInfo.js} +5 -3
  26. package/lib/DuckDBScalarFunctionInfo.d.ts +16 -0
  27. package/lib/{DuckDBFunctionInfo.js → DuckDBScalarFunctionInfo.js} +11 -3
  28. package/lib/{DuckDBBindInfo.d.ts → DuckDBScalarFunctionInitInfo.d.ts} +6 -4
  29. package/lib/DuckDBScalarFunctionInitInfo.js +39 -0
  30. package/lib/DuckDBTableFunction.d.ts +41 -0
  31. package/lib/DuckDBTableFunction.js +83 -0
  32. package/lib/DuckDBTableFunctionBindInfo.d.ts +21 -0
  33. package/lib/DuckDBTableFunctionBindInfo.js +54 -0
  34. package/lib/DuckDBTableFunctionInfo.d.ts +15 -0
  35. package/lib/DuckDBTableFunctionInfo.js +42 -0
  36. package/lib/DuckDBTableFunctionInitInfo.d.ts +22 -0
  37. package/lib/DuckDBTableFunctionInitInfo.js +58 -0
  38. package/lib/DuckDBType.d.ts +1 -373
  39. package/lib/DuckDBType.js +14 -927
  40. package/lib/DuckDBTypeId.d.ts +4 -1
  41. package/lib/DuckDBTypeId.js +3 -0
  42. package/lib/DuckDBValueConverter.d.ts +10 -0
  43. package/lib/DuckDBValueConverters.d.ts +27 -0
  44. package/lib/DuckDBValueConverters.js +128 -1
  45. package/lib/DuckDBVector.d.ts +1 -596
  46. package/lib/DuckDBVector.js +14 -2522
  47. package/lib/JSDuckDBValueConverter.d.ts +1 -2
  48. package/lib/JSDuckDBValueConverter.js +5 -2
  49. package/lib/JSInputTypeForTypeId.d.ts +104 -0
  50. package/lib/JSInputTypeForTypeId.js +3 -0
  51. package/lib/JSToDuckDBValueConverter.d.ts +30 -0
  52. package/lib/JSToDuckDBValueConverter.js +83 -0
  53. package/lib/JSTypeForTypeId.d.ts +91 -0
  54. package/lib/JSTypeForTypeId.js +3 -0
  55. package/lib/JsonDuckDBValueConverter.d.ts +1 -2
  56. package/lib/JsonDuckDBValueConverter.js +4 -1
  57. package/lib/JsonTypeForTypeId.d.ts +96 -0
  58. package/lib/JsonTypeForTypeId.js +3 -0
  59. package/lib/ToDuckDBValueConverter.d.ts +41 -0
  60. package/lib/ToDuckDBValueConverter.js +27 -0
  61. package/lib/ToDuckDBValueConverters.d.ts +54 -0
  62. package/lib/ToDuckDBValueConverters.js +199 -0
  63. package/lib/conversion/dateTimeStringConversion.d.ts +2 -2
  64. package/lib/conversion/dateTimeStringConversion.js +20 -7
  65. package/lib/conversion/varintDecode.d.ts +18 -0
  66. package/lib/conversion/varintDecode.js +42 -0
  67. package/lib/convertColumnsFromChunks.d.ts +1 -1
  68. package/lib/convertColumnsFromChunks.js +2 -2
  69. package/lib/createResult.d.ts +2 -1
  70. package/lib/createResult.js +3 -3
  71. package/lib/createValue.js +63 -5
  72. package/lib/duckdb.d.ts +15 -2
  73. package/lib/duckdb.js +15 -2
  74. package/lib/getColumnsFromChunks.d.ts +1 -1
  75. package/lib/getColumnsFromChunks.js +2 -2
  76. package/lib/getColumnsObjectFromChunks.js +3 -0
  77. package/lib/readValue.d.ts +22 -0
  78. package/lib/readValue.js +35 -0
  79. package/lib/typeForValue.js +21 -2
  80. package/lib/types/BaseDuckDBType.d.ts +11 -0
  81. package/lib/types/BaseDuckDBType.js +34 -0
  82. package/lib/types/DuckDBAnyType.d.ts +8 -0
  83. package/lib/types/DuckDBAnyType.js +16 -0
  84. package/lib/types/DuckDBArrayType.d.ts +14 -0
  85. package/lib/types/DuckDBArrayType.js +38 -0
  86. package/lib/types/DuckDBBigIntType.d.ts +12 -0
  87. package/lib/types/DuckDBBigIntType.js +24 -0
  88. package/lib/types/DuckDBBigNumType.d.ts +12 -0
  89. package/lib/types/DuckDBBigNumType.js +24 -0
  90. package/lib/types/DuckDBBitType.d.ts +8 -0
  91. package/lib/types/DuckDBBitType.js +16 -0
  92. package/lib/types/DuckDBBlobType.d.ts +8 -0
  93. package/lib/types/DuckDBBlobType.js +16 -0
  94. package/lib/types/DuckDBBooleanType.d.ts +8 -0
  95. package/lib/types/DuckDBBooleanType.js +16 -0
  96. package/lib/types/DuckDBDateType.d.ts +14 -0
  97. package/lib/types/DuckDBDateType.js +32 -0
  98. package/lib/types/DuckDBDecimalType.d.ts +14 -0
  99. package/lib/types/DuckDBDecimalType.js +45 -0
  100. package/lib/types/DuckDBDoubleType.d.ts +12 -0
  101. package/lib/types/DuckDBDoubleType.js +24 -0
  102. package/lib/types/DuckDBEnumType.d.ts +29 -0
  103. package/lib/types/DuckDBEnumType.js +100 -0
  104. package/lib/types/DuckDBFloatType.d.ts +12 -0
  105. package/lib/types/DuckDBFloatType.js +24 -0
  106. package/lib/types/DuckDBGeometryType.d.ts +19 -0
  107. package/lib/types/DuckDBGeometryType.js +38 -0
  108. package/lib/types/DuckDBHugeIntType.d.ts +12 -0
  109. package/lib/types/DuckDBHugeIntType.js +24 -0
  110. package/lib/types/DuckDBIntegerLiteralType.d.ts +8 -0
  111. package/lib/types/DuckDBIntegerLiteralType.js +16 -0
  112. package/lib/types/DuckDBIntegerType.d.ts +12 -0
  113. package/lib/types/DuckDBIntegerType.js +24 -0
  114. package/lib/types/DuckDBIntervalType.d.ts +8 -0
  115. package/lib/types/DuckDBIntervalType.js +16 -0
  116. package/lib/types/DuckDBListType.d.ts +13 -0
  117. package/lib/types/DuckDBListType.js +35 -0
  118. package/lib/types/DuckDBMapType.d.ts +14 -0
  119. package/lib/types/DuckDBMapType.js +38 -0
  120. package/lib/types/DuckDBSQLNullType.d.ts +10 -0
  121. package/lib/types/DuckDBSQLNullType.js +20 -0
  122. package/lib/types/DuckDBSmallIntType.d.ts +12 -0
  123. package/lib/types/DuckDBSmallIntType.js +24 -0
  124. package/lib/types/DuckDBStringLiteralType.d.ts +8 -0
  125. package/lib/types/DuckDBStringLiteralType.js +16 -0
  126. package/lib/types/DuckDBStructType.d.ts +29 -0
  127. package/lib/types/DuckDBStructType.js +86 -0
  128. package/lib/types/DuckDBTimeNSType.d.ts +11 -0
  129. package/lib/types/DuckDBTimeNSType.js +23 -0
  130. package/lib/types/DuckDBTimeTZType.d.ts +12 -0
  131. package/lib/types/DuckDBTimeTZType.js +26 -0
  132. package/lib/types/DuckDBTimeType.d.ts +11 -0
  133. package/lib/types/DuckDBTimeType.js +23 -0
  134. package/lib/types/DuckDBTimestampMillisecondsType.d.ts +14 -0
  135. package/lib/types/DuckDBTimestampMillisecondsType.js +32 -0
  136. package/lib/types/DuckDBTimestampNanosecondsType.d.ts +14 -0
  137. package/lib/types/DuckDBTimestampNanosecondsType.js +32 -0
  138. package/lib/types/DuckDBTimestampSecondsType.d.ts +14 -0
  139. package/lib/types/DuckDBTimestampSecondsType.js +32 -0
  140. package/lib/types/DuckDBTimestampTZNanosecondsType.d.ts +15 -0
  141. package/lib/types/DuckDBTimestampTZNanosecondsType.js +35 -0
  142. package/lib/types/DuckDBTimestampTZType.d.ts +15 -0
  143. package/lib/types/DuckDBTimestampTZType.js +35 -0
  144. package/lib/types/DuckDBTimestampType.d.ts +16 -0
  145. package/lib/types/DuckDBTimestampType.js +33 -0
  146. package/lib/types/DuckDBTinyIntType.d.ts +12 -0
  147. package/lib/types/DuckDBTinyIntType.js +24 -0
  148. package/lib/types/DuckDBType.d.ts +43 -0
  149. package/lib/types/DuckDBType.js +2 -0
  150. package/lib/types/DuckDBUBigIntType.d.ts +12 -0
  151. package/lib/types/DuckDBUBigIntType.js +24 -0
  152. package/lib/types/DuckDBUHugeIntType.d.ts +12 -0
  153. package/lib/types/DuckDBUHugeIntType.js +24 -0
  154. package/lib/types/DuckDBUIntegerType.d.ts +12 -0
  155. package/lib/types/DuckDBUIntegerType.js +24 -0
  156. package/lib/types/DuckDBUSmallIntType.d.ts +12 -0
  157. package/lib/types/DuckDBUSmallIntType.js +24 -0
  158. package/lib/types/DuckDBUTinyIntType.d.ts +12 -0
  159. package/lib/types/DuckDBUTinyIntType.js +24 -0
  160. package/lib/types/DuckDBUUIDType.d.ts +11 -0
  161. package/lib/types/DuckDBUUIDType.js +23 -0
  162. package/lib/types/DuckDBUnionType.d.ts +18 -0
  163. package/lib/types/DuckDBUnionType.js +64 -0
  164. package/lib/types/DuckDBVarCharType.d.ts +8 -0
  165. package/lib/types/DuckDBVarCharType.js +16 -0
  166. package/lib/types/DuckDBVariantType.d.ts +8 -0
  167. package/lib/types/DuckDBVariantType.js +16 -0
  168. package/lib/types/index.d.ts +44 -0
  169. package/lib/types/index.js +60 -0
  170. package/lib/values/DuckDBGeometryValue.d.ts +12 -0
  171. package/lib/values/DuckDBGeometryValue.js +30 -0
  172. package/lib/values/DuckDBTimestampTZNanosecondsValue.d.ts +14 -0
  173. package/lib/values/DuckDBTimestampTZNanosecondsValue.js +33 -0
  174. package/lib/values/DuckDBTupleValue.d.ts +11 -0
  175. package/lib/values/DuckDBTupleValue.js +22 -0
  176. package/lib/values/DuckDBUUIDValue.js +5 -1
  177. package/lib/values/DuckDBValue.d.ts +5 -1
  178. package/lib/values/DuckDBVariantValue.d.ts +19 -0
  179. package/lib/values/DuckDBVariantValue.js +30 -0
  180. package/lib/values/index.d.ts +4 -0
  181. package/lib/values/index.js +4 -0
  182. package/lib/vectors/DuckDBArrayVector.d.ts +21 -0
  183. package/lib/vectors/DuckDBArrayVector.js +79 -0
  184. package/lib/vectors/DuckDBBigIntVector.d.ts +17 -0
  185. package/lib/vectors/DuckDBBigIntVector.js +58 -0
  186. package/lib/vectors/DuckDBBigNumVector.d.ts +21 -0
  187. package/lib/vectors/DuckDBBigNumVector.js +70 -0
  188. package/lib/vectors/DuckDBBitVector.d.ts +22 -0
  189. package/lib/vectors/DuckDBBitVector.js +74 -0
  190. package/lib/vectors/DuckDBBlobVector.d.ts +32 -0
  191. package/lib/vectors/DuckDBBlobVector.js +83 -0
  192. package/lib/vectors/DuckDBBooleanVector.d.ts +18 -0
  193. package/lib/vectors/DuckDBBooleanVector.js +58 -0
  194. package/lib/vectors/DuckDBDateVector.d.ts +18 -0
  195. package/lib/vectors/DuckDBDateVector.js +64 -0
  196. package/lib/vectors/DuckDBDecimal128Vector.d.ts +21 -0
  197. package/lib/vectors/DuckDBDecimal128Vector.js +64 -0
  198. package/lib/vectors/DuckDBDecimal16Vector.d.ts +21 -0
  199. package/lib/vectors/DuckDBDecimal16Vector.js +64 -0
  200. package/lib/vectors/DuckDBDecimal32Vector.d.ts +21 -0
  201. package/lib/vectors/DuckDBDecimal32Vector.js +64 -0
  202. package/lib/vectors/DuckDBDecimal64Vector.d.ts +21 -0
  203. package/lib/vectors/DuckDBDecimal64Vector.js +64 -0
  204. package/lib/vectors/DuckDBDoubleVector.d.ts +17 -0
  205. package/lib/vectors/DuckDBDoubleVector.js +54 -0
  206. package/lib/vectors/DuckDBEnum16Vector.d.ts +18 -0
  207. package/lib/vectors/DuckDBEnum16Vector.js +57 -0
  208. package/lib/vectors/DuckDBEnum32Vector.d.ts +18 -0
  209. package/lib/vectors/DuckDBEnum32Vector.js +57 -0
  210. package/lib/vectors/DuckDBEnum8Vector.d.ts +18 -0
  211. package/lib/vectors/DuckDBEnum8Vector.js +57 -0
  212. package/lib/vectors/DuckDBFloatVector.d.ts +17 -0
  213. package/lib/vectors/DuckDBFloatVector.js +54 -0
  214. package/lib/vectors/DuckDBGeometryVector.d.ts +22 -0
  215. package/lib/vectors/DuckDBGeometryVector.js +69 -0
  216. package/lib/vectors/DuckDBHugeIntVector.d.ts +19 -0
  217. package/lib/vectors/DuckDBHugeIntVector.js +63 -0
  218. package/lib/vectors/DuckDBIntegerVector.d.ts +17 -0
  219. package/lib/vectors/DuckDBIntegerVector.js +61 -0
  220. package/lib/vectors/DuckDBIntervalVector.d.ts +19 -0
  221. package/lib/vectors/DuckDBIntervalVector.js +67 -0
  222. package/lib/vectors/DuckDBListVector.d.ts +35 -0
  223. package/lib/vectors/DuckDBListVector.js +151 -0
  224. package/lib/vectors/DuckDBMapVector.d.ts +17 -0
  225. package/lib/vectors/DuckDBMapVector.js +60 -0
  226. package/lib/vectors/DuckDBSQLNullVector.d.ts +18 -0
  227. package/lib/vectors/DuckDBSQLNullVector.js +44 -0
  228. package/lib/vectors/DuckDBSmallIntVector.d.ts +17 -0
  229. package/lib/vectors/DuckDBSmallIntVector.js +61 -0
  230. package/lib/vectors/DuckDBStructVector.d.ts +35 -0
  231. package/lib/vectors/DuckDBStructVector.js +105 -0
  232. package/lib/vectors/DuckDBTimeNSVector.d.ts +18 -0
  233. package/lib/vectors/DuckDBTimeNSVector.js +61 -0
  234. package/lib/vectors/DuckDBTimeTZVector.d.ts +18 -0
  235. package/lib/vectors/DuckDBTimeTZVector.js +61 -0
  236. package/lib/vectors/DuckDBTimeVector.d.ts +18 -0
  237. package/lib/vectors/DuckDBTimeVector.js +61 -0
  238. package/lib/vectors/DuckDBTimestampMillisecondsVector.d.ts +18 -0
  239. package/lib/vectors/DuckDBTimestampMillisecondsVector.js +61 -0
  240. package/lib/vectors/DuckDBTimestampNanosecondsVector.d.ts +18 -0
  241. package/lib/vectors/DuckDBTimestampNanosecondsVector.js +61 -0
  242. package/lib/vectors/DuckDBTimestampSecondsVector.d.ts +18 -0
  243. package/lib/vectors/DuckDBTimestampSecondsVector.js +61 -0
  244. package/lib/vectors/DuckDBTimestampTZNanosecondsVector.d.ts +18 -0
  245. package/lib/vectors/DuckDBTimestampTZNanosecondsVector.js +61 -0
  246. package/lib/vectors/DuckDBTimestampTZVector.d.ts +18 -0
  247. package/lib/vectors/DuckDBTimestampTZVector.js +61 -0
  248. package/lib/vectors/DuckDBTimestampVector.d.ts +18 -0
  249. package/lib/vectors/DuckDBTimestampVector.js +61 -0
  250. package/lib/vectors/DuckDBTinyIntVector.d.ts +17 -0
  251. package/lib/vectors/DuckDBTinyIntVector.js +61 -0
  252. package/lib/vectors/DuckDBTupleVector.d.ts +26 -0
  253. package/lib/vectors/DuckDBTupleVector.js +91 -0
  254. package/lib/vectors/DuckDBUBigIntVector.d.ts +17 -0
  255. package/lib/vectors/DuckDBUBigIntVector.js +58 -0
  256. package/lib/vectors/DuckDBUHugeIntVector.d.ts +19 -0
  257. package/lib/vectors/DuckDBUHugeIntVector.js +63 -0
  258. package/lib/vectors/DuckDBUIntegerVector.d.ts +17 -0
  259. package/lib/vectors/DuckDBUIntegerVector.js +61 -0
  260. package/lib/vectors/DuckDBUSmallIntVector.d.ts +17 -0
  261. package/lib/vectors/DuckDBUSmallIntVector.js +61 -0
  262. package/lib/vectors/DuckDBUTinyIntVector.d.ts +17 -0
  263. package/lib/vectors/DuckDBUTinyIntVector.js +61 -0
  264. package/lib/vectors/DuckDBUUIDVector.d.ts +19 -0
  265. package/lib/vectors/DuckDBUUIDVector.js +59 -0
  266. package/lib/vectors/DuckDBUnionVector.d.ts +17 -0
  267. package/lib/vectors/DuckDBUnionVector.js +70 -0
  268. package/lib/vectors/DuckDBValidity.d.ts +12 -0
  269. package/lib/vectors/DuckDBValidity.js +91 -0
  270. package/lib/vectors/DuckDBVarCharVector.d.ts +21 -0
  271. package/lib/vectors/DuckDBVarCharVector.js +74 -0
  272. package/lib/vectors/DuckDBVariantVector.d.ts +42 -0
  273. package/lib/vectors/DuckDBVariantVector.js +461 -0
  274. package/lib/vectors/DuckDBVector.d.ts +14 -0
  275. package/lib/vectors/DuckDBVector.js +27 -0
  276. package/lib/vectors/createVector.d.ts +1 -0
  277. package/lib/vectors/createVector.js +201 -0
  278. package/lib/vectors/dataAccessors.d.ts +45 -0
  279. package/lib/vectors/dataAccessors.js +344 -0
  280. package/lib/vectors/index.d.ts +47 -0
  281. package/lib/vectors/index.js +65 -0
  282. package/lib/vectors/vectorRegistry.d.ts +20 -0
  283. package/lib/vectors/vectorRegistry.js +16 -0
  284. package/package.json +3 -2
  285. package/lib/DuckDBFunctionInfo.d.ts +0 -10
@@ -0,0 +1,12 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ export declare class DuckDBFloatType extends BaseDuckDBType<DuckDBTypeId.FLOAT> {
4
+ constructor(alias?: string);
5
+ static readonly instance: DuckDBFloatType;
6
+ static create(alias?: string): DuckDBFloatType;
7
+ static readonly Max: number;
8
+ static readonly Min: number;
9
+ get max(): number;
10
+ get min(): number;
11
+ }
12
+ export declare const FLOAT: DuckDBFloatType;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FLOAT = exports.DuckDBFloatType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ class DuckDBFloatType extends BaseDuckDBType_1.BaseDuckDBType {
7
+ constructor(alias) {
8
+ super(DuckDBTypeId_1.DuckDBTypeId.FLOAT, alias);
9
+ }
10
+ static instance = new DuckDBFloatType();
11
+ static create(alias) {
12
+ return alias ? new DuckDBFloatType(alias) : DuckDBFloatType.instance;
13
+ }
14
+ static Max = Math.fround(3.4028235e38);
15
+ static Min = Math.fround(-3.4028235e38);
16
+ get max() {
17
+ return DuckDBFloatType.Max;
18
+ }
19
+ get min() {
20
+ return DuckDBFloatType.Min;
21
+ }
22
+ }
23
+ exports.DuckDBFloatType = DuckDBFloatType;
24
+ exports.FLOAT = DuckDBFloatType.instance;
@@ -0,0 +1,19 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ import { Json } from '../Json';
4
+ export declare class DuckDBGeometryType extends BaseDuckDBType<DuckDBTypeId.GEOMETRY> {
5
+ /**
6
+ * Coordinate Reference System (e.g. a WKT2 string) attached to the type.
7
+ *
8
+ * Read-only: setting `crs` on a `DuckDBGeometryType` is not propagated by
9
+ * `toLogicalType()`. To produce a GEOMETRY logical type carrying a CRS,
10
+ * construct it via SQL (e.g. `'POINT(1 2)'::GEOMETRY('<crs>')`).
11
+ */
12
+ readonly crs?: string;
13
+ constructor(alias?: string, crs?: string);
14
+ toString(): string;
15
+ toJson(): Json;
16
+ static readonly instance: DuckDBGeometryType;
17
+ static create(alias?: string, crs?: string): DuckDBGeometryType;
18
+ }
19
+ export declare const GEOMETRY: DuckDBGeometryType;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GEOMETRY = exports.DuckDBGeometryType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ const sql_1 = require("../sql");
7
+ class DuckDBGeometryType extends BaseDuckDBType_1.BaseDuckDBType {
8
+ /**
9
+ * Coordinate Reference System (e.g. a WKT2 string) attached to the type.
10
+ *
11
+ * Read-only: setting `crs` on a `DuckDBGeometryType` is not propagated by
12
+ * `toLogicalType()`. To produce a GEOMETRY logical type carrying a CRS,
13
+ * construct it via SQL (e.g. `'POINT(1 2)'::GEOMETRY('<crs>')`).
14
+ */
15
+ crs;
16
+ constructor(alias, crs) {
17
+ super(DuckDBTypeId_1.DuckDBTypeId.GEOMETRY, alias);
18
+ this.crs = crs;
19
+ }
20
+ toString() {
21
+ return this.crs ? `GEOMETRY(${(0, sql_1.quotedString)(this.crs)})` : 'GEOMETRY';
22
+ }
23
+ toJson() {
24
+ return {
25
+ typeId: this.typeId,
26
+ ...(this.crs ? { crs: this.crs } : {}),
27
+ ...(this.alias ? { alias: this.alias } : {}),
28
+ };
29
+ }
30
+ static instance = new DuckDBGeometryType();
31
+ static create(alias, crs) {
32
+ return alias || crs
33
+ ? new DuckDBGeometryType(alias, crs)
34
+ : DuckDBGeometryType.instance;
35
+ }
36
+ }
37
+ exports.DuckDBGeometryType = DuckDBGeometryType;
38
+ exports.GEOMETRY = DuckDBGeometryType.instance;
@@ -0,0 +1,12 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ export declare class DuckDBHugeIntType extends BaseDuckDBType<DuckDBTypeId.HUGEINT> {
4
+ constructor(alias?: string);
5
+ static readonly instance: DuckDBHugeIntType;
6
+ static create(alias?: string): DuckDBHugeIntType;
7
+ static readonly Max: bigint;
8
+ static readonly Min: bigint;
9
+ get max(): bigint;
10
+ get min(): bigint;
11
+ }
12
+ export declare const HUGEINT: DuckDBHugeIntType;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HUGEINT = exports.DuckDBHugeIntType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ class DuckDBHugeIntType extends BaseDuckDBType_1.BaseDuckDBType {
7
+ constructor(alias) {
8
+ super(DuckDBTypeId_1.DuckDBTypeId.HUGEINT, alias);
9
+ }
10
+ static instance = new DuckDBHugeIntType();
11
+ static create(alias) {
12
+ return alias ? new DuckDBHugeIntType(alias) : DuckDBHugeIntType.instance;
13
+ }
14
+ static Max = 2n ** 127n - 1n;
15
+ static Min = -(2n ** 127n);
16
+ get max() {
17
+ return DuckDBHugeIntType.Max;
18
+ }
19
+ get min() {
20
+ return DuckDBHugeIntType.Min;
21
+ }
22
+ }
23
+ exports.DuckDBHugeIntType = DuckDBHugeIntType;
24
+ exports.HUGEINT = DuckDBHugeIntType.instance;
@@ -0,0 +1,8 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ export declare class DuckDBIntegerLiteralType extends BaseDuckDBType<DuckDBTypeId.INTEGER_LITERAL> {
4
+ constructor(alias?: string);
5
+ static readonly instance: DuckDBIntegerLiteralType;
6
+ static create(alias?: string): DuckDBIntegerLiteralType;
7
+ }
8
+ export declare const INTEGER_LITERAL: DuckDBIntegerLiteralType;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTEGER_LITERAL = exports.DuckDBIntegerLiteralType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ class DuckDBIntegerLiteralType extends BaseDuckDBType_1.BaseDuckDBType {
7
+ constructor(alias) {
8
+ super(DuckDBTypeId_1.DuckDBTypeId.INTEGER_LITERAL, alias);
9
+ }
10
+ static instance = new DuckDBIntegerLiteralType();
11
+ static create(alias) {
12
+ return alias ? new DuckDBIntegerLiteralType(alias) : DuckDBIntegerLiteralType.instance;
13
+ }
14
+ }
15
+ exports.DuckDBIntegerLiteralType = DuckDBIntegerLiteralType;
16
+ exports.INTEGER_LITERAL = DuckDBIntegerLiteralType.instance;
@@ -0,0 +1,12 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ export declare class DuckDBIntegerType extends BaseDuckDBType<DuckDBTypeId.INTEGER> {
4
+ constructor(alias?: string);
5
+ static readonly instance: DuckDBIntegerType;
6
+ static create(alias?: string): DuckDBIntegerType;
7
+ static readonly Max: number;
8
+ static readonly Min: number;
9
+ get max(): number;
10
+ get min(): number;
11
+ }
12
+ export declare const INTEGER: DuckDBIntegerType;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTEGER = exports.DuckDBIntegerType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ class DuckDBIntegerType extends BaseDuckDBType_1.BaseDuckDBType {
7
+ constructor(alias) {
8
+ super(DuckDBTypeId_1.DuckDBTypeId.INTEGER, alias);
9
+ }
10
+ static instance = new DuckDBIntegerType();
11
+ static create(alias) {
12
+ return alias ? new DuckDBIntegerType(alias) : DuckDBIntegerType.instance;
13
+ }
14
+ static Max = 2 ** 31 - 1;
15
+ static Min = -(2 ** 31);
16
+ get max() {
17
+ return DuckDBIntegerType.Max;
18
+ }
19
+ get min() {
20
+ return DuckDBIntegerType.Min;
21
+ }
22
+ }
23
+ exports.DuckDBIntegerType = DuckDBIntegerType;
24
+ exports.INTEGER = DuckDBIntegerType.instance;
@@ -0,0 +1,8 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ export declare class DuckDBIntervalType extends BaseDuckDBType<DuckDBTypeId.INTERVAL> {
4
+ constructor(alias?: string);
5
+ static readonly instance: DuckDBIntervalType;
6
+ static create(alias?: string): DuckDBIntervalType;
7
+ }
8
+ export declare const INTERVAL: DuckDBIntervalType;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTERVAL = exports.DuckDBIntervalType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ class DuckDBIntervalType extends BaseDuckDBType_1.BaseDuckDBType {
7
+ constructor(alias) {
8
+ super(DuckDBTypeId_1.DuckDBTypeId.INTERVAL, alias);
9
+ }
10
+ static instance = new DuckDBIntervalType();
11
+ static create(alias) {
12
+ return alias ? new DuckDBIntervalType(alias) : DuckDBIntervalType.instance;
13
+ }
14
+ }
15
+ exports.DuckDBIntervalType = DuckDBIntervalType;
16
+ exports.INTERVAL = DuckDBIntervalType.instance;
@@ -0,0 +1,13 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import type { DuckDBType } from './DuckDBType';
3
+ import { DuckDBLogicalType } from '../DuckDBLogicalType';
4
+ import { DuckDBTypeId } from '../DuckDBTypeId';
5
+ import { Json } from '../Json';
6
+ export declare class DuckDBListType extends BaseDuckDBType<DuckDBTypeId.LIST> {
7
+ readonly valueType: DuckDBType;
8
+ constructor(valueType: DuckDBType, alias?: string);
9
+ toString(): string;
10
+ toLogicalType(): DuckDBLogicalType;
11
+ toJson(): Json;
12
+ }
13
+ export declare function LIST(valueType: DuckDBType, alias?: string): DuckDBListType;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DuckDBListType = void 0;
4
+ exports.LIST = LIST;
5
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
6
+ const DuckDBLogicalType_1 = require("../DuckDBLogicalType");
7
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
8
+ class DuckDBListType extends BaseDuckDBType_1.BaseDuckDBType {
9
+ valueType;
10
+ constructor(valueType, alias) {
11
+ super(DuckDBTypeId_1.DuckDBTypeId.LIST, alias);
12
+ this.valueType = valueType;
13
+ }
14
+ toString() {
15
+ return `${this.valueType}[]`;
16
+ }
17
+ toLogicalType() {
18
+ const logicalType = DuckDBLogicalType_1.DuckDBLogicalType.createList(this.valueType.toLogicalType());
19
+ if (this.alias) {
20
+ logicalType.alias = this.alias;
21
+ }
22
+ return logicalType;
23
+ }
24
+ toJson() {
25
+ return {
26
+ typeId: this.typeId,
27
+ valueType: this.valueType.toJson(),
28
+ ...(this.alias ? { alias: this.alias } : {}),
29
+ };
30
+ }
31
+ }
32
+ exports.DuckDBListType = DuckDBListType;
33
+ function LIST(valueType, alias) {
34
+ return new DuckDBListType(valueType, alias);
35
+ }
@@ -0,0 +1,14 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import type { DuckDBType } from './DuckDBType';
3
+ import { DuckDBLogicalType } from '../DuckDBLogicalType';
4
+ import { DuckDBTypeId } from '../DuckDBTypeId';
5
+ import { Json } from '../Json';
6
+ export declare class DuckDBMapType extends BaseDuckDBType<DuckDBTypeId.MAP> {
7
+ readonly keyType: DuckDBType;
8
+ readonly valueType: DuckDBType;
9
+ constructor(keyType: DuckDBType, valueType: DuckDBType, alias?: string);
10
+ toString(): string;
11
+ toLogicalType(): DuckDBLogicalType;
12
+ toJson(): Json;
13
+ }
14
+ export declare function MAP(keyType: DuckDBType, valueType: DuckDBType, alias?: string): DuckDBMapType;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DuckDBMapType = void 0;
4
+ exports.MAP = MAP;
5
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
6
+ const DuckDBLogicalType_1 = require("../DuckDBLogicalType");
7
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
8
+ class DuckDBMapType extends BaseDuckDBType_1.BaseDuckDBType {
9
+ keyType;
10
+ valueType;
11
+ constructor(keyType, valueType, alias) {
12
+ super(DuckDBTypeId_1.DuckDBTypeId.MAP, alias);
13
+ this.keyType = keyType;
14
+ this.valueType = valueType;
15
+ }
16
+ toString() {
17
+ return `MAP(${this.keyType}, ${this.valueType})`;
18
+ }
19
+ toLogicalType() {
20
+ const logicalType = DuckDBLogicalType_1.DuckDBLogicalType.createMap(this.keyType.toLogicalType(), this.valueType.toLogicalType());
21
+ if (this.alias) {
22
+ logicalType.alias = this.alias;
23
+ }
24
+ return logicalType;
25
+ }
26
+ toJson() {
27
+ return {
28
+ typeId: this.typeId,
29
+ keyType: this.keyType.toJson(),
30
+ valueType: this.valueType.toJson(),
31
+ ...(this.alias ? { alias: this.alias } : {}),
32
+ };
33
+ }
34
+ }
35
+ exports.DuckDBMapType = DuckDBMapType;
36
+ function MAP(keyType, valueType, alias) {
37
+ return new DuckDBMapType(keyType, valueType, alias);
38
+ }
@@ -0,0 +1,10 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ export declare class DuckDBSQLNullType extends BaseDuckDBType<DuckDBTypeId.SQLNULL> {
4
+ constructor(alias?: string);
5
+ /** DuckDB's name for the type, quoted because NULL is a keyword. */
6
+ toString(): string;
7
+ static readonly instance: DuckDBSQLNullType;
8
+ static create(alias?: string): DuckDBSQLNullType;
9
+ }
10
+ export declare const SQLNULL: DuckDBSQLNullType;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SQLNULL = exports.DuckDBSQLNullType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ class DuckDBSQLNullType extends BaseDuckDBType_1.BaseDuckDBType {
7
+ constructor(alias) {
8
+ super(DuckDBTypeId_1.DuckDBTypeId.SQLNULL, alias);
9
+ }
10
+ /** DuckDB's name for the type, quoted because NULL is a keyword. */
11
+ toString() {
12
+ return '"NULL"';
13
+ }
14
+ static instance = new DuckDBSQLNullType();
15
+ static create(alias) {
16
+ return alias ? new DuckDBSQLNullType(alias) : DuckDBSQLNullType.instance;
17
+ }
18
+ }
19
+ exports.DuckDBSQLNullType = DuckDBSQLNullType;
20
+ exports.SQLNULL = DuckDBSQLNullType.instance;
@@ -0,0 +1,12 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ export declare class DuckDBSmallIntType extends BaseDuckDBType<DuckDBTypeId.SMALLINT> {
4
+ constructor(alias?: string);
5
+ static readonly instance: DuckDBSmallIntType;
6
+ static create(alias?: string): DuckDBSmallIntType;
7
+ static readonly Max: number;
8
+ static readonly Min: number;
9
+ get max(): number;
10
+ get min(): number;
11
+ }
12
+ export declare const SMALLINT: DuckDBSmallIntType;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SMALLINT = exports.DuckDBSmallIntType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ class DuckDBSmallIntType extends BaseDuckDBType_1.BaseDuckDBType {
7
+ constructor(alias) {
8
+ super(DuckDBTypeId_1.DuckDBTypeId.SMALLINT, alias);
9
+ }
10
+ static instance = new DuckDBSmallIntType();
11
+ static create(alias) {
12
+ return alias ? new DuckDBSmallIntType(alias) : DuckDBSmallIntType.instance;
13
+ }
14
+ static Max = 2 ** 15 - 1;
15
+ static Min = -(2 ** 15);
16
+ get max() {
17
+ return DuckDBSmallIntType.Max;
18
+ }
19
+ get min() {
20
+ return DuckDBSmallIntType.Min;
21
+ }
22
+ }
23
+ exports.DuckDBSmallIntType = DuckDBSmallIntType;
24
+ exports.SMALLINT = DuckDBSmallIntType.instance;
@@ -0,0 +1,8 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ export declare class DuckDBStringLiteralType extends BaseDuckDBType<DuckDBTypeId.STRING_LITERAL> {
4
+ constructor(alias?: string);
5
+ static readonly instance: DuckDBStringLiteralType;
6
+ static create(alias?: string): DuckDBStringLiteralType;
7
+ }
8
+ export declare const STRING_LITERAL: DuckDBStringLiteralType;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STRING_LITERAL = exports.DuckDBStringLiteralType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ class DuckDBStringLiteralType extends BaseDuckDBType_1.BaseDuckDBType {
7
+ constructor(alias) {
8
+ super(DuckDBTypeId_1.DuckDBTypeId.STRING_LITERAL, alias);
9
+ }
10
+ static instance = new DuckDBStringLiteralType();
11
+ static create(alias) {
12
+ return alias ? new DuckDBStringLiteralType(alias) : DuckDBStringLiteralType.instance;
13
+ }
14
+ }
15
+ exports.DuckDBStringLiteralType = DuckDBStringLiteralType;
16
+ exports.STRING_LITERAL = DuckDBStringLiteralType.instance;
@@ -0,0 +1,29 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import type { DuckDBType } from './DuckDBType';
3
+ import { DuckDBLogicalType } from '../DuckDBLogicalType';
4
+ import { DuckDBTypeId } from '../DuckDBTypeId';
5
+ import { Json } from '../Json';
6
+ export declare class DuckDBStructType extends BaseDuckDBType<DuckDBTypeId.STRUCT> {
7
+ readonly entryNames: readonly string[];
8
+ readonly entryTypes: readonly DuckDBType[];
9
+ readonly entryIndexes: Readonly<Record<string, number>>;
10
+ constructor(entryNames: readonly string[], entryTypes: readonly DuckDBType[], alias?: string);
11
+ get entryCount(): number;
12
+ /**
13
+ * Whether this is an unnamed struct, i.e. a tuple, such as the type of
14
+ * `(1, 'a')` or `row(1, 'a')`. DuckDB reports these as STRUCTs whose entry
15
+ * names are all empty. A STRUCT with no entries is not a tuple.
16
+ *
17
+ * Values of a tuple type are `DuckDBTupleValue`s, whose items are
18
+ * positional, rather than `DuckDBStructValue`s.
19
+ */
20
+ get isTuple(): boolean;
21
+ indexForEntry(entryName: string): number;
22
+ typeForEntry(entryName: string): DuckDBType;
23
+ toString(): string;
24
+ toLogicalType(): DuckDBLogicalType;
25
+ toJson(): Json;
26
+ }
27
+ export declare function STRUCT(entries: Record<string, DuckDBType>, alias?: string): DuckDBStructType;
28
+ /** Creates a tuple type: an unnamed STRUCT with the given entry types. */
29
+ export declare function TUPLE(entryTypes: readonly DuckDBType[], alias?: string): DuckDBStructType;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DuckDBStructType = void 0;
4
+ exports.STRUCT = STRUCT;
5
+ exports.TUPLE = TUPLE;
6
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
7
+ const DuckDBLogicalType_1 = require("../DuckDBLogicalType");
8
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
9
+ const sql_1 = require("../sql");
10
+ class DuckDBStructType extends BaseDuckDBType_1.BaseDuckDBType {
11
+ entryNames;
12
+ entryTypes;
13
+ entryIndexes;
14
+ constructor(entryNames, entryTypes, alias) {
15
+ super(DuckDBTypeId_1.DuckDBTypeId.STRUCT, alias);
16
+ if (entryNames.length !== entryTypes.length) {
17
+ throw new Error(`Could not create DuckDBStructType: \
18
+ entryNames length (${entryNames.length}) does not match entryTypes length (${entryTypes.length})`);
19
+ }
20
+ this.entryNames = entryNames;
21
+ this.entryTypes = entryTypes;
22
+ const entryIndexes = {};
23
+ for (let i = 0; i < entryNames.length; i++) {
24
+ entryIndexes[entryNames[i]] = i;
25
+ }
26
+ this.entryIndexes = entryIndexes;
27
+ }
28
+ get entryCount() {
29
+ return this.entryNames.length;
30
+ }
31
+ /**
32
+ * Whether this is an unnamed struct, i.e. a tuple, such as the type of
33
+ * `(1, 'a')` or `row(1, 'a')`. DuckDB reports these as STRUCTs whose entry
34
+ * names are all empty. A STRUCT with no entries is not a tuple.
35
+ *
36
+ * Values of a tuple type are `DuckDBTupleValue`s, whose items are
37
+ * positional, rather than `DuckDBStructValue`s.
38
+ */
39
+ get isTuple() {
40
+ return (this.entryNames.length > 0 && this.entryNames.every((name) => name === ''));
41
+ }
42
+ indexForEntry(entryName) {
43
+ return this.entryIndexes[entryName];
44
+ }
45
+ typeForEntry(entryName) {
46
+ return this.entryTypes[this.entryIndexes[entryName]];
47
+ }
48
+ toString() {
49
+ if (this.entryNames.length === 0) {
50
+ return 'STRUCT';
51
+ }
52
+ if (this.isTuple) {
53
+ return `TUPLE(${this.entryTypes.join(', ')})`;
54
+ }
55
+ const parts = [];
56
+ for (let i = 0; i < this.entryNames.length; i++) {
57
+ parts.push(`${(0, sql_1.quotedIdentifier)(this.entryNames[i])} ${this.entryTypes[i]}`);
58
+ }
59
+ return `STRUCT(${parts.join(', ')})`;
60
+ }
61
+ toLogicalType() {
62
+ const logicalType = DuckDBLogicalType_1.DuckDBLogicalType.createStruct(this.entryNames, this.entryTypes.map((t) => t.toLogicalType()));
63
+ if (this.alias) {
64
+ logicalType.alias = this.alias;
65
+ }
66
+ return logicalType;
67
+ }
68
+ toJson() {
69
+ return {
70
+ typeId: this.typeId,
71
+ entryNames: [...this.entryNames],
72
+ entryTypes: this.entryTypes.map(t => t.toJson()),
73
+ ...(this.alias ? { alias: this.alias } : {}),
74
+ };
75
+ }
76
+ }
77
+ exports.DuckDBStructType = DuckDBStructType;
78
+ function STRUCT(entries, alias) {
79
+ const entryNames = Object.keys(entries);
80
+ const entryTypes = Object.values(entries);
81
+ return new DuckDBStructType(entryNames, entryTypes, alias);
82
+ }
83
+ /** Creates a tuple type: an unnamed STRUCT with the given entry types. */
84
+ function TUPLE(entryTypes, alias) {
85
+ return new DuckDBStructType(entryTypes.map(() => ''), entryTypes, alias);
86
+ }
@@ -0,0 +1,11 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ import { DuckDBTimeNSValue } from '../values';
4
+ export declare class DuckDBTimeNSType extends BaseDuckDBType<DuckDBTypeId.TIME_NS> {
5
+ constructor(alias?: string);
6
+ static readonly instance: DuckDBTimeNSType;
7
+ static create(alias?: string): DuckDBTimeNSType;
8
+ get max(): DuckDBTimeNSValue;
9
+ get min(): DuckDBTimeNSValue;
10
+ }
11
+ export declare const TIME_NS: DuckDBTimeNSType;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TIME_NS = exports.DuckDBTimeNSType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ const values_1 = require("../values");
7
+ class DuckDBTimeNSType extends BaseDuckDBType_1.BaseDuckDBType {
8
+ constructor(alias) {
9
+ super(DuckDBTypeId_1.DuckDBTypeId.TIME_NS, alias);
10
+ }
11
+ static instance = new DuckDBTimeNSType();
12
+ static create(alias) {
13
+ return alias ? new DuckDBTimeNSType(alias) : DuckDBTimeNSType.instance;
14
+ }
15
+ get max() {
16
+ return values_1.DuckDBTimeNSValue.Max;
17
+ }
18
+ get min() {
19
+ return values_1.DuckDBTimeNSValue.Min;
20
+ }
21
+ }
22
+ exports.DuckDBTimeNSType = DuckDBTimeNSType;
23
+ exports.TIME_NS = DuckDBTimeNSType.instance;
@@ -0,0 +1,12 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ import { DuckDBTimeTZValue } from '../values';
4
+ export declare class DuckDBTimeTZType extends BaseDuckDBType<DuckDBTypeId.TIME_TZ> {
5
+ constructor(alias?: string);
6
+ toString(): string;
7
+ static readonly instance: DuckDBTimeTZType;
8
+ static create(alias?: string): DuckDBTimeTZType;
9
+ get max(): DuckDBTimeTZValue;
10
+ get min(): DuckDBTimeTZValue;
11
+ }
12
+ export declare const TIMETZ: DuckDBTimeTZType;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TIMETZ = exports.DuckDBTimeTZType = void 0;
4
+ const BaseDuckDBType_1 = require("./BaseDuckDBType");
5
+ const DuckDBTypeId_1 = require("../DuckDBTypeId");
6
+ const values_1 = require("../values");
7
+ class DuckDBTimeTZType extends BaseDuckDBType_1.BaseDuckDBType {
8
+ constructor(alias) {
9
+ super(DuckDBTypeId_1.DuckDBTypeId.TIME_TZ, alias);
10
+ }
11
+ toString() {
12
+ return 'TIME WITH TIME ZONE';
13
+ }
14
+ static instance = new DuckDBTimeTZType();
15
+ static create(alias) {
16
+ return alias ? new DuckDBTimeTZType(alias) : DuckDBTimeTZType.instance;
17
+ }
18
+ get max() {
19
+ return values_1.DuckDBTimeTZValue.Max;
20
+ }
21
+ get min() {
22
+ return values_1.DuckDBTimeTZValue.Min;
23
+ }
24
+ }
25
+ exports.DuckDBTimeTZType = DuckDBTimeTZType;
26
+ exports.TIMETZ = DuckDBTimeTZType.instance;
@@ -0,0 +1,11 @@
1
+ import { BaseDuckDBType } from './BaseDuckDBType';
2
+ import { DuckDBTypeId } from '../DuckDBTypeId';
3
+ import { DuckDBTimeValue } from '../values';
4
+ export declare class DuckDBTimeType extends BaseDuckDBType<DuckDBTypeId.TIME> {
5
+ constructor(alias?: string);
6
+ static readonly instance: DuckDBTimeType;
7
+ static create(alias?: string): DuckDBTimeType;
8
+ get max(): DuckDBTimeValue;
9
+ get min(): DuckDBTimeValue;
10
+ }
11
+ export declare const TIME: DuckDBTimeType;