@nshiab/simple-data-analysis-core 2.0.9 → 2.1.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 (453) hide show
  1. package/esm/class/SDAError.d.ts +6 -6
  2. package/esm/class/SDAError.js +6 -6
  3. package/esm/class/Simple.d.ts +9 -9
  4. package/esm/class/Simple.js +9 -9
  5. package/esm/class/SimpleDB.d.ts +80 -76
  6. package/esm/class/SimpleDB.d.ts.map +1 -1
  7. package/esm/class/SimpleDB.js +80 -76
  8. package/esm/class/SimpleTable.d.ts +2795 -1139
  9. package/esm/class/SimpleTable.d.ts.map +1 -1
  10. package/esm/class/SimpleTable.js +2781 -1149
  11. package/esm/helpers/buildApproximateMutualReachabilityMst.d.ts +45 -0
  12. package/esm/helpers/buildApproximateMutualReachabilityMst.d.ts.map +1 -0
  13. package/esm/helpers/buildApproximateMutualReachabilityMst.js +212 -0
  14. package/esm/helpers/buildChronologicalGraphComponentsSql.d.ts +14 -0
  15. package/esm/helpers/buildChronologicalGraphComponentsSql.d.ts.map +1 -0
  16. package/esm/helpers/buildChronologicalGraphComponentsSql.js +167 -0
  17. package/esm/helpers/buildExactMutualReachabilityMst.d.ts +28 -0
  18. package/esm/helpers/buildExactMutualReachabilityMst.d.ts.map +1 -0
  19. package/esm/helpers/buildExactMutualReachabilityMst.js +97 -0
  20. package/esm/helpers/buildGraphTemporalCostStateSql.d.ts +12 -0
  21. package/esm/helpers/buildGraphTemporalCostStateSql.d.ts.map +1 -0
  22. package/esm/helpers/buildGraphTemporalCostStateSql.js +86 -0
  23. package/esm/helpers/buildGraphTemporalReachabilitySql.d.ts +13 -0
  24. package/esm/helpers/buildGraphTemporalReachabilitySql.d.ts.map +1 -0
  25. package/esm/helpers/buildGraphTemporalReachabilitySql.js +70 -0
  26. package/esm/helpers/buildSparseMutualReachabilityMst.d.ts +10 -0
  27. package/esm/helpers/buildSparseMutualReachabilityMst.d.ts.map +1 -0
  28. package/esm/helpers/buildSparseMutualReachabilityMst.js +47 -0
  29. package/esm/helpers/buildUmapGraph.d.ts +2 -5
  30. package/esm/helpers/buildUmapGraph.d.ts.map +1 -1
  31. package/esm/helpers/buildUmapGraph.js +6 -100
  32. package/esm/helpers/buildVectorNeighbors.d.ts +45 -0
  33. package/esm/helpers/buildVectorNeighbors.d.ts.map +1 -0
  34. package/esm/helpers/buildVectorNeighbors.js +170 -0
  35. package/esm/helpers/buildWeakGraphComponentsSql.d.ts +3 -0
  36. package/esm/helpers/buildWeakGraphComponentsSql.d.ts.map +1 -0
  37. package/esm/helpers/buildWeakGraphComponentsSql.js +32 -0
  38. package/esm/helpers/camelCase.d.ts +7 -5
  39. package/esm/helpers/camelCase.d.ts.map +1 -1
  40. package/esm/helpers/camelCase.js +7 -5
  41. package/esm/helpers/capitalize.d.ts +6 -4
  42. package/esm/helpers/capitalize.d.ts.map +1 -1
  43. package/esm/helpers/capitalize.js +6 -4
  44. package/esm/helpers/clusterHdbscan.d.ts +18 -0
  45. package/esm/helpers/clusterHdbscan.d.ts.map +1 -0
  46. package/esm/helpers/clusterHdbscan.js +342 -0
  47. package/esm/helpers/computeCovariance.d.ts +16 -0
  48. package/esm/helpers/computeCovariance.d.ts.map +1 -0
  49. package/esm/helpers/computeCovariance.js +99 -0
  50. package/esm/helpers/computeMahalanobisDistances.d.ts +14 -0
  51. package/esm/helpers/computeMahalanobisDistances.d.ts.map +1 -0
  52. package/esm/helpers/computeMahalanobisDistances.js +87 -0
  53. package/esm/helpers/createDirectory.d.ts +4 -3
  54. package/esm/helpers/createDirectory.d.ts.map +1 -1
  55. package/esm/helpers/createDirectory.js +4 -3
  56. package/esm/helpers/dataToArrays.d.ts +6 -4
  57. package/esm/helpers/dataToArrays.d.ts.map +1 -1
  58. package/esm/helpers/dataToArrays.js +6 -4
  59. package/esm/helpers/extractTypes.d.ts +1 -1
  60. package/esm/helpers/extractTypes.js +4 -9
  61. package/esm/helpers/factorCovariance.d.ts +17 -0
  62. package/esm/helpers/factorCovariance.d.ts.map +1 -0
  63. package/esm/helpers/factorCovariance.js +189 -0
  64. package/esm/helpers/findGeoColumn.d.ts +6 -4
  65. package/esm/helpers/findGeoColumn.d.ts.map +1 -1
  66. package/esm/helpers/findGeoColumn.js +6 -4
  67. package/esm/helpers/findGeoColumnFromSchema.d.ts +8 -5
  68. package/esm/helpers/findGeoColumnFromSchema.d.ts.map +1 -1
  69. package/esm/helpers/findGeoColumnFromSchema.js +8 -5
  70. package/esm/helpers/formatDate.d.ts +12 -6
  71. package/esm/helpers/formatDate.d.ts.map +1 -1
  72. package/esm/helpers/formatDate.js +12 -6
  73. package/esm/helpers/formatMissingTables.d.ts +8 -5
  74. package/esm/helpers/formatMissingTables.d.ts.map +1 -1
  75. package/esm/helpers/formatMissingTables.js +8 -5
  76. package/esm/helpers/formatNumber.d.ts +19 -10
  77. package/esm/helpers/formatNumber.d.ts.map +1 -1
  78. package/esm/helpers/formatNumber.js +32 -17
  79. package/esm/helpers/getGraphEdgeIdColumn.d.ts +9 -0
  80. package/esm/helpers/getGraphEdgeIdColumn.d.ts.map +1 -0
  81. package/esm/helpers/getGraphEdgeIdColumn.js +25 -0
  82. package/esm/helpers/getGraphEndpointColumns.d.ts +11 -0
  83. package/esm/helpers/getGraphEndpointColumns.d.ts.map +1 -0
  84. package/esm/helpers/getGraphEndpointColumns.js +160 -0
  85. package/esm/helpers/getGraphWeightColumn.d.ts +10 -0
  86. package/esm/helpers/getGraphWeightColumn.d.ts.map +1 -0
  87. package/esm/helpers/getGraphWeightColumn.js +40 -0
  88. package/esm/helpers/graphRouteResultSchema.d.ts +4 -0
  89. package/esm/helpers/graphRouteResultSchema.d.ts.map +1 -0
  90. package/esm/helpers/graphRouteResultSchema.js +12 -0
  91. package/esm/helpers/graphRouteResultSelect.d.ts +4 -0
  92. package/esm/helpers/graphRouteResultSelect.d.ts.map +1 -0
  93. package/esm/helpers/graphRouteResultSelect.js +22 -0
  94. package/esm/helpers/hasGeometryColumn.d.ts +4 -3
  95. package/esm/helpers/hasGeometryColumn.d.ts.map +1 -1
  96. package/esm/helpers/hasGeometryColumn.js +4 -3
  97. package/esm/helpers/inspectGraphConnectivity.d.ts +10 -0
  98. package/esm/helpers/inspectGraphConnectivity.d.ts.map +1 -0
  99. package/esm/helpers/inspectGraphConnectivity.js +55 -0
  100. package/esm/helpers/mergeOptions.d.ts +24 -13
  101. package/esm/helpers/mergeOptions.d.ts.map +1 -1
  102. package/esm/helpers/mergeOptions.js +24 -13
  103. package/esm/helpers/parseValue.d.ts +6 -4
  104. package/esm/helpers/parseValue.d.ts.map +1 -1
  105. package/esm/helpers/parseValue.js +6 -4
  106. package/esm/helpers/prepareGraphRouteSql.d.ts +31 -0
  107. package/esm/helpers/prepareGraphRouteSql.d.ts.map +1 -0
  108. package/esm/helpers/prepareGraphRouteSql.js +86 -0
  109. package/esm/helpers/prepareGraphStarts.d.ts +9 -0
  110. package/esm/helpers/prepareGraphStarts.d.ts.map +1 -0
  111. package/esm/helpers/prepareGraphStarts.js +68 -0
  112. package/esm/helpers/prepareGraphTemporalSql.d.ts +28 -0
  113. package/esm/helpers/prepareGraphTemporalSql.d.ts.map +1 -0
  114. package/esm/helpers/prepareGraphTemporalSql.js +154 -0
  115. package/esm/helpers/prepareGraphTraversal.d.ts +19 -0
  116. package/esm/helpers/prepareGraphTraversal.d.ts.map +1 -0
  117. package/esm/helpers/prepareGraphTraversal.js +79 -0
  118. package/esm/helpers/prepareNumericFeatures.d.ts +41 -0
  119. package/esm/helpers/prepareNumericFeatures.d.ts.map +1 -0
  120. package/esm/helpers/prepareNumericFeatures.js +210 -0
  121. package/esm/helpers/prettyDuration.d.ts +14 -8
  122. package/esm/helpers/prettyDuration.d.ts.map +1 -1
  123. package/esm/helpers/prettyDuration.js +14 -8
  124. package/esm/helpers/printTable.d.ts +18 -13
  125. package/esm/helpers/printTable.d.ts.map +1 -1
  126. package/esm/helpers/printTable.js +18 -13
  127. package/esm/helpers/publishPreparedColumns.d.ts +37 -0
  128. package/esm/helpers/publishPreparedColumns.d.ts.map +1 -0
  129. package/esm/helpers/publishPreparedColumns.js +113 -0
  130. package/esm/helpers/queryDB.d.ts +24 -13
  131. package/esm/helpers/queryDB.d.ts.map +1 -1
  132. package/esm/helpers/queryDB.js +24 -13
  133. package/esm/helpers/queueAsyncBarrier.d.ts +12 -7
  134. package/esm/helpers/queueAsyncBarrier.d.ts.map +1 -1
  135. package/esm/helpers/queueAsyncBarrier.js +12 -7
  136. package/esm/helpers/queueGraphResult.d.ts +18 -0
  137. package/esm/helpers/queueGraphResult.d.ts.map +1 -0
  138. package/esm/helpers/queueGraphResult.js +39 -0
  139. package/esm/helpers/quoteIdentifier.d.ts +4 -3
  140. package/esm/helpers/quoteIdentifier.d.ts.map +1 -1
  141. package/esm/helpers/quoteIdentifier.js +4 -3
  142. package/esm/helpers/quoteQualifiedIdentifier.d.ts +6 -4
  143. package/esm/helpers/quoteQualifiedIdentifier.d.ts.map +1 -1
  144. package/esm/helpers/quoteQualifiedIdentifier.js +6 -4
  145. package/esm/helpers/runQuery.d.ts.map +1 -1
  146. package/esm/helpers/runQuery.js +17 -3
  147. package/esm/helpers/selectFuzzyReplacements.d.ts +11 -0
  148. package/esm/helpers/selectFuzzyReplacements.d.ts.map +1 -0
  149. package/esm/helpers/selectFuzzyReplacements.js +124 -0
  150. package/esm/helpers/stabilizeCosineVectors.d.ts +14 -0
  151. package/esm/helpers/stabilizeCosineVectors.d.ts.map +1 -0
  152. package/esm/helpers/stabilizeCosineVectors.js +34 -0
  153. package/esm/helpers/stringToArray.d.ts +4 -3
  154. package/esm/helpers/stringToArray.d.ts.map +1 -1
  155. package/esm/helpers/stringToArray.js +4 -3
  156. package/esm/helpers/updateColumnsWithJS.d.ts +12 -6
  157. package/esm/helpers/updateColumnsWithJS.d.ts.map +1 -1
  158. package/esm/helpers/updateColumnsWithJS.js +12 -6
  159. package/esm/helpers/validateGraphRouteResultSchema.d.ts +4 -0
  160. package/esm/helpers/validateGraphRouteResultSchema.d.ts.map +1 -0
  161. package/esm/helpers/validateGraphRouteResultSchema.js +13 -0
  162. package/esm/helpers/validateGraphTemporalEvents.d.ts +7 -0
  163. package/esm/helpers/validateGraphTemporalEvents.d.ts.map +1 -0
  164. package/esm/helpers/validateGraphTemporalEvents.js +47 -0
  165. package/esm/helpers/validateNumericalAnalysis.d.ts +10 -6
  166. package/esm/helpers/validateNumericalAnalysis.d.ts.map +1 -1
  167. package/esm/helpers/validateNumericalAnalysis.js +10 -6
  168. package/esm/helpers/validateVectorRowIds.d.ts +4 -0
  169. package/esm/helpers/validateVectorRowIds.d.ts.map +1 -0
  170. package/esm/helpers/validateVectorRowIds.js +16 -0
  171. package/esm/helpers/vectorDistanceExpression.d.ts +6 -0
  172. package/esm/helpers/vectorDistanceExpression.d.ts.map +1 -0
  173. package/esm/helpers/vectorDistanceExpression.js +11 -0
  174. package/esm/helpers/wrapString.d.ts +10 -7
  175. package/esm/helpers/wrapString.d.ts.map +1 -1
  176. package/esm/helpers/wrapString.js +10 -7
  177. package/esm/methods/addId.d.ts +5 -0
  178. package/esm/methods/addId.d.ts.map +1 -0
  179. package/esm/methods/addId.js +38 -0
  180. package/esm/methods/commonNeighbors.d.ts +10 -0
  181. package/esm/methods/commonNeighbors.d.ts.map +1 -0
  182. package/esm/methods/commonNeighbors.js +101 -0
  183. package/esm/methods/connectedComponents.d.ts +9 -0
  184. package/esm/methods/connectedComponents.d.ts.map +1 -0
  185. package/esm/methods/connectedComponents.js +147 -0
  186. package/esm/methods/degree.d.ts +9 -0
  187. package/esm/methods/degree.d.ts.map +1 -0
  188. package/esm/methods/degree.js +135 -0
  189. package/esm/methods/distances.d.ts +12 -0
  190. package/esm/methods/distances.d.ts.map +1 -0
  191. package/esm/methods/distances.js +164 -0
  192. package/esm/methods/findCycles.d.ts +12 -0
  193. package/esm/methods/findCycles.d.ts.map +1 -0
  194. package/esm/methods/findCycles.js +330 -0
  195. package/esm/methods/fuzzyClean.d.ts.map +1 -1
  196. package/esm/methods/fuzzyClean.js +17 -136
  197. package/esm/methods/fuzzyJoin.js +70 -16
  198. package/esm/methods/getTypes.d.ts +1 -1
  199. package/esm/methods/hdbscan.d.ts +5 -0
  200. package/esm/methods/hdbscan.d.ts.map +1 -0
  201. package/esm/methods/hdbscan.js +208 -0
  202. package/esm/methods/mahalanobis.d.ts +5 -0
  203. package/esm/methods/mahalanobis.d.ts.map +1 -0
  204. package/esm/methods/mahalanobis.js +92 -0
  205. package/esm/methods/neighbors.d.ts +9 -0
  206. package/esm/methods/neighbors.d.ts.map +1 -0
  207. package/esm/methods/neighbors.js +81 -0
  208. package/esm/methods/normalizeVector.d.ts +5 -0
  209. package/esm/methods/normalizeVector.d.ts.map +1 -0
  210. package/esm/methods/normalizeVector.js +132 -0
  211. package/esm/methods/paths.d.ts +12 -0
  212. package/esm/methods/paths.d.ts.map +1 -0
  213. package/esm/methods/paths.js +287 -0
  214. package/esm/methods/reachable.d.ts +11 -0
  215. package/esm/methods/reachable.d.ts.map +1 -0
  216. package/esm/methods/reachable.js +131 -0
  217. package/esm/methods/rowToVector.d.ts +5 -0
  218. package/esm/methods/rowToVector.d.ts.map +1 -0
  219. package/esm/methods/rowToVector.js +77 -0
  220. package/esm/methods/shortestPath.d.ts +12 -0
  221. package/esm/methods/shortestPath.d.ts.map +1 -0
  222. package/esm/methods/shortestPath.js +337 -0
  223. package/esm/methods/topologicalSort.d.ts +7 -0
  224. package/esm/methods/topologicalSort.d.ts.map +1 -0
  225. package/esm/methods/topologicalSort.js +164 -0
  226. package/llm.md +2106 -143
  227. package/llms.txt +1 -1
  228. package/package.json +1 -1
  229. package/script/class/SDAError.d.ts +6 -6
  230. package/script/class/SDAError.js +6 -6
  231. package/script/class/Simple.d.ts +9 -9
  232. package/script/class/Simple.js +9 -9
  233. package/script/class/SimpleDB.d.ts +80 -76
  234. package/script/class/SimpleDB.d.ts.map +1 -1
  235. package/script/class/SimpleDB.js +80 -76
  236. package/script/class/SimpleTable.d.ts +2795 -1139
  237. package/script/class/SimpleTable.d.ts.map +1 -1
  238. package/script/class/SimpleTable.js +2781 -1149
  239. package/script/helpers/buildApproximateMutualReachabilityMst.d.ts +45 -0
  240. package/script/helpers/buildApproximateMutualReachabilityMst.d.ts.map +1 -0
  241. package/script/helpers/buildApproximateMutualReachabilityMst.js +219 -0
  242. package/script/helpers/buildChronologicalGraphComponentsSql.d.ts +14 -0
  243. package/script/helpers/buildChronologicalGraphComponentsSql.d.ts.map +1 -0
  244. package/script/helpers/buildChronologicalGraphComponentsSql.js +174 -0
  245. package/script/helpers/buildExactMutualReachabilityMst.d.ts +28 -0
  246. package/script/helpers/buildExactMutualReachabilityMst.d.ts.map +1 -0
  247. package/script/helpers/buildExactMutualReachabilityMst.js +103 -0
  248. package/script/helpers/buildGraphTemporalCostStateSql.d.ts +12 -0
  249. package/script/helpers/buildGraphTemporalCostStateSql.d.ts.map +1 -0
  250. package/script/helpers/buildGraphTemporalCostStateSql.js +92 -0
  251. package/script/helpers/buildGraphTemporalReachabilitySql.d.ts +13 -0
  252. package/script/helpers/buildGraphTemporalReachabilitySql.d.ts.map +1 -0
  253. package/script/helpers/buildGraphTemporalReachabilitySql.js +76 -0
  254. package/script/helpers/buildSparseMutualReachabilityMst.d.ts +10 -0
  255. package/script/helpers/buildSparseMutualReachabilityMst.d.ts.map +1 -0
  256. package/script/helpers/buildSparseMutualReachabilityMst.js +50 -0
  257. package/script/helpers/buildUmapGraph.d.ts +2 -5
  258. package/script/helpers/buildUmapGraph.d.ts.map +1 -1
  259. package/script/helpers/buildUmapGraph.js +6 -100
  260. package/script/helpers/buildVectorNeighbors.d.ts +45 -0
  261. package/script/helpers/buildVectorNeighbors.d.ts.map +1 -0
  262. package/script/helpers/buildVectorNeighbors.js +176 -0
  263. package/script/helpers/buildWeakGraphComponentsSql.d.ts +3 -0
  264. package/script/helpers/buildWeakGraphComponentsSql.d.ts.map +1 -0
  265. package/script/helpers/buildWeakGraphComponentsSql.js +38 -0
  266. package/script/helpers/camelCase.d.ts +7 -5
  267. package/script/helpers/camelCase.d.ts.map +1 -1
  268. package/script/helpers/camelCase.js +7 -5
  269. package/script/helpers/capitalize.d.ts +6 -4
  270. package/script/helpers/capitalize.d.ts.map +1 -1
  271. package/script/helpers/capitalize.js +6 -4
  272. package/script/helpers/clusterHdbscan.d.ts +18 -0
  273. package/script/helpers/clusterHdbscan.d.ts.map +1 -0
  274. package/script/helpers/clusterHdbscan.js +346 -0
  275. package/script/helpers/computeCovariance.d.ts +16 -0
  276. package/script/helpers/computeCovariance.d.ts.map +1 -0
  277. package/script/helpers/computeCovariance.js +105 -0
  278. package/script/helpers/computeMahalanobisDistances.d.ts +14 -0
  279. package/script/helpers/computeMahalanobisDistances.d.ts.map +1 -0
  280. package/script/helpers/computeMahalanobisDistances.js +93 -0
  281. package/script/helpers/createDirectory.d.ts +4 -3
  282. package/script/helpers/createDirectory.d.ts.map +1 -1
  283. package/script/helpers/createDirectory.js +4 -3
  284. package/script/helpers/dataToArrays.d.ts +6 -4
  285. package/script/helpers/dataToArrays.d.ts.map +1 -1
  286. package/script/helpers/dataToArrays.js +6 -4
  287. package/script/helpers/extractTypes.d.ts +1 -1
  288. package/script/helpers/extractTypes.js +4 -9
  289. package/script/helpers/factorCovariance.d.ts +17 -0
  290. package/script/helpers/factorCovariance.d.ts.map +1 -0
  291. package/script/helpers/factorCovariance.js +194 -0
  292. package/script/helpers/findGeoColumn.d.ts +6 -4
  293. package/script/helpers/findGeoColumn.d.ts.map +1 -1
  294. package/script/helpers/findGeoColumn.js +6 -4
  295. package/script/helpers/findGeoColumnFromSchema.d.ts +8 -5
  296. package/script/helpers/findGeoColumnFromSchema.d.ts.map +1 -1
  297. package/script/helpers/findGeoColumnFromSchema.js +8 -5
  298. package/script/helpers/formatDate.d.ts +12 -6
  299. package/script/helpers/formatDate.d.ts.map +1 -1
  300. package/script/helpers/formatDate.js +12 -6
  301. package/script/helpers/formatMissingTables.d.ts +8 -5
  302. package/script/helpers/formatMissingTables.d.ts.map +1 -1
  303. package/script/helpers/formatMissingTables.js +8 -5
  304. package/script/helpers/formatNumber.d.ts +19 -10
  305. package/script/helpers/formatNumber.d.ts.map +1 -1
  306. package/script/helpers/formatNumber.js +32 -17
  307. package/script/helpers/getGraphEdgeIdColumn.d.ts +9 -0
  308. package/script/helpers/getGraphEdgeIdColumn.d.ts.map +1 -0
  309. package/script/helpers/getGraphEdgeIdColumn.js +31 -0
  310. package/script/helpers/getGraphEndpointColumns.d.ts +11 -0
  311. package/script/helpers/getGraphEndpointColumns.d.ts.map +1 -0
  312. package/script/helpers/getGraphEndpointColumns.js +166 -0
  313. package/script/helpers/getGraphWeightColumn.d.ts +10 -0
  314. package/script/helpers/getGraphWeightColumn.d.ts.map +1 -0
  315. package/script/helpers/getGraphWeightColumn.js +46 -0
  316. package/script/helpers/graphRouteResultSchema.d.ts +4 -0
  317. package/script/helpers/graphRouteResultSchema.d.ts.map +1 -0
  318. package/script/helpers/graphRouteResultSchema.js +18 -0
  319. package/script/helpers/graphRouteResultSelect.d.ts +4 -0
  320. package/script/helpers/graphRouteResultSelect.d.ts.map +1 -0
  321. package/script/helpers/graphRouteResultSelect.js +28 -0
  322. package/script/helpers/hasGeometryColumn.d.ts +4 -3
  323. package/script/helpers/hasGeometryColumn.d.ts.map +1 -1
  324. package/script/helpers/hasGeometryColumn.js +4 -3
  325. package/script/helpers/inspectGraphConnectivity.d.ts +10 -0
  326. package/script/helpers/inspectGraphConnectivity.d.ts.map +1 -0
  327. package/script/helpers/inspectGraphConnectivity.js +58 -0
  328. package/script/helpers/mergeOptions.d.ts +24 -13
  329. package/script/helpers/mergeOptions.d.ts.map +1 -1
  330. package/script/helpers/mergeOptions.js +24 -13
  331. package/script/helpers/parseValue.d.ts +6 -4
  332. package/script/helpers/parseValue.d.ts.map +1 -1
  333. package/script/helpers/parseValue.js +6 -4
  334. package/script/helpers/prepareGraphRouteSql.d.ts +31 -0
  335. package/script/helpers/prepareGraphRouteSql.d.ts.map +1 -0
  336. package/script/helpers/prepareGraphRouteSql.js +127 -0
  337. package/script/helpers/prepareGraphStarts.d.ts +9 -0
  338. package/script/helpers/prepareGraphStarts.d.ts.map +1 -0
  339. package/script/helpers/prepareGraphStarts.js +71 -0
  340. package/script/helpers/prepareGraphTemporalSql.d.ts +28 -0
  341. package/script/helpers/prepareGraphTemporalSql.d.ts.map +1 -0
  342. package/script/helpers/prepareGraphTemporalSql.js +161 -0
  343. package/script/helpers/prepareGraphTraversal.d.ts +19 -0
  344. package/script/helpers/prepareGraphTraversal.d.ts.map +1 -0
  345. package/script/helpers/prepareGraphTraversal.js +87 -0
  346. package/script/helpers/prepareNumericFeatures.d.ts +41 -0
  347. package/script/helpers/prepareNumericFeatures.d.ts.map +1 -0
  348. package/script/helpers/prepareNumericFeatures.js +217 -0
  349. package/script/helpers/prettyDuration.d.ts +14 -8
  350. package/script/helpers/prettyDuration.d.ts.map +1 -1
  351. package/script/helpers/prettyDuration.js +14 -8
  352. package/script/helpers/printTable.d.ts +18 -13
  353. package/script/helpers/printTable.d.ts.map +1 -1
  354. package/script/helpers/printTable.js +18 -13
  355. package/script/helpers/publishPreparedColumns.d.ts +37 -0
  356. package/script/helpers/publishPreparedColumns.d.ts.map +1 -0
  357. package/script/helpers/publishPreparedColumns.js +119 -0
  358. package/script/helpers/queryDB.d.ts +24 -13
  359. package/script/helpers/queryDB.d.ts.map +1 -1
  360. package/script/helpers/queryDB.js +24 -13
  361. package/script/helpers/queueAsyncBarrier.d.ts +12 -7
  362. package/script/helpers/queueAsyncBarrier.d.ts.map +1 -1
  363. package/script/helpers/queueAsyncBarrier.js +12 -7
  364. package/script/helpers/queueGraphResult.d.ts +18 -0
  365. package/script/helpers/queueGraphResult.d.ts.map +1 -0
  366. package/script/helpers/queueGraphResult.js +45 -0
  367. package/script/helpers/quoteIdentifier.d.ts +4 -3
  368. package/script/helpers/quoteIdentifier.d.ts.map +1 -1
  369. package/script/helpers/quoteIdentifier.js +4 -3
  370. package/script/helpers/quoteQualifiedIdentifier.d.ts +6 -4
  371. package/script/helpers/quoteQualifiedIdentifier.d.ts.map +1 -1
  372. package/script/helpers/quoteQualifiedIdentifier.js +6 -4
  373. package/script/helpers/runQuery.d.ts.map +1 -1
  374. package/script/helpers/runQuery.js +17 -3
  375. package/script/helpers/selectFuzzyReplacements.d.ts +11 -0
  376. package/script/helpers/selectFuzzyReplacements.d.ts.map +1 -0
  377. package/script/helpers/selectFuzzyReplacements.js +127 -0
  378. package/script/helpers/stabilizeCosineVectors.d.ts +14 -0
  379. package/script/helpers/stabilizeCosineVectors.d.ts.map +1 -0
  380. package/script/helpers/stabilizeCosineVectors.js +40 -0
  381. package/script/helpers/stringToArray.d.ts +4 -3
  382. package/script/helpers/stringToArray.d.ts.map +1 -1
  383. package/script/helpers/stringToArray.js +4 -3
  384. package/script/helpers/updateColumnsWithJS.d.ts +12 -6
  385. package/script/helpers/updateColumnsWithJS.d.ts.map +1 -1
  386. package/script/helpers/updateColumnsWithJS.js +12 -6
  387. package/script/helpers/validateGraphRouteResultSchema.d.ts +4 -0
  388. package/script/helpers/validateGraphRouteResultSchema.d.ts.map +1 -0
  389. package/script/helpers/validateGraphRouteResultSchema.js +19 -0
  390. package/script/helpers/validateGraphTemporalEvents.d.ts +7 -0
  391. package/script/helpers/validateGraphTemporalEvents.d.ts.map +1 -0
  392. package/script/helpers/validateGraphTemporalEvents.js +53 -0
  393. package/script/helpers/validateNumericalAnalysis.d.ts +10 -6
  394. package/script/helpers/validateNumericalAnalysis.d.ts.map +1 -1
  395. package/script/helpers/validateNumericalAnalysis.js +10 -6
  396. package/script/helpers/validateVectorRowIds.d.ts +4 -0
  397. package/script/helpers/validateVectorRowIds.d.ts.map +1 -0
  398. package/script/helpers/validateVectorRowIds.js +19 -0
  399. package/script/helpers/vectorDistanceExpression.d.ts +6 -0
  400. package/script/helpers/vectorDistanceExpression.d.ts.map +1 -0
  401. package/script/helpers/vectorDistanceExpression.js +14 -0
  402. package/script/helpers/wrapString.d.ts +10 -7
  403. package/script/helpers/wrapString.d.ts.map +1 -1
  404. package/script/helpers/wrapString.js +10 -7
  405. package/script/methods/addId.d.ts +5 -0
  406. package/script/methods/addId.d.ts.map +1 -0
  407. package/script/methods/addId.js +44 -0
  408. package/script/methods/commonNeighbors.d.ts +10 -0
  409. package/script/methods/commonNeighbors.d.ts.map +1 -0
  410. package/script/methods/commonNeighbors.js +140 -0
  411. package/script/methods/connectedComponents.d.ts +9 -0
  412. package/script/methods/connectedComponents.d.ts.map +1 -0
  413. package/script/methods/connectedComponents.js +186 -0
  414. package/script/methods/degree.d.ts +9 -0
  415. package/script/methods/degree.d.ts.map +1 -0
  416. package/script/methods/degree.js +141 -0
  417. package/script/methods/distances.d.ts +12 -0
  418. package/script/methods/distances.d.ts.map +1 -0
  419. package/script/methods/distances.js +203 -0
  420. package/script/methods/findCycles.d.ts +12 -0
  421. package/script/methods/findCycles.d.ts.map +1 -0
  422. package/script/methods/findCycles.js +369 -0
  423. package/script/methods/fuzzyClean.d.ts.map +1 -1
  424. package/script/methods/fuzzyClean.js +17 -136
  425. package/script/methods/fuzzyJoin.js +70 -16
  426. package/script/methods/getTypes.d.ts +1 -1
  427. package/script/methods/hdbscan.d.ts +5 -0
  428. package/script/methods/hdbscan.d.ts.map +1 -0
  429. package/script/methods/hdbscan.js +214 -0
  430. package/script/methods/mahalanobis.d.ts +5 -0
  431. package/script/methods/mahalanobis.d.ts.map +1 -0
  432. package/script/methods/mahalanobis.js +98 -0
  433. package/script/methods/neighbors.d.ts +9 -0
  434. package/script/methods/neighbors.d.ts.map +1 -0
  435. package/script/methods/neighbors.js +120 -0
  436. package/script/methods/normalizeVector.d.ts +5 -0
  437. package/script/methods/normalizeVector.d.ts.map +1 -0
  438. package/script/methods/normalizeVector.js +138 -0
  439. package/script/methods/paths.d.ts +12 -0
  440. package/script/methods/paths.d.ts.map +1 -0
  441. package/script/methods/paths.js +326 -0
  442. package/script/methods/reachable.d.ts +11 -0
  443. package/script/methods/reachable.d.ts.map +1 -0
  444. package/script/methods/reachable.js +170 -0
  445. package/script/methods/rowToVector.d.ts +5 -0
  446. package/script/methods/rowToVector.d.ts.map +1 -0
  447. package/script/methods/rowToVector.js +83 -0
  448. package/script/methods/shortestPath.d.ts +12 -0
  449. package/script/methods/shortestPath.d.ts.map +1 -0
  450. package/script/methods/shortestPath.js +376 -0
  451. package/script/methods/topologicalSort.d.ts +7 -0
  452. package/script/methods/topologicalSort.d.ts.map +1 -0
  453. package/script/methods/topologicalSort.js +170 -0
@@ -121,6 +121,14 @@ class SimpleDB extends Simple_js_1.default {
121
121
  * `__sda` schema is reserved for versioned SDA metadata. SQLite files can be
122
122
  * imported with `loadDB()` but cannot be used as the persistent database.
123
123
  *
124
+ * @example
125
+ * ```ts
126
+ * const sdb = new SimpleDB({
127
+ * logSQL: true,
128
+ * explainSQL: true,
129
+ * });
130
+ * ```
131
+ *
124
132
  * @param options - Configuration options for the SimpleDB instance.
125
133
  * @param options.file - A `.db` or `.duckdb` file to open or create. Defaults to an in-memory database.
126
134
  * @param options.overwrite - If true, replaces an existing file on first use. Defaults to false, which opens the existing file.
@@ -138,14 +146,6 @@ class SimpleDB extends Simple_js_1.default {
138
146
  * @param options.memoryLimit - The maximum amount of memory DuckDB is allowed to use (e.g., `'4GB'`). Defaults to 80% of system RAM.
139
147
  * @param options.tempDir - The path to the directory used for temporary files when data exceeds the memory limit (e.g., `'/tmp/duckdb_swap'`). Defaults to `.tmp` for in-memory databases or `<file>.tmp` for file-based databases. Automatically removed when calling `close()`.
140
148
  * @category Constructor
141
- *
142
- * @example
143
- * ```ts
144
- * const sdb = new SimpleDB({
145
- * logSQL: true,
146
- * explainSQL: true,
147
- * });
148
- * ```
149
149
  */
150
150
  constructor(options = {}) {
151
151
  super(options);
@@ -161,8 +161,6 @@ class SimpleDB extends Simple_js_1.default {
161
161
  * `"sql"` passes SQL through unchanged, including `||` and null comparisons.
162
162
  * Choose the syntax when constructing the database; it applies to all tables.
163
163
  *
164
- * @defaultValue `"js"`
165
- * @category Properties
166
164
  * @example
167
165
  * ```ts
168
166
  * const sdb = new SimpleDB({ expressionSyntax: "js" }); // The default mode
@@ -215,6 +213,9 @@ class SimpleDB extends Simple_js_1.default {
215
213
  * await sdb.newTable().loadArray([{ active: true, age: 18, admin: false }])
216
214
  * .filter("(active AND age >= 18) OR admin").log();
217
215
  * ```
216
+ *
217
+ * @defaultValue `"js"`
218
+ * @category Properties
218
219
  */
219
220
  Object.defineProperty(this, "expressionSyntax", {
220
221
  enumerable: true,
@@ -225,12 +226,13 @@ class SimpleDB extends Simple_js_1.default {
225
226
  /**
226
227
  * Whether to log each SQL statement immediately before execution.
227
228
  *
228
- * @defaultValue `false`
229
- * @category Properties
230
229
  * @example
231
230
  * ```ts
232
231
  * const sdb = new SimpleDB({ logSQL: true });
233
232
  * ```
233
+ *
234
+ * @defaultValue `false`
235
+ * @category Properties
234
236
  */
235
237
  Object.defineProperty(this, "logSQL", {
236
238
  enumerable: true,
@@ -241,12 +243,13 @@ class SimpleDB extends Simple_js_1.default {
241
243
  /**
242
244
  * Whether to log DuckDB query plans before supported statements execute.
243
245
  *
244
- * @defaultValue `false`
245
- * @category Properties
246
246
  * @example
247
247
  * ```ts
248
248
  * const sdb = new SimpleDB({ explainSQL: true });
249
249
  * ```
250
+ *
251
+ * @defaultValue `false`
252
+ * @category Properties
250
253
  */
251
254
  Object.defineProperty(this, "explainSQL", {
252
255
  enumerable: true,
@@ -485,8 +488,6 @@ class SimpleDB extends Simple_js_1.default {
485
488
  * Whether the persistent DuckDB file is opened read-only. Requires an existing
486
489
  * file and cannot be combined with `overwrite`. DuckDB rejects writes to it.
487
490
  *
488
- * @defaultValue `false`
489
- * @category Properties
490
491
  * @example
491
492
  * ```ts
492
493
  * const sdb = new SimpleDB({ file: "./archive.duckdb", readOnly: true });
@@ -494,6 +495,9 @@ class SimpleDB extends Simple_js_1.default {
494
495
  * await table.log();
495
496
  * await sdb.close();
496
497
  * ```
498
+ *
499
+ * @defaultValue `false`
500
+ * @category Properties
497
501
  */
498
502
  Object.defineProperty(this, "readOnly", {
499
503
  enumerable: true,
@@ -507,9 +511,6 @@ class SimpleDB extends Simple_js_1.default {
507
511
  * methods (e.g., `newTable()`, `clone()`) return instances of your
508
512
  * custom table class.
509
513
  *
510
- * @defaultValue `SimpleTable`
511
- * @category Properties
512
- *
513
514
  * @example
514
515
  * ```ts
515
516
  * class MyTable extends SimpleTable {
@@ -527,6 +528,9 @@ class SimpleDB extends Simple_js_1.default {
527
528
  * const table = db.newTable("myTable");
528
529
  * console.log(table.customMethod()); // "hello"
529
530
  * ```
531
+ *
532
+ * @defaultValue `SimpleTable`
533
+ * @category Properties
530
534
  */
531
535
  Object.defineProperty(this, "tableClass", {
532
536
  enumerable: true,
@@ -593,10 +597,6 @@ class SimpleDB extends Simple_js_1.default {
593
597
  * Creates a new SimpleTable instance within the database.
594
598
  * The name must be unique among registered tables, ignoring ASCII letter case.
595
599
  *
596
- * @param name - The name of the new table. If not provided, a default name is generated (e.g., "table1").
597
- * @returns A new table instance.
598
- * @category Table Management
599
- *
600
600
  * @example
601
601
  * ```ts
602
602
  * // Create a table with a default name (e.g., "table1", "table2", etc.)
@@ -614,6 +614,10 @@ class SimpleDB extends Simple_js_1.default {
614
614
  * .loadData("employees.csv")
615
615
  * .log();
616
616
  * ```
617
+ *
618
+ * @param name - The name of the new table. If not provided, a default name is generated (e.g., "table1").
619
+ * @returns A new table instance.
620
+ * @category Table Management
617
621
  */
618
622
  newTable(name) {
619
623
  if (this.lifecycleState !== "open") {
@@ -648,16 +652,16 @@ class SimpleDB extends Simple_js_1.default {
648
652
  /**
649
653
  * Retrieves an existing SimpleTable instance from the database.
650
654
  *
651
- * @param name - The name of the table to retrieve.
652
- * @returns A promise that resolves to the SimpleTable instance if found.
653
- * @category Table Management
654
- *
655
655
  * @example
656
656
  * ```ts
657
657
  * // Retrieve the "employees" table
658
658
  * const employees = await sdb.getTable("employees");
659
659
  * await employees.log();
660
660
  * ```
661
+ *
662
+ * @param name - The name of the table to retrieve.
663
+ * @returns A promise that resolves to the SimpleTable instance if found.
664
+ * @category Table Management
661
665
  */
662
666
  async getTable(name) {
663
667
  await this.start();
@@ -673,10 +677,6 @@ class SimpleDB extends Simple_js_1.default {
673
677
  /**
674
678
  * Removes one or more tables from the database.
675
679
  *
676
- * @param tables - A single table or an array of tables to remove, specified by name or as SimpleTable instances. Pass `"all"` to remove all tables.
677
- * @returns A promise that resolves to the database, so methods can be chained.
678
- * @category Table Management
679
- *
680
680
  * @example
681
681
  * ```ts
682
682
  * // Remove a single table by name
@@ -702,6 +702,10 @@ class SimpleDB extends Simple_js_1.default {
702
702
  * // Remove all tables
703
703
  * await sdb.removeTables("all");
704
704
  * ```
705
+ *
706
+ * @param tables - A single table or an array of tables to remove, specified by name or as SimpleTable instances. Pass `"all"` to remove all tables.
707
+ * @returns A promise that resolves to the database, so methods can be chained.
708
+ * @category Table Management
705
709
  */
706
710
  async removeTables(tables) {
707
711
  await (0, removeTables_js_1.default)(this, tables);
@@ -710,10 +714,6 @@ class SimpleDB extends Simple_js_1.default {
710
714
  /**
711
715
  * Selects one or more tables to keep in the database, removing all others.
712
716
  *
713
- * @param tables - A single table or an array of tables to select, specified by name or as SimpleTable instances.
714
- * @returns A promise that resolves to the database, so methods can be chained.
715
- * @category Table Management
716
- *
717
717
  * @example
718
718
  * ```ts
719
719
  * // Select a single table by name, removing all other tables
@@ -733,6 +733,10 @@ class SimpleDB extends Simple_js_1.default {
733
733
  * // ... load data ...
734
734
  * await sdb.selectTables(employeesTable);
735
735
  * ```
736
+ *
737
+ * @param tables - A single table or an array of tables to select, specified by name or as SimpleTable instances.
738
+ * @returns A promise that resolves to the database, so methods can be chained.
739
+ * @category Table Management
736
740
  */
737
741
  async selectTables(tables) {
738
742
  await (0, selectTables_js_1.default)(this, tables);
@@ -741,15 +745,15 @@ class SimpleDB extends Simple_js_1.default {
741
745
  /**
742
746
  * Returns an array of all table names in the database, sorted alphabetically.
743
747
  *
744
- * @returns A promise that resolves to an array of table names.
745
- * @category Table Management
746
- *
747
748
  * @example
748
749
  * ```ts
749
750
  * // Get all table names
750
751
  * const tableNames = await sdb.getTableNames();
751
752
  * console.log(tableNames); // Output: ["employees", "customers"]
752
753
  * ```
754
+ *
755
+ * @returns A promise that resolves to an array of table names.
756
+ * @category Table Management
753
757
  */
754
758
  async getTableNames() {
755
759
  return await (0, getTableNames_js_1.default)(this);
@@ -757,15 +761,15 @@ class SimpleDB extends Simple_js_1.default {
757
761
  /**
758
762
  * Logs the names of all tables in the database to the console, sorted alphabetically.
759
763
  *
760
- * @returns A promise that resolves to the database, so methods can be chained.
761
- * @category Table Management
762
- *
763
764
  * @example
764
765
  * ```ts
765
766
  * // Log all table names to the console
766
767
  * await sdb.logTableNames();
767
768
  * // Example output: SimpleDB - Tables: ["employees","customers"]
768
769
  * ```
770
+ *
771
+ * @returns A promise that resolves to the database, so methods can be chained.
772
+ * @category Table Management
769
773
  */
770
774
  async logTableNames() {
771
775
  const tables = await this.getTableNames();
@@ -783,14 +787,14 @@ class SimpleDB extends Simple_js_1.default {
783
787
  * The returned array is a snapshot and cannot mutate the database's internal
784
788
  * table registry.
785
789
  *
786
- * @returns A read-only array of SimpleTable instances.
787
- * @category Table Management
788
- *
789
790
  * @example
790
791
  * ```ts
791
792
  * // Get all SimpleTable instances
792
793
  * const tables = sdb.getTables();
793
794
  * ```
795
+ *
796
+ * @returns A read-only array of SimpleTable instances.
797
+ * @category Table Management
794
798
  */
795
799
  getTables() {
796
800
  return (0, tableRegistry_js_1.listRegisteredTables)(this);
@@ -798,10 +802,6 @@ class SimpleDB extends Simple_js_1.default {
798
802
  /**
799
803
  * Checks if a table exists in the database.
800
804
  *
801
- * @param table - The name of the table or a SimpleTable instance.
802
- * @returns A promise that resolves to `true` if the table exists, `false` otherwise.
803
- * @category Table Management
804
- *
805
805
  * @example
806
806
  * ```ts
807
807
  * // Check if a table named "employees" exists
@@ -816,6 +816,10 @@ class SimpleDB extends Simple_js_1.default {
816
816
  * const existsInstance = await sdb.hasTable(myTable);
817
817
  * console.log(existsInstance); // Output: true or false
818
818
  * ```
819
+ *
820
+ * @param table - The name of the table or a SimpleTable instance.
821
+ * @returns A promise that resolves to `true` if the table exists, `false` otherwise.
822
+ * @category Table Management
819
823
  */
820
824
  async hasTable(table) {
821
825
  const tableName = typeof table === "string" ? table : table.name;
@@ -825,15 +829,15 @@ class SimpleDB extends Simple_js_1.default {
825
829
  /**
826
830
  * Returns a list of installed DuckDB extensions.
827
831
  *
828
- * @returns A promise that resolves to an array of objects, each representing an installed extension.
829
- * @category DuckDB
830
- *
831
832
  * @example
832
833
  * ```ts
833
834
  * // Get a list of all installed extensions
834
835
  * const extensions = await sdb.getExtensions();
835
836
  * console.log(extensions); // Output: [{ extension_name: "spatial", loaded: true, ... }]
836
837
  * ```
838
+ *
839
+ * @returns A promise that resolves to an array of objects, each representing an installed extension.
840
+ * @category DuckDB
837
841
  */
838
842
  async getExtensions() {
839
843
  return (await (0, queryDB_js_1.default)(this, `FROM duckdb_extensions();`, (0, mergeOptions_js_1.default)(this, {
@@ -855,13 +859,6 @@ class SimpleDB extends Simple_js_1.default {
855
859
  * identifies the custom query's dependencies in the cache's `options.inputs`
856
860
  * (such as a table content hash), or use tracked `SimpleTable` methods.
857
861
  *
858
- * @param query - The SQL query string to execute.
859
- * @param options - Configuration options for the query.
860
- * @param options.returnData - If `true`, the query result is returned. Defaults to `false`.
861
- * @param options.table - The name of the table associated with the query, primarily used for debugging and logging.
862
- * @returns A promise that resolves to the query result as an array of objects if `returnData` is `true`, otherwise `null`.
863
- * @category DuckDB
864
- *
865
862
  * @example
866
863
  * ```ts
867
864
  * // Execute a query without returning data
@@ -877,6 +874,13 @@ class SimpleDB extends Simple_js_1.default {
877
874
  * );
878
875
  * console.log(youngEmployees);
879
876
  * ```
877
+ *
878
+ * @param query - The SQL query string to execute.
879
+ * @param options - Configuration options for the query.
880
+ * @param options.returnData - If `true`, the query result is returned. Defaults to `false`.
881
+ * @param options.table - The name of the table associated with the query, primarily used for debugging and logging.
882
+ * @returns A promise that resolves to the query result as an array of objects if `returnData` is `true`, otherwise `null`.
883
+ * @category DuckDB
880
884
  */
881
885
  async customQuery(query, options = {}) {
882
886
  return await (0, queryDB_js_1.default)(this, query, (0, mergeOptions_js_1.default)(this, {
@@ -898,10 +902,6 @@ class SimpleDB extends Simple_js_1.default {
898
902
  * for SDA metadata.
899
903
  * To edit an existing DuckDB file in place, use `new SimpleDB({ file })`.
900
904
  *
901
- * @param file - The relative or absolute path to the database file.
902
- * @returns A promise that resolves to the database, so methods can be chained.
903
- * @category File Operations
904
- *
905
905
  * @example
906
906
  * ```ts
907
907
  * // Load a DuckDB database file
@@ -921,6 +921,10 @@ class SimpleDB extends Simple_js_1.default {
921
921
  * await sdb.loadDB("./archive.db");
922
922
  * await sdb.close();
923
923
  * ```
924
+ *
925
+ * @param file - The relative or absolute path to the database file.
926
+ * @returns A promise that resolves to the database, so methods can be chained.
927
+ * @category File Operations
924
928
  */
925
929
  async loadDB(file) {
926
930
  await (0, loadDB_js_1.default)(this, file);
@@ -941,13 +945,6 @@ class SimpleDB extends Simple_js_1.default {
941
945
  * is published only after its connection is detached. Database files attached
942
946
  * to this instance, directories, and symbolic links cannot be replaced.
943
947
  *
944
- * @param file - The relative or absolute path to the output file.
945
- * @param options - Configuration options for writing the database.
946
- * @param options.overwrite - If true, permits atomic replacement of an existing output file. Defaults to false.
947
- * @param options.metadata - If false, omits logical SDA index definitions from DuckDB exports. Defaults to true. Does not control physical indexes; SQLite exports never include SDA metadata.
948
- * @returns A promise that resolves to the database, so methods can be chained.
949
- * @category File Operations
950
- *
951
948
  * @example
952
949
  * ```ts
953
950
  * // Write the current database to a DuckDB file
@@ -965,6 +962,13 @@ class SimpleDB extends Simple_js_1.default {
965
962
  * // Export table data for use with SQLite
966
963
  * await sdb.writeDB("./my_exported_database.sqlite");
967
964
  * ```
965
+ *
966
+ * @param file - The relative or absolute path to the output file.
967
+ * @param options - Configuration options for writing the database.
968
+ * @param options.overwrite - If true, permits atomic replacement of an existing output file. Defaults to false.
969
+ * @param options.metadata - If false, omits logical SDA index definitions from DuckDB exports. Defaults to true. Does not control physical indexes; SQLite exports never include SDA metadata.
970
+ * @returns A promise that resolves to the database, so methods can be chained.
971
+ * @category File Operations
968
972
  */
969
973
  async writeDB(file, options = {}) {
970
974
  await (0, writeDB_js_1.default)(this, file, options);
@@ -982,9 +986,6 @@ class SimpleDB extends Simple_js_1.default {
982
986
  * different tables execute exactly in the order they were queued. This is
983
987
  * the database-level counterpart to `SimpleTable.run()`.
984
988
  *
985
- * @returns A promise that resolves to the SimpleDB instance once the queued methods have been executed.
986
- * @category Lifecycle
987
- *
988
989
  * @example
989
990
  * ```ts
990
991
  * // Nothing is observed after the mutations, so run() executes them.
@@ -992,6 +993,9 @@ class SimpleDB extends Simple_js_1.default {
992
993
  * table2.loadData("data2.csv").filter(`price > 0`);
993
994
  * await sdb.run();
994
995
  * ```
996
+ *
997
+ * @returns A promise that resolves to the SimpleDB instance once the queued methods have been executed.
998
+ * @category Lifecycle
995
999
  */
996
1000
  async run() {
997
1001
  if (this.lifecycleState !== "open") {
@@ -1005,16 +1009,16 @@ class SimpleDB extends Simple_js_1.default {
1005
1009
  * databases, and closes the connection and instance. Also cleans up temporary
1006
1010
  * files and the cache. Does not copy, compact, or replace the database file.
1007
1011
  *
1008
- * @returns A promise that resolves to the SimpleDB instance after cleanup.
1009
- * @throws An error after cleanup when pending execution or cleanup fails.
1010
- * @category Lifecycle
1011
- *
1012
1012
  * @example
1013
1013
  * ```ts
1014
1014
  * // close() executes queued transformations before cleaning up resources.
1015
1015
  * table.loadData("data.csv").convert({ price: "number" });
1016
1016
  * await sdb.close();
1017
1017
  * ```
1018
+ *
1019
+ * @returns A promise that resolves to the SimpleDB instance after cleanup.
1020
+ * @throws An error after cleanup when pending execution or cleanup fails.
1021
+ * @category Lifecycle
1018
1022
  */
1019
1023
  async close() {
1020
1024
  if (__classPrivateFieldGet(this, _SimpleDB_closePromise, "f") !== null) {