@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
@@ -83,6 +83,14 @@ class SimpleDB extends Simple {
83
83
  * `__sda` schema is reserved for versioned SDA metadata. SQLite files can be
84
84
  * imported with `loadDB()` but cannot be used as the persistent database.
85
85
  *
86
+ * @example
87
+ * ```ts
88
+ * const sdb = new SimpleDB({
89
+ * logSQL: true,
90
+ * explainSQL: true,
91
+ * });
92
+ * ```
93
+ *
86
94
  * @param options - Configuration options for the SimpleDB instance.
87
95
  * @param options.file - A `.db` or `.duckdb` file to open or create. Defaults to an in-memory database.
88
96
  * @param options.overwrite - If true, replaces an existing file on first use. Defaults to false, which opens the existing file.
@@ -100,14 +108,6 @@ class SimpleDB extends Simple {
100
108
  * @param options.memoryLimit - The maximum amount of memory DuckDB is allowed to use (e.g., `'4GB'`). Defaults to 80% of system RAM.
101
109
  * @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()`.
102
110
  * @category Constructor
103
- *
104
- * @example
105
- * ```ts
106
- * const sdb = new SimpleDB({
107
- * logSQL: true,
108
- * explainSQL: true,
109
- * });
110
- * ```
111
111
  */
112
112
  constructor(options = {}) {
113
113
  super(options);
@@ -123,8 +123,6 @@ class SimpleDB extends Simple {
123
123
  * `"sql"` passes SQL through unchanged, including `||` and null comparisons.
124
124
  * Choose the syntax when constructing the database; it applies to all tables.
125
125
  *
126
- * @defaultValue `"js"`
127
- * @category Properties
128
126
  * @example
129
127
  * ```ts
130
128
  * const sdb = new SimpleDB({ expressionSyntax: "js" }); // The default mode
@@ -177,6 +175,9 @@ class SimpleDB extends Simple {
177
175
  * await sdb.newTable().loadArray([{ active: true, age: 18, admin: false }])
178
176
  * .filter("(active AND age >= 18) OR admin").log();
179
177
  * ```
178
+ *
179
+ * @defaultValue `"js"`
180
+ * @category Properties
180
181
  */
181
182
  Object.defineProperty(this, "expressionSyntax", {
182
183
  enumerable: true,
@@ -187,12 +188,13 @@ class SimpleDB extends Simple {
187
188
  /**
188
189
  * Whether to log each SQL statement immediately before execution.
189
190
  *
190
- * @defaultValue `false`
191
- * @category Properties
192
191
  * @example
193
192
  * ```ts
194
193
  * const sdb = new SimpleDB({ logSQL: true });
195
194
  * ```
195
+ *
196
+ * @defaultValue `false`
197
+ * @category Properties
196
198
  */
197
199
  Object.defineProperty(this, "logSQL", {
198
200
  enumerable: true,
@@ -203,12 +205,13 @@ class SimpleDB extends Simple {
203
205
  /**
204
206
  * Whether to log DuckDB query plans before supported statements execute.
205
207
  *
206
- * @defaultValue `false`
207
- * @category Properties
208
208
  * @example
209
209
  * ```ts
210
210
  * const sdb = new SimpleDB({ explainSQL: true });
211
211
  * ```
212
+ *
213
+ * @defaultValue `false`
214
+ * @category Properties
212
215
  */
213
216
  Object.defineProperty(this, "explainSQL", {
214
217
  enumerable: true,
@@ -447,8 +450,6 @@ class SimpleDB extends Simple {
447
450
  * Whether the persistent DuckDB file is opened read-only. Requires an existing
448
451
  * file and cannot be combined with `overwrite`. DuckDB rejects writes to it.
449
452
  *
450
- * @defaultValue `false`
451
- * @category Properties
452
453
  * @example
453
454
  * ```ts
454
455
  * const sdb = new SimpleDB({ file: "./archive.duckdb", readOnly: true });
@@ -456,6 +457,9 @@ class SimpleDB extends Simple {
456
457
  * await table.log();
457
458
  * await sdb.close();
458
459
  * ```
460
+ *
461
+ * @defaultValue `false`
462
+ * @category Properties
459
463
  */
460
464
  Object.defineProperty(this, "readOnly", {
461
465
  enumerable: true,
@@ -469,9 +473,6 @@ class SimpleDB extends Simple {
469
473
  * methods (e.g., `newTable()`, `clone()`) return instances of your
470
474
  * custom table class.
471
475
  *
472
- * @defaultValue `SimpleTable`
473
- * @category Properties
474
- *
475
476
  * @example
476
477
  * ```ts
477
478
  * class MyTable extends SimpleTable {
@@ -489,6 +490,9 @@ class SimpleDB extends Simple {
489
490
  * const table = db.newTable("myTable");
490
491
  * console.log(table.customMethod()); // "hello"
491
492
  * ```
493
+ *
494
+ * @defaultValue `SimpleTable`
495
+ * @category Properties
492
496
  */
493
497
  Object.defineProperty(this, "tableClass", {
494
498
  enumerable: true,
@@ -555,10 +559,6 @@ class SimpleDB extends Simple {
555
559
  * Creates a new SimpleTable instance within the database.
556
560
  * The name must be unique among registered tables, ignoring ASCII letter case.
557
561
  *
558
- * @param name - The name of the new table. If not provided, a default name is generated (e.g., "table1").
559
- * @returns A new table instance.
560
- * @category Table Management
561
- *
562
562
  * @example
563
563
  * ```ts
564
564
  * // Create a table with a default name (e.g., "table1", "table2", etc.)
@@ -576,6 +576,10 @@ class SimpleDB extends Simple {
576
576
  * .loadData("employees.csv")
577
577
  * .log();
578
578
  * ```
579
+ *
580
+ * @param name - The name of the new table. If not provided, a default name is generated (e.g., "table1").
581
+ * @returns A new table instance.
582
+ * @category Table Management
579
583
  */
580
584
  newTable(name) {
581
585
  if (this.lifecycleState !== "open") {
@@ -610,16 +614,16 @@ class SimpleDB extends Simple {
610
614
  /**
611
615
  * Retrieves an existing SimpleTable instance from the database.
612
616
  *
613
- * @param name - The name of the table to retrieve.
614
- * @returns A promise that resolves to the SimpleTable instance if found.
615
- * @category Table Management
616
- *
617
617
  * @example
618
618
  * ```ts
619
619
  * // Retrieve the "employees" table
620
620
  * const employees = await sdb.getTable("employees");
621
621
  * await employees.log();
622
622
  * ```
623
+ *
624
+ * @param name - The name of the table to retrieve.
625
+ * @returns A promise that resolves to the SimpleTable instance if found.
626
+ * @category Table Management
623
627
  */
624
628
  async getTable(name) {
625
629
  await this.start();
@@ -635,10 +639,6 @@ class SimpleDB extends Simple {
635
639
  /**
636
640
  * Removes one or more tables from the database.
637
641
  *
638
- * @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.
639
- * @returns A promise that resolves to the database, so methods can be chained.
640
- * @category Table Management
641
- *
642
642
  * @example
643
643
  * ```ts
644
644
  * // Remove a single table by name
@@ -664,6 +664,10 @@ class SimpleDB extends Simple {
664
664
  * // Remove all tables
665
665
  * await sdb.removeTables("all");
666
666
  * ```
667
+ *
668
+ * @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.
669
+ * @returns A promise that resolves to the database, so methods can be chained.
670
+ * @category Table Management
667
671
  */
668
672
  async removeTables(tables) {
669
673
  await removeTables(this, tables);
@@ -672,10 +676,6 @@ class SimpleDB extends Simple {
672
676
  /**
673
677
  * Selects one or more tables to keep in the database, removing all others.
674
678
  *
675
- * @param tables - A single table or an array of tables to select, specified by name or as SimpleTable instances.
676
- * @returns A promise that resolves to the database, so methods can be chained.
677
- * @category Table Management
678
- *
679
679
  * @example
680
680
  * ```ts
681
681
  * // Select a single table by name, removing all other tables
@@ -695,6 +695,10 @@ class SimpleDB extends Simple {
695
695
  * // ... load data ...
696
696
  * await sdb.selectTables(employeesTable);
697
697
  * ```
698
+ *
699
+ * @param tables - A single table or an array of tables to select, specified by name or as SimpleTable instances.
700
+ * @returns A promise that resolves to the database, so methods can be chained.
701
+ * @category Table Management
698
702
  */
699
703
  async selectTables(tables) {
700
704
  await selectTables(this, tables);
@@ -703,15 +707,15 @@ class SimpleDB extends Simple {
703
707
  /**
704
708
  * Returns an array of all table names in the database, sorted alphabetically.
705
709
  *
706
- * @returns A promise that resolves to an array of table names.
707
- * @category Table Management
708
- *
709
710
  * @example
710
711
  * ```ts
711
712
  * // Get all table names
712
713
  * const tableNames = await sdb.getTableNames();
713
714
  * console.log(tableNames); // Output: ["employees", "customers"]
714
715
  * ```
716
+ *
717
+ * @returns A promise that resolves to an array of table names.
718
+ * @category Table Management
715
719
  */
716
720
  async getTableNames() {
717
721
  return await getTableNames(this);
@@ -719,15 +723,15 @@ class SimpleDB extends Simple {
719
723
  /**
720
724
  * Logs the names of all tables in the database to the console, sorted alphabetically.
721
725
  *
722
- * @returns A promise that resolves to the database, so methods can be chained.
723
- * @category Table Management
724
- *
725
726
  * @example
726
727
  * ```ts
727
728
  * // Log all table names to the console
728
729
  * await sdb.logTableNames();
729
730
  * // Example output: SimpleDB - Tables: ["employees","customers"]
730
731
  * ```
732
+ *
733
+ * @returns A promise that resolves to the database, so methods can be chained.
734
+ * @category Table Management
731
735
  */
732
736
  async logTableNames() {
733
737
  const tables = await this.getTableNames();
@@ -745,14 +749,14 @@ class SimpleDB extends Simple {
745
749
  * The returned array is a snapshot and cannot mutate the database's internal
746
750
  * table registry.
747
751
  *
748
- * @returns A read-only array of SimpleTable instances.
749
- * @category Table Management
750
- *
751
752
  * @example
752
753
  * ```ts
753
754
  * // Get all SimpleTable instances
754
755
  * const tables = sdb.getTables();
755
756
  * ```
757
+ *
758
+ * @returns A read-only array of SimpleTable instances.
759
+ * @category Table Management
756
760
  */
757
761
  getTables() {
758
762
  return listRegisteredTables(this);
@@ -760,10 +764,6 @@ class SimpleDB extends Simple {
760
764
  /**
761
765
  * Checks if a table exists in the database.
762
766
  *
763
- * @param table - The name of the table or a SimpleTable instance.
764
- * @returns A promise that resolves to `true` if the table exists, `false` otherwise.
765
- * @category Table Management
766
- *
767
767
  * @example
768
768
  * ```ts
769
769
  * // Check if a table named "employees" exists
@@ -778,6 +778,10 @@ class SimpleDB extends Simple {
778
778
  * const existsInstance = await sdb.hasTable(myTable);
779
779
  * console.log(existsInstance); // Output: true or false
780
780
  * ```
781
+ *
782
+ * @param table - The name of the table or a SimpleTable instance.
783
+ * @returns A promise that resolves to `true` if the table exists, `false` otherwise.
784
+ * @category Table Management
781
785
  */
782
786
  async hasTable(table) {
783
787
  const tableName = typeof table === "string" ? table : table.name;
@@ -787,15 +791,15 @@ class SimpleDB extends Simple {
787
791
  /**
788
792
  * Returns a list of installed DuckDB extensions.
789
793
  *
790
- * @returns A promise that resolves to an array of objects, each representing an installed extension.
791
- * @category DuckDB
792
- *
793
794
  * @example
794
795
  * ```ts
795
796
  * // Get a list of all installed extensions
796
797
  * const extensions = await sdb.getExtensions();
797
798
  * console.log(extensions); // Output: [{ extension_name: "spatial", loaded: true, ... }]
798
799
  * ```
800
+ *
801
+ * @returns A promise that resolves to an array of objects, each representing an installed extension.
802
+ * @category DuckDB
799
803
  */
800
804
  async getExtensions() {
801
805
  return (await queryDB(this, `FROM duckdb_extensions();`, mergeOptions(this, {
@@ -817,13 +821,6 @@ class SimpleDB extends Simple {
817
821
  * identifies the custom query's dependencies in the cache's `options.inputs`
818
822
  * (such as a table content hash), or use tracked `SimpleTable` methods.
819
823
  *
820
- * @param query - The SQL query string to execute.
821
- * @param options - Configuration options for the query.
822
- * @param options.returnData - If `true`, the query result is returned. Defaults to `false`.
823
- * @param options.table - The name of the table associated with the query, primarily used for debugging and logging.
824
- * @returns A promise that resolves to the query result as an array of objects if `returnData` is `true`, otherwise `null`.
825
- * @category DuckDB
826
- *
827
824
  * @example
828
825
  * ```ts
829
826
  * // Execute a query without returning data
@@ -839,6 +836,13 @@ class SimpleDB extends Simple {
839
836
  * );
840
837
  * console.log(youngEmployees);
841
838
  * ```
839
+ *
840
+ * @param query - The SQL query string to execute.
841
+ * @param options - Configuration options for the query.
842
+ * @param options.returnData - If `true`, the query result is returned. Defaults to `false`.
843
+ * @param options.table - The name of the table associated with the query, primarily used for debugging and logging.
844
+ * @returns A promise that resolves to the query result as an array of objects if `returnData` is `true`, otherwise `null`.
845
+ * @category DuckDB
842
846
  */
843
847
  async customQuery(query, options = {}) {
844
848
  return await queryDB(this, query, mergeOptions(this, {
@@ -860,10 +864,6 @@ class SimpleDB extends Simple {
860
864
  * for SDA metadata.
861
865
  * To edit an existing DuckDB file in place, use `new SimpleDB({ file })`.
862
866
  *
863
- * @param file - The relative or absolute path to the database file.
864
- * @returns A promise that resolves to the database, so methods can be chained.
865
- * @category File Operations
866
- *
867
867
  * @example
868
868
  * ```ts
869
869
  * // Load a DuckDB database file
@@ -883,6 +883,10 @@ class SimpleDB extends Simple {
883
883
  * await sdb.loadDB("./archive.db");
884
884
  * await sdb.close();
885
885
  * ```
886
+ *
887
+ * @param file - The relative or absolute path to the database file.
888
+ * @returns A promise that resolves to the database, so methods can be chained.
889
+ * @category File Operations
886
890
  */
887
891
  async loadDB(file) {
888
892
  await loadDB(this, file);
@@ -903,13 +907,6 @@ class SimpleDB extends Simple {
903
907
  * is published only after its connection is detached. Database files attached
904
908
  * to this instance, directories, and symbolic links cannot be replaced.
905
909
  *
906
- * @param file - The relative or absolute path to the output file.
907
- * @param options - Configuration options for writing the database.
908
- * @param options.overwrite - If true, permits atomic replacement of an existing output file. Defaults to false.
909
- * @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.
910
- * @returns A promise that resolves to the database, so methods can be chained.
911
- * @category File Operations
912
- *
913
910
  * @example
914
911
  * ```ts
915
912
  * // Write the current database to a DuckDB file
@@ -927,6 +924,13 @@ class SimpleDB extends Simple {
927
924
  * // Export table data for use with SQLite
928
925
  * await sdb.writeDB("./my_exported_database.sqlite");
929
926
  * ```
927
+ *
928
+ * @param file - The relative or absolute path to the output file.
929
+ * @param options - Configuration options for writing the database.
930
+ * @param options.overwrite - If true, permits atomic replacement of an existing output file. Defaults to false.
931
+ * @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.
932
+ * @returns A promise that resolves to the database, so methods can be chained.
933
+ * @category File Operations
930
934
  */
931
935
  async writeDB(file, options = {}) {
932
936
  await writeDB(this, file, options);
@@ -944,9 +948,6 @@ class SimpleDB extends Simple {
944
948
  * different tables execute exactly in the order they were queued. This is
945
949
  * the database-level counterpart to `SimpleTable.run()`.
946
950
  *
947
- * @returns A promise that resolves to the SimpleDB instance once the queued methods have been executed.
948
- * @category Lifecycle
949
- *
950
951
  * @example
951
952
  * ```ts
952
953
  * // Nothing is observed after the mutations, so run() executes them.
@@ -954,6 +955,9 @@ class SimpleDB extends Simple {
954
955
  * table2.loadData("data2.csv").filter(`price > 0`);
955
956
  * await sdb.run();
956
957
  * ```
958
+ *
959
+ * @returns A promise that resolves to the SimpleDB instance once the queued methods have been executed.
960
+ * @category Lifecycle
957
961
  */
958
962
  async run() {
959
963
  if (this.lifecycleState !== "open") {
@@ -967,16 +971,16 @@ class SimpleDB extends Simple {
967
971
  * databases, and closes the connection and instance. Also cleans up temporary
968
972
  * files and the cache. Does not copy, compact, or replace the database file.
969
973
  *
970
- * @returns A promise that resolves to the SimpleDB instance after cleanup.
971
- * @throws An error after cleanup when pending execution or cleanup fails.
972
- * @category Lifecycle
973
- *
974
974
  * @example
975
975
  * ```ts
976
976
  * // close() executes queued transformations before cleaning up resources.
977
977
  * table.loadData("data.csv").convert({ price: "number" });
978
978
  * await sdb.close();
979
979
  * ```
980
+ *
981
+ * @returns A promise that resolves to the SimpleDB instance after cleanup.
982
+ * @throws An error after cleanup when pending execution or cleanup fails.
983
+ * @category Lifecycle
980
984
  */
981
985
  async close() {
982
986
  if (__classPrivateFieldGet(this, _SimpleDB_closePromise, "f") !== null) {