tinybase 4.0.0-beta.3 → 4.0.0-beta.5

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 (282) hide show
  1. package/lib/cjs/persisters/persister-automerge.cjs +1 -0
  2. package/lib/cjs/persisters/persister-automerge.cjs.gz +0 -0
  3. package/lib/cjs/persisters/persister-browser.cjs +1 -0
  4. package/lib/cjs/persisters/persister-browser.cjs.gz +0 -0
  5. package/lib/cjs/persisters/persister-cr-sqlite-wasm.cjs +1 -0
  6. package/lib/cjs/persisters/persister-cr-sqlite-wasm.cjs.gz +0 -0
  7. package/lib/cjs/persisters/persister-file.cjs +1 -0
  8. package/lib/cjs/persisters/persister-file.cjs.gz +0 -0
  9. package/lib/cjs/persisters/persister-remote.cjs +1 -0
  10. package/lib/cjs/persisters/persister-remote.cjs.gz +0 -0
  11. package/lib/cjs/persisters/persister-sqlite-wasm.cjs +1 -0
  12. package/lib/cjs/persisters/persister-sqlite-wasm.cjs.gz +0 -0
  13. package/lib/cjs/persisters/persister-sqlite3.cjs +1 -0
  14. package/lib/cjs/persisters/persister-sqlite3.cjs.gz +0 -0
  15. package/lib/cjs/persisters/persister-yjs.cjs +1 -0
  16. package/lib/cjs/persisters/persister-yjs.cjs.gz +0 -0
  17. package/lib/cjs/persisters.cjs +1 -1
  18. package/lib/cjs/persisters.cjs.gz +0 -0
  19. package/lib/cjs/queries.cjs +1 -1
  20. package/lib/cjs/queries.cjs.gz +0 -0
  21. package/lib/cjs/store.cjs +1 -1
  22. package/lib/cjs/store.cjs.gz +0 -0
  23. package/lib/cjs/tinybase.cjs +1 -1
  24. package/lib/cjs/tinybase.cjs.gz +0 -0
  25. package/lib/cjs/tools.cjs +1 -1
  26. package/lib/cjs/tools.cjs.gz +0 -0
  27. package/lib/cjs/ui-react.cjs +1 -1
  28. package/lib/cjs/ui-react.cjs.gz +0 -0
  29. package/lib/cjs-es6/persisters/persister-automerge.cjs +1 -0
  30. package/lib/cjs-es6/persisters/persister-automerge.cjs.gz +0 -0
  31. package/lib/cjs-es6/persisters/persister-browser.cjs +1 -0
  32. package/lib/cjs-es6/persisters/persister-browser.cjs.gz +0 -0
  33. package/lib/cjs-es6/persisters/persister-cr-sqlite-wasm.cjs +1 -0
  34. package/lib/cjs-es6/persisters/persister-cr-sqlite-wasm.cjs.gz +0 -0
  35. package/lib/cjs-es6/persisters/persister-file.cjs +1 -0
  36. package/lib/cjs-es6/persisters/persister-file.cjs.gz +0 -0
  37. package/lib/cjs-es6/persisters/persister-remote.cjs +1 -0
  38. package/lib/cjs-es6/persisters/persister-remote.cjs.gz +0 -0
  39. package/lib/cjs-es6/persisters/persister-sqlite-wasm.cjs +1 -0
  40. package/lib/cjs-es6/persisters/persister-sqlite-wasm.cjs.gz +0 -0
  41. package/lib/cjs-es6/persisters/persister-sqlite3.cjs +1 -0
  42. package/lib/cjs-es6/persisters/persister-sqlite3.cjs.gz +0 -0
  43. package/lib/cjs-es6/persisters/persister-yjs.cjs +1 -0
  44. package/lib/cjs-es6/persisters/persister-yjs.cjs.gz +0 -0
  45. package/lib/cjs-es6/persisters.cjs +1 -1
  46. package/lib/cjs-es6/persisters.cjs.gz +0 -0
  47. package/lib/cjs-es6/queries.cjs +1 -1
  48. package/lib/cjs-es6/queries.cjs.gz +0 -0
  49. package/lib/cjs-es6/store.cjs +1 -1
  50. package/lib/cjs-es6/store.cjs.gz +0 -0
  51. package/lib/cjs-es6/tinybase.cjs +1 -1
  52. package/lib/cjs-es6/tinybase.cjs.gz +0 -0
  53. package/lib/cjs-es6/tools.cjs +1 -1
  54. package/lib/cjs-es6/tools.cjs.gz +0 -0
  55. package/lib/cjs-es6/ui-react.cjs +1 -1
  56. package/lib/cjs-es6/ui-react.cjs.gz +0 -0
  57. package/lib/debug/{persister-automerge.js → persisters/persister-automerge.js} +57 -30
  58. package/lib/debug/{persister-browser.js → persisters/persister-browser.js} +48 -19
  59. package/lib/debug/persisters/persister-cr-sqlite-wasm.js +665 -0
  60. package/lib/debug/{persister-file.js → persisters/persister-file.js} +50 -24
  61. package/lib/debug/{persister-remote.js → persisters/persister-remote.js} +47 -18
  62. package/lib/debug/persisters/persister-sqlite-wasm.js +673 -0
  63. package/lib/debug/persisters/persister-sqlite3.js +676 -0
  64. package/lib/debug/{persister-yjs.js → persisters/persister-yjs.js} +48 -19
  65. package/lib/debug/persisters.js +46 -17
  66. package/lib/debug/queries.js +1 -1
  67. package/lib/debug/store.js +104 -40
  68. package/lib/debug/tinybase.js +148 -57
  69. package/lib/debug/tools.js +129 -27
  70. package/lib/debug/ui-react.js +24 -0
  71. package/lib/es6/persisters/persister-automerge.js +1 -0
  72. package/lib/es6/persisters/persister-automerge.js.gz +0 -0
  73. package/lib/es6/persisters/persister-browser.js +1 -0
  74. package/lib/es6/persisters/persister-browser.js.gz +0 -0
  75. package/lib/es6/persisters/persister-cr-sqlite-wasm.js +1 -0
  76. package/lib/es6/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
  77. package/lib/es6/persisters/persister-file.js +1 -0
  78. package/lib/es6/persisters/persister-file.js.gz +0 -0
  79. package/lib/es6/persisters/persister-remote.js +1 -0
  80. package/lib/es6/persisters/persister-remote.js.gz +0 -0
  81. package/lib/es6/persisters/persister-sqlite-wasm.js +1 -0
  82. package/lib/es6/persisters/persister-sqlite-wasm.js.gz +0 -0
  83. package/lib/es6/persisters/persister-sqlite3.js +1 -0
  84. package/lib/es6/persisters/persister-sqlite3.js.gz +0 -0
  85. package/lib/es6/persisters/persister-yjs.js +1 -0
  86. package/lib/es6/persisters/persister-yjs.js.gz +0 -0
  87. package/lib/es6/persisters.js +1 -1
  88. package/lib/es6/persisters.js.gz +0 -0
  89. package/lib/es6/queries.js +1 -1
  90. package/lib/es6/queries.js.gz +0 -0
  91. package/lib/es6/store.js +1 -1
  92. package/lib/es6/store.js.gz +0 -0
  93. package/lib/es6/tinybase.js +1 -1
  94. package/lib/es6/tinybase.js.gz +0 -0
  95. package/lib/es6/tools.js +1 -1
  96. package/lib/es6/tools.js.gz +0 -0
  97. package/lib/es6/ui-react.js +1 -1
  98. package/lib/es6/ui-react.js.gz +0 -0
  99. package/lib/persisters/persister-automerge.js +1 -0
  100. package/lib/persisters/persister-automerge.js.gz +0 -0
  101. package/lib/persisters/persister-browser.js +1 -0
  102. package/lib/persisters/persister-browser.js.gz +0 -0
  103. package/lib/persisters/persister-cr-sqlite-wasm.js +1 -0
  104. package/lib/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
  105. package/lib/persisters/persister-file.js +1 -0
  106. package/lib/persisters/persister-file.js.gz +0 -0
  107. package/lib/persisters/persister-remote.js +1 -0
  108. package/lib/persisters/persister-remote.js.gz +0 -0
  109. package/lib/persisters/persister-sqlite-wasm.js +1 -0
  110. package/lib/persisters/persister-sqlite-wasm.js.gz +0 -0
  111. package/lib/persisters/persister-sqlite3.js +1 -0
  112. package/lib/persisters/persister-sqlite3.js.gz +0 -0
  113. package/lib/persisters/persister-yjs.js +1 -0
  114. package/lib/persisters/persister-yjs.js.gz +0 -0
  115. package/lib/persisters.js +1 -1
  116. package/lib/persisters.js.gz +0 -0
  117. package/lib/queries.js +1 -1
  118. package/lib/queries.js.gz +0 -0
  119. package/lib/store.js +1 -1
  120. package/lib/store.js.gz +0 -0
  121. package/lib/tinybase.js +1 -1
  122. package/lib/tinybase.js.gz +0 -0
  123. package/lib/tools.js +1 -1
  124. package/lib/tools.js.gz +0 -0
  125. package/lib/types/checkpoints.d.ts +0 -27
  126. package/lib/types/common.d.ts +0 -9
  127. package/lib/types/indexes.d.ts +0 -26
  128. package/lib/types/metrics.d.ts +0 -23
  129. package/lib/types/{persister-automerge.d.ts → persisters/persister-automerge.d.ts} +4 -6
  130. package/lib/types/{persister-browser.d.ts → persisters/persister-browser.d.ts} +2 -5
  131. package/lib/types/persisters/persister-cr-sqlite-wasm.d.ts +95 -0
  132. package/lib/types/{persister-file.d.ts → persisters/persister-file.d.ts} +3 -5
  133. package/lib/types/{persister-remote.d.ts → persisters/persister-remote.d.ts} +2 -4
  134. package/lib/types/persisters/persister-sqlite-wasm.d.ts +102 -0
  135. package/lib/types/persisters/persister-sqlite3.d.ts +109 -0
  136. package/lib/types/{persister-yjs.d.ts → persisters/persister-yjs.d.ts} +4 -6
  137. package/lib/types/persisters.d.ts +517 -27
  138. package/lib/types/queries.d.ts +52 -127
  139. package/lib/types/relationships.d.ts +0 -26
  140. package/lib/types/store.d.ts +397 -193
  141. package/lib/types/tinybase.d.ts +0 -1
  142. package/lib/types/tools.d.ts +15 -28
  143. package/lib/types/ui-react.d.ts +196 -181
  144. package/lib/types/with-schemas/checkpoints.d.ts +5 -32
  145. package/lib/types/with-schemas/common.d.ts +0 -9
  146. package/lib/types/with-schemas/indexes.d.ts +9 -35
  147. package/lib/types/with-schemas/metrics.d.ts +9 -32
  148. package/lib/types/with-schemas/{persister-automerge.d.ts → persisters/persister-automerge.d.ts} +4 -6
  149. package/lib/types/with-schemas/{persister-browser.d.ts → persisters/persister-browser.d.ts} +2 -5
  150. package/lib/types/with-schemas/persisters/persister-cr-sqlite-wasm.d.ts +105 -0
  151. package/lib/types/with-schemas/{persister-file.d.ts → persisters/persister-file.d.ts} +3 -5
  152. package/lib/types/with-schemas/{persister-remote.d.ts → persisters/persister-remote.d.ts} +2 -4
  153. package/lib/types/with-schemas/persisters/persister-sqlite-wasm.d.ts +113 -0
  154. package/lib/types/with-schemas/persisters/persister-sqlite3.d.ts +119 -0
  155. package/lib/types/with-schemas/{persister-yjs.d.ts → persisters/persister-yjs.d.ts} +4 -6
  156. package/lib/types/with-schemas/persisters.d.ts +534 -29
  157. package/lib/types/with-schemas/queries.d.ts +61 -224
  158. package/lib/types/with-schemas/relationships.d.ts +9 -35
  159. package/lib/types/with-schemas/store.d.ts +544 -236
  160. package/lib/types/with-schemas/tinybase.d.ts +0 -1
  161. package/lib/types/with-schemas/tools.d.ts +19 -32
  162. package/lib/types/with-schemas/ui-react.d.ts +221 -186
  163. package/lib/ui-react.js +1 -1
  164. package/lib/ui-react.js.gz +0 -0
  165. package/lib/umd/persisters/persister-automerge.js +1 -0
  166. package/lib/umd/persisters/persister-automerge.js.gz +0 -0
  167. package/lib/umd/persisters/persister-browser.js +1 -0
  168. package/lib/umd/persisters/persister-browser.js.gz +0 -0
  169. package/lib/umd/persisters/persister-cr-sqlite-wasm.js +1 -0
  170. package/lib/umd/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
  171. package/lib/umd/persisters/persister-file.js +1 -0
  172. package/lib/umd/persisters/persister-file.js.gz +0 -0
  173. package/lib/umd/persisters/persister-remote.js +1 -0
  174. package/lib/umd/persisters/persister-remote.js.gz +0 -0
  175. package/lib/umd/persisters/persister-sqlite-wasm.js +1 -0
  176. package/lib/umd/persisters/persister-sqlite-wasm.js.gz +0 -0
  177. package/lib/umd/persisters/persister-sqlite3.js +1 -0
  178. package/lib/umd/persisters/persister-sqlite3.js.gz +0 -0
  179. package/lib/umd/persisters/persister-yjs.js +1 -0
  180. package/lib/umd/persisters/persister-yjs.js.gz +0 -0
  181. package/lib/umd/persisters.js +1 -1
  182. package/lib/umd/persisters.js.gz +0 -0
  183. package/lib/umd/queries.js +1 -1
  184. package/lib/umd/queries.js.gz +0 -0
  185. package/lib/umd/store.js +1 -1
  186. package/lib/umd/store.js.gz +0 -0
  187. package/lib/umd/tinybase.js +1 -1
  188. package/lib/umd/tinybase.js.gz +0 -0
  189. package/lib/umd/tools.js +1 -1
  190. package/lib/umd/tools.js.gz +0 -0
  191. package/lib/umd/ui-react.js +1 -1
  192. package/lib/umd/ui-react.js.gz +0 -0
  193. package/lib/umd-es6/persisters/persister-automerge.js +1 -0
  194. package/lib/umd-es6/persisters/persister-automerge.js.gz +0 -0
  195. package/lib/umd-es6/persisters/persister-browser.js +1 -0
  196. package/lib/umd-es6/persisters/persister-browser.js.gz +0 -0
  197. package/lib/umd-es6/persisters/persister-cr-sqlite-wasm.js +1 -0
  198. package/lib/umd-es6/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
  199. package/lib/umd-es6/persisters/persister-file.js +1 -0
  200. package/lib/umd-es6/persisters/persister-file.js.gz +0 -0
  201. package/lib/umd-es6/persisters/persister-remote.js +1 -0
  202. package/lib/umd-es6/persisters/persister-remote.js.gz +0 -0
  203. package/lib/umd-es6/persisters/persister-sqlite-wasm.js +1 -0
  204. package/lib/umd-es6/persisters/persister-sqlite-wasm.js.gz +0 -0
  205. package/lib/umd-es6/persisters/persister-sqlite3.js +1 -0
  206. package/lib/umd-es6/persisters/persister-sqlite3.js.gz +0 -0
  207. package/lib/umd-es6/persisters/persister-yjs.js +1 -0
  208. package/lib/umd-es6/persisters/persister-yjs.js.gz +0 -0
  209. package/lib/umd-es6/persisters.js +1 -1
  210. package/lib/umd-es6/persisters.js.gz +0 -0
  211. package/lib/umd-es6/queries.js +1 -1
  212. package/lib/umd-es6/queries.js.gz +0 -0
  213. package/lib/umd-es6/store.js +1 -1
  214. package/lib/umd-es6/store.js.gz +0 -0
  215. package/lib/umd-es6/tinybase.js +1 -1
  216. package/lib/umd-es6/tinybase.js.gz +0 -0
  217. package/lib/umd-es6/tools.js +1 -1
  218. package/lib/umd-es6/tools.js.gz +0 -0
  219. package/lib/umd-es6/ui-react.js +1 -1
  220. package/lib/umd-es6/ui-react.js.gz +0 -0
  221. package/package.json +39 -22
  222. package/readme.md +3 -3
  223. package/lib/cjs/persister-automerge.cjs +0 -1
  224. package/lib/cjs/persister-automerge.cjs.gz +0 -0
  225. package/lib/cjs/persister-browser.cjs +0 -1
  226. package/lib/cjs/persister-browser.cjs.gz +0 -0
  227. package/lib/cjs/persister-file.cjs +0 -1
  228. package/lib/cjs/persister-file.cjs.gz +0 -0
  229. package/lib/cjs/persister-remote.cjs +0 -1
  230. package/lib/cjs/persister-remote.cjs.gz +0 -0
  231. package/lib/cjs/persister-yjs.cjs +0 -1
  232. package/lib/cjs/persister-yjs.cjs.gz +0 -0
  233. package/lib/cjs-es6/persister-automerge.cjs +0 -1
  234. package/lib/cjs-es6/persister-automerge.cjs.gz +0 -0
  235. package/lib/cjs-es6/persister-browser.cjs +0 -1
  236. package/lib/cjs-es6/persister-browser.cjs.gz +0 -0
  237. package/lib/cjs-es6/persister-file.cjs +0 -1
  238. package/lib/cjs-es6/persister-file.cjs.gz +0 -0
  239. package/lib/cjs-es6/persister-remote.cjs +0 -1
  240. package/lib/cjs-es6/persister-remote.cjs.gz +0 -0
  241. package/lib/cjs-es6/persister-yjs.cjs +0 -1
  242. package/lib/cjs-es6/persister-yjs.cjs.gz +0 -0
  243. package/lib/es6/persister-automerge.js +0 -1
  244. package/lib/es6/persister-automerge.js.gz +0 -0
  245. package/lib/es6/persister-browser.js +0 -1
  246. package/lib/es6/persister-browser.js.gz +0 -0
  247. package/lib/es6/persister-file.js +0 -1
  248. package/lib/es6/persister-file.js.gz +0 -0
  249. package/lib/es6/persister-remote.js +0 -1
  250. package/lib/es6/persister-remote.js.gz +0 -0
  251. package/lib/es6/persister-yjs.js +0 -1
  252. package/lib/es6/persister-yjs.js.gz +0 -0
  253. package/lib/persister-automerge.js +0 -1
  254. package/lib/persister-automerge.js.gz +0 -0
  255. package/lib/persister-browser.js +0 -1
  256. package/lib/persister-browser.js.gz +0 -0
  257. package/lib/persister-file.js +0 -1
  258. package/lib/persister-file.js.gz +0 -0
  259. package/lib/persister-remote.js +0 -1
  260. package/lib/persister-remote.js.gz +0 -0
  261. package/lib/persister-yjs.js +0 -1
  262. package/lib/persister-yjs.js.gz +0 -0
  263. package/lib/umd/persister-automerge.js +0 -1
  264. package/lib/umd/persister-automerge.js.gz +0 -0
  265. package/lib/umd/persister-browser.js +0 -1
  266. package/lib/umd/persister-browser.js.gz +0 -0
  267. package/lib/umd/persister-file.js +0 -1
  268. package/lib/umd/persister-file.js.gz +0 -0
  269. package/lib/umd/persister-remote.js +0 -1
  270. package/lib/umd/persister-remote.js.gz +0 -0
  271. package/lib/umd/persister-yjs.js +0 -1
  272. package/lib/umd/persister-yjs.js.gz +0 -0
  273. package/lib/umd-es6/persister-automerge.js +0 -1
  274. package/lib/umd-es6/persister-automerge.js.gz +0 -0
  275. package/lib/umd-es6/persister-browser.js +0 -1
  276. package/lib/umd-es6/persister-browser.js.gz +0 -0
  277. package/lib/umd-es6/persister-file.js +0 -1
  278. package/lib/umd-es6/persister-file.js.gz +0 -0
  279. package/lib/umd-es6/persister-remote.js +0 -1
  280. package/lib/umd-es6/persister-remote.js.gz +0 -0
  281. package/lib/umd-es6/persister-yjs.js +0 -1
  282. package/lib/umd-es6/persister-yjs.js.gz +0 -0
@@ -6,10 +6,9 @@
6
6
  * function, which returns a new Queries object. That object in turn has methods
7
7
  * that let you create new query definitions, access their results directly, and
8
8
  * register listeners for when those results change.
9
- *
10
9
  * @packageDocumentation
11
10
  * @module queries
12
- * @since v2.0
11
+ * @since v2.0.0
13
12
  */
14
13
 
15
14
  import {Cell, CellOrUndefined, GetCell, Store} from './store.d';
@@ -23,7 +22,6 @@ import {Id, IdOrNull, Ids} from './common.d';
23
22
  * addResultTableListener method. It is similar to the Table type in the store
24
23
  * module, but without schema-specific typing, and is a regular JavaScript
25
24
  * object containing individual ResultRow objects, keyed by their Id.
26
- *
27
25
  * @example
28
26
  * ```js
29
27
  * const resultTable: ResultTable = {
@@ -43,7 +41,6 @@ export type ResultTable = {[rowId: Id]: ResultRow};
43
41
  * addResultRowListener method. It is similar to the Row type in the store
44
42
  * module, but without schema-specific typing, and is a regular JavaScript
45
43
  * object containing individual ResultCell objects, keyed by their Id.
46
- *
47
44
  * @example
48
45
  * ```js
49
46
  * const resultRow: ResultRow = {species: 'dog', color: 'brown'};
@@ -60,7 +57,6 @@ export type ResultRow = {[cellId: Id]: ResultCell};
60
57
  * addResultCellListener method. It is similar to the Cell type in the store
61
58
  * module, but without schema-specific typing, and is a JavaScript string,
62
59
  * number, or boolean.
63
- *
64
60
  * @example
65
61
  * ```js
66
62
  * const resultCell: ResultCell = 'dog';
@@ -72,7 +68,6 @@ export type ResultCell = string | number | boolean;
72
68
  /**
73
69
  * The ResultCellOrUndefined type is the data structure representing a single
74
70
  * cell in the results of a query, or the value `undefined`.
75
- *
76
71
  * @category Result
77
72
  */
78
73
  export type ResultCellOrUndefined = ResultCell | undefined;
@@ -84,12 +79,11 @@ export type ResultCellOrUndefined = ResultCell | undefined;
84
79
  * There are a number of common predefined aggregators, such as for counting,
85
80
  * summing, and averaging values. This type is instead used for when you wish to
86
81
  * use a more complex aggregation of your own devising.
87
- *
88
82
  * @param cells The array of Cell values to be aggregated.
89
83
  * @param length The length of the array of Cell values to be aggregated.
90
84
  * @returns The value of the aggregation.
91
85
  * @category Aggregators
92
- * @since v2.0
86
+ * @since v2.0.0
93
87
  */
94
88
  export type Aggregate = (cells: Cell[], length: number) => ResultCell;
95
89
 
@@ -109,13 +103,12 @@ export type Aggregate = (cells: Cell[], length: number) => ResultCell;
109
103
  * Where possible, if you are providing a custom Aggregate, seek an
110
104
  * implementation of an AggregateAdd function that can reduce the complexity
111
105
  * cost of growing the input data set.
112
- *
113
106
  * @param current The current value of the aggregation.
114
107
  * @param add The Cell value being added to the aggregation.
115
108
  * @param length The length of the array of Cell values in the aggregation.
116
109
  * @returns The new value of the aggregation.
117
110
  * @category Aggregators
118
- * @since v2.0
111
+ * @since v2.0.0
119
112
  */
120
113
  export type AggregateAdd = (
121
114
  current: Cell,
@@ -142,13 +135,12 @@ export type AggregateAdd = (
142
135
  * Where possible, if you are providing a custom Aggregate, seek an
143
136
  * implementation of an AggregateRemove function that can reduce the complexity
144
137
  * cost of shrinking the input data set.
145
- *
146
138
  * @param current The current value of the aggregation.
147
139
  * @param remove The Cell value being removed from the aggregation.
148
140
  * @param length The length of the array of Cell values in the aggregation.
149
141
  * @returns The new value of the aggregation.
150
142
  * @category Aggregators
151
- * @since v2.0
143
+ * @since v2.0.0
152
144
  */
153
145
  export type AggregateRemove = (
154
146
  current: Cell,
@@ -173,14 +165,13 @@ export type AggregateRemove = (
173
165
  * Where possible, if you are providing a custom Aggregate, seek an
174
166
  * implementation of an AggregateReplace function that can reduce the complexity
175
167
  * cost of changing the input data set in place.
176
- *
177
168
  * @param current The current value of the aggregation.
178
169
  * @param add The Cell value being added to the aggregation.
179
170
  * @param remove The Cell value being removed from the aggregation.
180
171
  * @param length The length of the array of Cell values in the aggregation.
181
172
  * @returns The new value of the aggregation.
182
173
  * @category Aggregators
183
- * @since v2.0
174
+ * @since v2.0.0
184
175
  */
185
176
  export type AggregateReplace = (
186
177
  current: Cell,
@@ -195,10 +186,9 @@ export type AggregateReplace = (
195
186
  * A QueryCallback is provided when using the forEachQuery method, so that you
196
187
  * can do something based on every query in the Queries object. See that method
197
188
  * for specific examples.
198
- *
199
189
  * @param queryId The Id of the query that the callback can operate on.
200
190
  * @category Callback
201
- * @since v2.0
191
+ * @since v2.0.0
202
192
  */
203
193
  export type QueryCallback = (queryId: Id) => void;
204
194
 
@@ -209,7 +199,6 @@ export type QueryCallback = (queryId: Id) => void;
209
199
  * A ResultTableCallback is provided when using the forEachResultTable method,
210
200
  * so that you can do something based on every ResultTable in the Queries
211
201
  * object. See that method for specific examples.
212
- *
213
202
  * @param tableId The Id of the ResultTable that the callback can operate on.
214
203
  * @param forEachRow A function that will let you iterate over the ResultRow
215
204
  * objects in this ResultTable.
@@ -227,7 +216,6 @@ export type ResultTableCallback = (
227
216
  * A ResultRowCallback is provided when using the forEachResultRow method, so
228
217
  * that you can do something based on every ResultRow in a ResultTable. See that
229
218
  * method for specific examples.
230
- *
231
219
  * @param rowId The Id of the ResultRow that the callback can operate on.
232
220
  * @param forEachRow A function that will let you iterate over the ResultCell
233
221
  * values in this ResultRow.
@@ -245,7 +233,6 @@ export type ResultRowCallback = (
245
233
  * A ResultCellCallback is provided when using the forEachResultCell method, so
246
234
  * that you can do something based on every ResultCell in a ResultRow. See that
247
235
  * method for specific examples.
248
- *
249
236
  * @param cellId The Id of the ResultCell that the callback can operate on.
250
237
  * @param cell The value of the ResultCell.
251
238
  * @category Callback
@@ -263,14 +250,13 @@ export type ResultCellCallback = (cellId: Id, cell: ResultCell) => void;
263
250
  * object, the Id of the ResultTable that changed (which is the same as the
264
251
  * query Id), and a GetCellResultChange function that can be used to query
265
252
  * ResultCell values before and after the change.
266
- *
267
253
  * @param queries A reference to the Queries object that changed.
268
254
  * @param tableId The Id of the ResultTable that changed, which is also the
269
255
  * query Id.
270
256
  * @param getCellChange A function that returns information about any
271
257
  * ResultCell's changes.
272
258
  * @category Listener
273
- * @since v2.0
259
+ * @since v2.0.0
274
260
  */
275
261
  export type ResultTableListener = (
276
262
  queries: Queries,
@@ -288,12 +274,11 @@ export type ResultTableListener = (
288
274
  * When called, a ResultRowIdsListener is given a reference to the Queries
289
275
  * object, and the Id of the ResultTable whose ResultRow Ids changed (which is
290
276
  * the same as the query Id).
291
- *
292
277
  * @param queries A reference to the Queries object that changed.
293
278
  * @param tableId The Id of the ResultTable that changed, which is also the
294
279
  * query Id.
295
280
  * @category Listener
296
- * @since v2.0
281
+ * @since v2.0.0
297
282
  */
298
283
  export type ResultRowIdsListener = (queries: Queries, tableId: Id) => void;
299
284
 
@@ -311,7 +296,6 @@ export type ResultRowIdsListener = (queries: Queries, tableId: Id) => void;
311
296
  * for pagination purposes. It also receives the sorted array of Ids itself, so
312
297
  * that you can use them in the listener without the additional cost of an
313
298
  * explicit call to getResultSortedRowIds.
314
- *
315
299
  * @param queries A reference to the Queries object that changed.
316
300
  * @param tableId The Id of the ResultTable that changed, which is also the
317
301
  * query Id.
@@ -322,7 +306,7 @@ export type ResultRowIdsListener = (queries: Queries, tableId: Id) => void;
322
306
  * @param limit The maximum number of ResultRow Ids returned.
323
307
  * @param sortedRowIds The sorted ResultRow Ids themselves.
324
308
  * @category Listener
325
- * @since v2.0
309
+ * @since v2.0.0
326
310
  */
327
311
  export type ResultSortedRowIdsListener = (
328
312
  queries: Queries,
@@ -345,7 +329,6 @@ export type ResultSortedRowIdsListener = (
345
329
  * the Id of the ResultTable that changed (which is the same as the query Id),
346
330
  * the Id of the ResultRow that changed, and a GetCellResultChange function that
347
331
  * can be used to query ResultCell values before and after the change.
348
- *
349
332
  * @param queries A reference to the Queries object that changed.
350
333
  * @param tableId The Id of the ResultTable that changed, which is also the
351
334
  * query Id.
@@ -353,7 +336,7 @@ export type ResultSortedRowIdsListener = (
353
336
  * @param getCellChange A function that returns information about any
354
337
  * ResultCell's changes.
355
338
  * @category Listener
356
- * @since v2.0
339
+ * @since v2.0.0
357
340
  */
358
341
  export type ResultRowListener = (
359
342
  queries: Queries,
@@ -372,13 +355,12 @@ export type ResultRowListener = (
372
355
  * When called, a ResultCellIdsListener is given a reference to the Queries
373
356
  * object, the Id of the ResultTable that changed (which is the same as the
374
357
  * query Id), and the Id of the ResultRow whose ResultCell Ids changed.
375
- *
376
358
  * @param queries A reference to the Queries object that changed.
377
359
  * @param tableId The Id of the ResultTable that changed, which is also the
378
360
  * query Id.
379
361
  * @param rowId The Id of the ResultRow that changed.
380
362
  * @category Listener
381
- * @since v2.0
363
+ * @since v2.0.0
382
364
  */
383
365
  export type ResultCellIdsListener = (
384
366
  queries: Queries,
@@ -399,7 +381,6 @@ export type ResultCellIdsListener = (
399
381
  * It is also given the new value of the ResultCell, the old value of the
400
382
  * ResultCell, and a GetCellResultChange function that can be used to query
401
383
  * ResultCell values before and after the change.
402
- *
403
384
  * @param queries A reference to the Queries object that changed.
404
385
  * @param tableId The Id of the ResultTable that changed, which is also the
405
386
  * query Id.
@@ -410,7 +391,7 @@ export type ResultCellIdsListener = (
410
391
  * @param getCellChange A function that returns information about any
411
392
  * ResultCell's changes.
412
393
  * @category Listener
413
- * @since v2.0
394
+ * @since v2.0.0
414
395
  */
415
396
  export type ResultCellListener = (
416
397
  queries: Queries,
@@ -430,7 +411,6 @@ export type ResultCellListener = (
430
411
  * the Store changing. The listener can then fetch the previous value of a
431
412
  * ResultCell before the current transaction, the new value after it, and a
432
413
  * convenience flag that indicates that the value has changed.
433
- *
434
414
  * @param tableId The Id of the ResultTable to inspect.
435
415
  * @param rowId The Id of the ResultRow to inspect.
436
416
  * @param cellId The Id of the ResultCell to inspect.
@@ -452,7 +432,6 @@ export type GetCellResultChange = (
452
432
  * every listener when called. This array contains the previous value of a
453
433
  * ResultCell before the current transaction, the new value after it, and a
454
434
  * convenience flag that indicates that the value has changed.
455
- *
456
435
  * @category Listener
457
436
  */
458
437
  export type ResultCellChange = [
@@ -467,9 +446,8 @@ export type ResultCellChange = [
467
446
  *
468
447
  * A QueriesListenerStats object is returned from the getListenerStats method,
469
448
  * and is only populated in a debug build.
470
- *
471
449
  * @category Development
472
- * @since v2.0
450
+ * @since v2.0.0
473
451
  */
474
452
  export type QueriesListenerStats = {
475
453
  /**
@@ -501,16 +479,14 @@ export type QueriesListenerStats = {
501
479
  * A GetTableCell can be provided when setting query definitions, specifically
502
480
  * in the Select and Where clauses when you want to create or filter on
503
481
  * calculated values. See those methods for specific examples.
504
- *
505
482
  * @category Callback
506
- * @since v2.0
483
+ * @since v2.0.0
507
484
  */
508
485
  export type GetTableCell = {
509
486
  /**
510
487
  * When called with one parameter, this function will return the value of
511
488
  * the specified Cell from the query's root Table for the Row being selected
512
489
  * or filtered.
513
- *
514
490
  * @param cellId The Id of the Cell to fetch the value for.
515
491
  * @returns A Cell value or `undefined`.
516
492
  */
@@ -519,7 +495,6 @@ export type GetTableCell = {
519
495
  * When called with two parameters, this function will return the value of
520
496
  * the specified Cell from a Table that has been joined in the query, for
521
497
  * the Row being selected or filtered.
522
- *
523
498
  * @param joinedTableId The Id of the Table to fetch the value from. If the
524
499
  * underlying Table was joined 'as' a different Id, that should instead be
525
500
  * used.
@@ -536,7 +511,6 @@ export type GetTableCell = {
536
511
  * The Select function is provided to the third `query` parameter of the
537
512
  * setQueryDefinition method. A query definition must call the Select function
538
513
  * at least once, otherwise it will be meaningless and return no data.
539
- *
540
514
  * @example
541
515
  * This example shows a query that selects two Cells from the main query Table.
542
516
  *
@@ -624,13 +598,12 @@ export type GetTableCell = {
624
598
  * // -> {cujo: {description: 'dog for Carol'}}
625
599
  * ```
626
600
  * @category Definition
627
- * @since v2.0
601
+ * @since v2.0.0
628
602
  */
629
603
  export type Select = {
630
604
  /**
631
605
  * Calling this function with one Id parameter will indicate that the query
632
606
  * should select the value of the specified Cell from the query's root Table.
633
- *
634
607
  * @param cellId The Id of the Cell to fetch the value for.
635
608
  * @returns A SelectedAs object so that the selected Cell Id can be optionally
636
609
  * aliased.
@@ -640,7 +613,6 @@ export type Select = {
640
613
  * Calling this function with two parameters will indicate that the query
641
614
  * should select the value of the specified Cell from a Table that has been
642
615
  * joined in the query.
643
- *
644
616
  * @param joinedTableId The Id of the Table to fetch the value from. If the
645
617
  * underlying Table was joined 'as' a different Id, that should instead be
646
618
  * used.
@@ -653,7 +625,6 @@ export type Select = {
653
625
  * Calling this function with one callback parameter will indicate that the
654
626
  * query should select a calculated value, based on one or more Cell values in
655
627
  * the root Table or a joined Table, or on the root Table's Row Id.
656
- *
657
628
  * @param getCell A callback that takes a GetTableCell function and the main
658
629
  * Table's Row Id. These can be used to programmatically create a calculated
659
630
  * value from multiple Cell values and the Row Id.
@@ -676,7 +647,6 @@ export type Select = {
676
647
  * Note that if two Select clauses are both aliased to the same name (or if two
677
648
  * columns with the same underlying name are selected, both _without_ aliases),
678
649
  * only the latter of two will be used in the query.
679
- *
680
650
  * @example
681
651
  * This example shows a query that selects two Cells, one from a joined Table.
682
652
  * Both are aliased with the 'as' function:
@@ -710,7 +680,7 @@ export type Select = {
710
680
  * // -> {cujo: {petSpecies: 'dog', ownerName: 'Carol'}}
711
681
  * ```
712
682
  * @category Definition
713
- * @since v2.0
683
+ * @since v2.0.0
714
684
  */
715
685
  export type SelectedAs = {
716
686
  /**
@@ -740,7 +710,6 @@ export type SelectedAs = {
740
710
  * unfiltered query will only ever return the same number of Rows as the main
741
711
  * Table being queried, and indeed the resulting table (assuming it has not been
742
712
  * aggregated) will even preserve the root Table's original Row Ids.
743
- *
744
713
  * @example
745
714
  * This example shows a query that joins a single Table by using an Id present
746
715
  * in the main query Table.
@@ -883,14 +852,13 @@ export type SelectedAs = {
883
852
  * // -> {cujo: {description: 'dog in Washington'}}
884
853
  * ```
885
854
  * @category Definition
886
- * @since v2.0
855
+ * @since v2.0.0
887
856
  */
888
857
  export type Join = {
889
858
  /**
890
859
  * Calling this function with two Id parameters will indicate that the join to
891
860
  * a Row in an adjacent Table is made by finding its Id in a Cell of the
892
861
  * query's root Table.
893
- *
894
862
  * @param joinedTableId The Id of the Table to join to.
895
863
  * @param on The Id of the Cell in the root Table that contains the joined
896
864
  * Table's Row Id.
@@ -902,7 +870,6 @@ export type Join = {
902
870
  * Calling this function with two parameters (where the second is a function)
903
871
  * will indicate that the join to a Row in an adjacent Table is made by
904
872
  * calculating its Id from the Cells and the Row Id of the query's root Table.
905
- *
906
873
  * @param joinedTableId The Id of the Table to join to.
907
874
  * @param on A callback that takes a GetCell function and the root Table's Row
908
875
  * Id. These can be used to programmatically calculate the joined Table's Row
@@ -918,7 +885,6 @@ export type Join = {
918
885
  * Calling this function with three Id parameters will indicate that the join
919
886
  * to a Row in distant Table is made by finding its Id in a Cell of an
920
887
  * intermediately joined Table.
921
- *
922
888
  * @param joinedTableId The Id of the distant Table to join to.
923
889
  * @param fromIntermediateJoinedTableId The Id of an intermediate Table (which
924
890
  * should have been in turn joined to the main query table via other Join
@@ -934,7 +900,6 @@ export type Join = {
934
900
  * will indicate that the join to a Row in distant Table is made by
935
901
  * calculating its Id from the Cells and the Row Id of an intermediately
936
902
  * joined Table.
937
- *
938
903
  * @param joinedTableId The Id of the Table to join to.
939
904
  * @param fromIntermediateJoinedTableId The Id of an intermediate Table (which
940
905
  * should have been in turn joined to the main query table via other Join
@@ -965,7 +930,6 @@ export type Join = {
965
930
  *
966
931
  * For the purposes of clarity, it's recommended to use an alias that does not
967
932
  * collide with a real underlying Table (whether included in the query or not).
968
- *
969
933
  * @example
970
934
  * This example shows a query that joins the same underlying Table twice, for
971
935
  * different purposes. Both joins are aliased with the 'as' function to
@@ -1001,7 +965,7 @@ export type Join = {
1001
965
  * // -> {cujo: {buyer: 'Carol', seller: 'Alice'}}
1002
966
  * ```
1003
967
  * @category Definition
1004
- * @since v2.0
968
+ * @since v2.0.0
1005
969
  */
1006
970
  export type JoinedAs = {
1007
971
  /**
@@ -1029,7 +993,6 @@ export type JoinedAs = {
1029
993
  * describes conditions that should be met by underlying Cell values (whether
1030
994
  * selected or not), and the latter describes conditions based on calculated and
1031
995
  * aggregated values - after Group clauses have been applied.
1032
- *
1033
996
  * @example
1034
997
  * This example shows a query that filters the results from a single Table by
1035
998
  * comparing an underlying Cell from it with a value.
@@ -1124,14 +1087,13 @@ export type JoinedAs = {
1124
1087
  * // -> {cujo: {species: 'dog', state: 'WA'}}
1125
1088
  * ```
1126
1089
  * @category Definition
1127
- * @since v2.0
1090
+ * @since v2.0.0
1128
1091
  */
1129
1092
  export type Where = {
1130
1093
  /**
1131
1094
  * Calling this function with two parameters is used to include only those
1132
1095
  * Rows for which a specified Cell in the query's root Table has a specified
1133
1096
  * value.
1134
- *
1135
1097
  * @param cellId The Id of the Cell in the query's root Table to test.
1136
1098
  * @param equals The value that the Cell has to have for the Row to be
1137
1099
  * included in the result.
@@ -1140,7 +1102,6 @@ export type Where = {
1140
1102
  /**
1141
1103
  * Calling this function with three parameters is used to include only those
1142
1104
  * Rows for which a specified Cell in a joined Table has a specified value.
1143
- *
1144
1105
  * @param joinedTableId The Id of the joined Table to test a value in. If the
1145
1106
  * underlying Table was joined 'as' a different Id, that should instead be
1146
1107
  * used.
@@ -1153,7 +1114,6 @@ export type Where = {
1153
1114
  * Calling this function with one callback parameter is used to include only
1154
1115
  * those Rows which meet a calculated boolean condition, based on values in
1155
1116
  * the main and (optionally) joined Tables.
1156
- *
1157
1117
  * @param condition A callback that takes a GetTableCell function and that
1158
1118
  * should return `true` for the Row to be included in the result.
1159
1119
  */
@@ -1190,7 +1150,6 @@ export type Where = {
1190
1150
  * function's algorithmic complexity by providing shortcuts that can nudge an
1191
1151
  * aggregation result when a single value is added, removed, or replaced in the
1192
1152
  * input values.
1193
- *
1194
1153
  * @param selectedCellId The Id of the Cell to aggregate. If the underlying Cell
1195
1154
  * was selected 'as' a different Id, that should instead be used.
1196
1155
  * @param aggregate Either a string representing one of a set of common
@@ -1330,7 +1289,7 @@ export type Where = {
1330
1289
  * // Both have a parrot at 3. Alice's worm at 1 is excluded from aggregation.
1331
1290
  * ```
1332
1291
  * @category Definition
1333
- * @since v2.0
1292
+ * @since v2.0.0
1334
1293
  */
1335
1294
  export type Group = (
1336
1295
  selectedCellId: Id,
@@ -1347,7 +1306,6 @@ export type Group = (
1347
1306
  * Note that if two Group clauses are both aliased to the same name (or if you
1348
1307
  * create two groups of the same underlying Cell, both _without_ aliases), only
1349
1308
  * the latter of two will be used in the query.
1350
- *
1351
1309
  * @example
1352
1310
  * This example shows a query that groups the same underlying Cell twice, for
1353
1311
  * different purposes. Both groups are aliased with the 'as' function to
@@ -1376,7 +1334,7 @@ export type Group = (
1376
1334
  * // -> {1: {species: 'cat', minPrice: 3, maxPrice: 4}}
1377
1335
  * ```
1378
1336
  * @category Definition
1379
- * @since v2.0
1337
+ * @since v2.0.0
1380
1338
  */
1381
1339
  export type GroupedAs = {
1382
1340
  /**
@@ -1406,7 +1364,6 @@ export type GroupedAs = {
1406
1364
  * have not been grouped with a Group clause, you should expect it to be less
1407
1365
  * performant than using a Where clause, due to that being applied earlier in
1408
1366
  * the query process.
1409
- *
1410
1367
  * @example
1411
1368
  * This example shows a query that filters the results from a grouped Table by
1412
1369
  * comparing a Cell from it with a value.
@@ -1471,14 +1428,13 @@ export type GroupedAs = {
1471
1428
  * // Parrots are filtered out because they have zero range in price.
1472
1429
  * ```
1473
1430
  * @category Definition
1474
- * @since v2.0
1431
+ * @since v2.0.0
1475
1432
  */
1476
1433
  export type Having = {
1477
1434
  /**
1478
1435
  * Calling this function with two parameters is used to include only those
1479
1436
  * Rows for which a specified Cell in the query's root Table has a specified
1480
1437
  * value.
1481
- *
1482
1438
  * @param selectedOrGroupedCellId The Id of the Cell in the query to test.
1483
1439
  * @param equals The value that the Cell has to have for the Row to be
1484
1440
  * included in the result.
@@ -1487,7 +1443,6 @@ export type Having = {
1487
1443
  /**
1488
1444
  * Calling this function with one callback parameter is used to include only
1489
1445
  * those Rows which meet a calculated boolean condition.
1490
- *
1491
1446
  * @param condition A callback that takes a GetCell function and that should
1492
1447
  * return `true` for the Row to be included in the result.
1493
1448
  */
@@ -1513,7 +1468,6 @@ export type Having = {
1513
1468
  * getResultCell method, and so on), and add listeners for when they change
1514
1469
  * (with the addResultTableListener method, the addResultRowListener method, the
1515
1470
  * addResultCellListener method, and so on).
1516
- *
1517
1471
  * @example
1518
1472
  * This example shows a very simple lifecycle of a Queries object: from
1519
1473
  * creation, to adding definitions, getting their contents, and then registering
@@ -1589,7 +1543,7 @@ export type Having = {
1589
1543
  * @see Car Analysis demo
1590
1544
  * @see Movie Database demo
1591
1545
  * @category Queries
1592
- * @since v2.0
1546
+ * @since v2.0.0
1593
1547
  */
1594
1548
  export interface Queries {
1595
1549
  //
@@ -1626,7 +1580,6 @@ export interface Queries {
1626
1580
  *
1627
1581
  * Additionally, you can use the getResultSortedRowIds method and
1628
1582
  * addResultSortedRowIdsListener method to sort and paginate the results.
1629
- *
1630
1583
  * @param queryId The Id of the query to define.
1631
1584
  * @param tableId The Id of the root Table the query will be based on.
1632
1585
  * @param query A callback which can take a `keywords` object and which uses
@@ -1654,7 +1607,7 @@ export interface Queries {
1654
1607
  * // -> {fido: {color: 'brown'}, cujo: {color: 'black'}}
1655
1608
  * ```
1656
1609
  * @category Configuration
1657
- * @since v2.0
1610
+ * @since v2.0.0
1658
1611
  */
1659
1612
  setQueryDefinition(
1660
1613
  queryId: Id,
@@ -1670,7 +1623,6 @@ export interface Queries {
1670
1623
 
1671
1624
  /**
1672
1625
  * The delQueryDefinition method removes an existing query definition.
1673
- *
1674
1626
  * @param queryId The Id of the query to remove.
1675
1627
  * @returns A reference to the Queries object.
1676
1628
  * @example
@@ -1697,14 +1649,13 @@ export interface Queries {
1697
1649
  * // -> []
1698
1650
  * ```
1699
1651
  * @category Configuration
1700
- * @since v2.0
1652
+ * @since v2.0.0
1701
1653
  */
1702
1654
  delQueryDefinition(queryId: Id): Queries;
1703
1655
 
1704
1656
  /**
1705
1657
  * The getStore method returns a reference to the underlying Store that is
1706
1658
  * backing this Queries object.
1707
- *
1708
1659
  * @returns A reference to the Store.
1709
1660
  * @example
1710
1661
  * This example creates a Queries object against a newly-created Store and
@@ -1723,14 +1674,13 @@ export interface Queries {
1723
1674
  * // -> {fido: {color: 'brown'}}
1724
1675
  * ```
1725
1676
  * @category Getter
1726
- * @since v2.0
1677
+ * @since v2.0.0
1727
1678
  */
1728
1679
  getStore(): Store;
1729
1680
 
1730
1681
  /**
1731
1682
  * The getQueryIds method returns an array of the query Ids registered with
1732
1683
  * this Queries object.
1733
- *
1734
1684
  * @returns An array of Ids.
1735
1685
  * @example
1736
1686
  * This example creates a Queries object with two definitions, and then gets
@@ -1751,7 +1701,7 @@ export interface Queries {
1751
1701
  * // -> ['dogColors', 'catColors']
1752
1702
  * ```
1753
1703
  * @category Getter
1754
- * @since v2.0
1704
+ * @since v2.0.0
1755
1705
  */
1756
1706
  getQueryIds(): Ids;
1757
1707
 
@@ -1762,7 +1712,6 @@ export interface Queries {
1762
1712
  * This method is useful for iterating over all the queries in a functional
1763
1713
  * style. The `queryCallback` parameter is a QueryCallback function that will
1764
1714
  * be called with the Id of each query.
1765
- *
1766
1715
  * @param queryCallback The function that should be called for every query.
1767
1716
  * @example
1768
1717
  * This example iterates over each query in a Queries object.
@@ -1785,14 +1734,13 @@ export interface Queries {
1785
1734
  * // -> 'catColors'
1786
1735
  * ```
1787
1736
  * @category Iterator
1788
- * @since v2.0
1737
+ * @since v2.0.0
1789
1738
  */
1790
1739
  forEachQuery(queryCallback: QueryCallback): void;
1791
1740
 
1792
1741
  /**
1793
1742
  * The hasQuery method returns a boolean indicating whether a given query
1794
1743
  * exists in the Queries object.
1795
- *
1796
1744
  * @param queryId The Id of a possible query in the Queries object.
1797
1745
  * @returns Whether a query with that Id exists.
1798
1746
  * @example
@@ -1814,7 +1762,7 @@ export interface Queries {
1814
1762
  * // -> false
1815
1763
  * ```
1816
1764
  * @category Getter
1817
- * @since v2.0
1765
+ * @since v2.0.0
1818
1766
  */
1819
1767
  hasQuery(queryId: Id): boolean;
1820
1768
 
@@ -1823,7 +1771,6 @@ export interface Queries {
1823
1771
  * backing a query.
1824
1772
  *
1825
1773
  * If the query Id is invalid, the method returns `undefined`.
1826
- *
1827
1774
  * @param queryId The Id of a query.
1828
1775
  * @returns The Id of the Table backing the query, or `undefined`.
1829
1776
  * @example
@@ -1847,7 +1794,7 @@ export interface Queries {
1847
1794
  * // -> undefined
1848
1795
  * ```
1849
1796
  * @category Getter
1850
- * @since v2.0
1797
+ * @since v2.0.0
1851
1798
  */
1852
1799
  getTableId(queryId: Id): Id | undefined;
1853
1800
 
@@ -1860,7 +1807,6 @@ export interface Queries {
1860
1807
  * returns a copy of, rather than a reference to the underlying data, so
1861
1808
  * changes made to the returned object are not made to the query results
1862
1809
  * themselves.
1863
- *
1864
1810
  * @param queryId The Id of a query.
1865
1811
  * @returns An object containing the entire data of the ResultTable of the
1866
1812
  * query.
@@ -1893,7 +1839,7 @@ export interface Queries {
1893
1839
  * // -> {}
1894
1840
  * ```
1895
1841
  * @category Result
1896
- * @since v2.0
1842
+ * @since v2.0.0
1897
1843
  */
1898
1844
  getResultTable(queryId: Id): ResultTable;
1899
1845
 
@@ -1905,7 +1851,6 @@ export interface Queries {
1905
1851
  * the query Id is invalid, the method returns an empty array. Similarly, it
1906
1852
  * returns a copy of, rather than a reference to the list of Ids, so changes
1907
1853
  * made to the list object are not made to the query results themselves.
1908
- *
1909
1854
  * @param queryId The Id of a query.
1910
1855
  * @returns An array of the Ids of every ResultRow in the result of the query.
1911
1856
  * @example
@@ -1936,7 +1881,7 @@ export interface Queries {
1936
1881
  * // -> []
1937
1882
  * ```
1938
1883
  * @category Result
1939
- * @since v2.0
1884
+ * @since v2.0.0
1940
1885
  */
1941
1886
  getResultRowIds(queryId: Id): Ids;
1942
1887
 
@@ -1957,7 +1902,6 @@ export interface Queries {
1957
1902
  * results yourself, especially when the ResultTable is large. For a
1958
1903
  * performant approach to tracking the sorted ResultRow Ids when they change,
1959
1904
  * use the addResultSortedRowIdsListener method.
1960
- *
1961
1905
  * @param queryId The Id of a query.
1962
1906
  * @param cellId The Id of the ResultCell whose values are used for the
1963
1907
  * sorting, or `undefined` to by sort the ResultRow Id itself.
@@ -1996,7 +1940,7 @@ export interface Queries {
1996
1940
  * // -> []
1997
1941
  * ```
1998
1942
  * @category Result
1999
- * @since v2.0
1943
+ * @since v2.0.0
2000
1944
  */
2001
1945
  getResultSortedRowIds(
2002
1946
  queryId: Id,
@@ -2015,7 +1959,6 @@ export interface Queries {
2015
1959
  * Similarly, it returns a copy of, rather than a reference to the underlying
2016
1960
  * data, so changes made to the returned object are not made to the query
2017
1961
  * results themselves.
2018
- *
2019
1962
  * @param queryId The Id of a query.
2020
1963
  * @param rowId The Id of the ResultRow in the ResultTable.
2021
1964
  * @returns An object containing the entire data of the ResultRow in the
@@ -2048,7 +1991,7 @@ export interface Queries {
2048
1991
  * // -> {}
2049
1992
  * ```
2050
1993
  * @category Result
2051
- * @since v2.0
1994
+ * @since v2.0.0
2052
1995
  */
2053
1996
  getResultRow(queryId: Id, rowId: Id): ResultRow;
2054
1997
 
@@ -2061,7 +2004,6 @@ export interface Queries {
2061
2004
  * Similarly, it returns a copy of, rather than a reference to the list of
2062
2005
  * Ids, so changes made to the list object are not made to the query results
2063
2006
  * themselves.
2064
- *
2065
2007
  * @param queryId The Id of a query.
2066
2008
  * @param rowId The Id of the ResultRow in the ResultTable.
2067
2009
  * @returns An array of the Ids of every ResultCell in the ResultRow in the
@@ -2094,7 +2036,7 @@ export interface Queries {
2094
2036
  * // -> []
2095
2037
  * ```
2096
2038
  * @category Result
2097
- * @since v2.0
2039
+ * @since v2.0.0
2098
2040
  */
2099
2041
  getResultCellIds(queryId: Id, rowId: Id): Ids;
2100
2042
 
@@ -2105,7 +2047,6 @@ export interface Queries {
2105
2047
  * This has the same behavior as a Store's getCell method. For example, if the
2106
2048
  * query, or ResultRow, or ResultCell Id is invalid, the method returns
2107
2049
  * `undefined`.
2108
- *
2109
2050
  * @param queryId The Id of a query.
2110
2051
  * @param rowId The Id of the ResultRow in the ResultTable.
2111
2052
  * @param cellId The Id of the ResultCell in the ResultRow.
@@ -2138,14 +2079,13 @@ export interface Queries {
2138
2079
  * // -> undefined
2139
2080
  * ```
2140
2081
  * @category Result
2141
- * @since v2.0
2082
+ * @since v2.0.0
2142
2083
  */
2143
2084
  getResultCell(queryId: Id, rowId: Id, cellId: Id): ResultCellOrUndefined;
2144
2085
 
2145
2086
  /**
2146
2087
  * The hasResultTable method returns a boolean indicating whether a given
2147
2088
  * ResultTable exists.
2148
- *
2149
2089
  * @param queryId The Id of a possible query.
2150
2090
  * @returns Whether a ResultTable for that query Id exists.
2151
2091
  * @example
@@ -2173,14 +2113,13 @@ export interface Queries {
2173
2113
  * // -> false
2174
2114
  * ```
2175
2115
  * @category Result
2176
- * @since v2.0
2116
+ * @since v2.0.0
2177
2117
  */
2178
2118
  hasResultTable(queryId: Id): boolean;
2179
2119
 
2180
2120
  /**
2181
2121
  * The hasResultRow method returns a boolean indicating whether a given
2182
2122
  * ResultRow exists.
2183
- *
2184
2123
  * @param queryId The Id of a possible query.
2185
2124
  * @param rowId The Id of a possible ResultRow.
2186
2125
  * @returns Whether a ResultRow for that Id exists.
@@ -2209,14 +2148,13 @@ export interface Queries {
2209
2148
  * // -> false
2210
2149
  * ```
2211
2150
  * @category Result
2212
- * @since v2.0
2151
+ * @since v2.0.0
2213
2152
  */
2214
2153
  hasResultRow(queryId: Id, rowId: Id): boolean;
2215
2154
 
2216
2155
  /**
2217
2156
  * The hasResultCell method returns a boolean indicating whether a given
2218
2157
  * ResultCell exists.
2219
- *
2220
2158
  * @param queryId The Id of a possible query.
2221
2159
  * @param rowId The Id of a possible ResultRow.
2222
2160
  * @param cellId The Id of a possible ResultCell.
@@ -2246,7 +2184,7 @@ export interface Queries {
2246
2184
  * // -> false
2247
2185
  * ```
2248
2186
  * @category Result
2249
- * @since v2.0
2187
+ * @since v2.0.0
2250
2188
  */
2251
2189
  hasResultCell(queryId: Id, rowId: Id, cellId: Id): boolean;
2252
2190
 
@@ -2259,7 +2197,6 @@ export interface Queries {
2259
2197
  * ResultTableCallback function that will be called with the Id of each
2260
2198
  * ResultTable, and with a function that can then be used to iterate over each
2261
2199
  * ResultRow of the ResultTable, should you wish.
2262
- *
2263
2200
  * @param tableCallback The function that should be called for every query's
2264
2201
  * ResultTable.
2265
2202
  * @example
@@ -2293,7 +2230,7 @@ export interface Queries {
2293
2230
  * // -> '- felix'
2294
2231
  * ```
2295
2232
  * @category Iterator
2296
- * @since v2.0
2233
+ * @since v2.0.0
2297
2234
  */
2298
2235
  forEachResultTable(tableCallback: ResultTableCallback): void;
2299
2236
 
@@ -2306,7 +2243,6 @@ export interface Queries {
2306
2243
  * ResultRowCallback function that will be called with the Id of each
2307
2244
  * ResultRow, and with a function that can then be used to iterate over each
2308
2245
  * ResultCell of the ResultRow, should you wish.
2309
- *
2310
2246
  * @param queryId The Id of a query.
2311
2247
  * @param rowCallback The function that should be called for every ResultRow
2312
2248
  * of the query's ResultTable.
@@ -2339,7 +2275,7 @@ export interface Queries {
2339
2275
  * // -> '- color'
2340
2276
  * ```
2341
2277
  * @category Iterator
2342
- * @since v2.0
2278
+ * @since v2.0.0
2343
2279
  */
2344
2280
  forEachResultRow(queryId: Id, rowCallback: ResultRowCallback): void;
2345
2281
 
@@ -2351,7 +2287,6 @@ export interface Queries {
2351
2287
  * of the query in a functional style. The `cellCallback` parameter is a
2352
2288
  * ResultCellCallback function that will be called with the Id and value of
2353
2289
  * each ResultCell.
2354
- *
2355
2290
  * @param queryId The Id of a query.
2356
2291
  * @param rowId The Id of a ResultRow in the query's ResultTable.
2357
2292
  * @param cellCallback The function that should be called for every ResultCell
@@ -2383,7 +2318,7 @@ export interface Queries {
2383
2318
  * // -> 'color: brown'
2384
2319
  * ```
2385
2320
  * @category Iterator
2386
- * @since v2.0
2321
+ * @since v2.0.0
2387
2322
  */
2388
2323
  forEachResultCell(
2389
2324
  queryId: Id,
@@ -2403,7 +2338,6 @@ export interface Queries {
2403
2338
  * You can either listen to a single ResultTable (by specifying a query Id as
2404
2339
  * the method's first parameter) or changes to any ResultTable (by providing a
2405
2340
  * `null` wildcard).
2406
- *
2407
2341
  * @param queryId The Id of the query to listen to, or `null` as a wildcard.
2408
2342
  * @param listener The function that will be called whenever data in the
2409
2343
  * matching ResultTable changes.
@@ -2478,7 +2412,7 @@ export interface Queries {
2478
2412
  * store.delListener(listenerId);
2479
2413
  * ```
2480
2414
  * @category Listener
2481
- * @since v2.0
2415
+ * @since v2.0.0
2482
2416
  */
2483
2417
  addResultTableListener(queryId: IdOrNull, listener: ResultTableListener): Id;
2484
2418
 
@@ -2498,7 +2432,6 @@ export interface Queries {
2498
2432
  * You can either listen to a single ResultTable (by specifying a query Id as
2499
2433
  * the method's first parameter) or changes to any ResultTable (by providing a
2500
2434
  * `null` wildcard).
2501
- *
2502
2435
  * @param queryId The Id of the query to listen to, or `null` as a wildcard.
2503
2436
  * @param listener The function that will be called whenever the ResultRow Ids
2504
2437
  * in the ResultTable change.
@@ -2573,7 +2506,7 @@ export interface Queries {
2573
2506
  * store.delListener(listenerId);
2574
2507
  * ```
2575
2508
  * @category Listener
2576
- * @since v2.0
2509
+ * @since v2.0.0
2577
2510
  */
2578
2511
  addResultRowIdsListener(
2579
2512
  queryId: IdOrNull,
@@ -2606,7 +2539,6 @@ export interface Queries {
2606
2539
  * should be in descending order. The `offset` and `limit` parameters are used
2607
2540
  * to paginate results, but default to `0` and `undefined` to return all
2608
2541
  * available ResultRow Ids if not specified.
2609
- *
2610
2542
  * @param queryId The Id of the query to listen to.
2611
2543
  * @param cellId The Id of the ResultCell whose values are used for the
2612
2544
  * sorting, or `undefined` to by sort the ResultRow Id itself.
@@ -2700,7 +2632,7 @@ export interface Queries {
2700
2632
  * store.delListener(listenerId);
2701
2633
  * ```
2702
2634
  * @category Listener
2703
- * @since v2.0
2635
+ * @since v2.0.0
2704
2636
  */
2705
2637
  addResultSortedRowIdsListener(
2706
2638
  queryId: Id,
@@ -2728,7 +2660,6 @@ export interface Queries {
2728
2660
  * wildcarded with `null`. You can listen to a specific ResultRow in a
2729
2661
  * specific query, any ResultRow in a specific query, a specific ResultRow in
2730
2662
  * any query, or any ResultRow in any query.
2731
- *
2732
2663
  * @param queryId The Id of the query to listen to, or `null` as a wildcard.
2733
2664
  * @param rowId The Id of the ResultRow to listen to, or `null` as a wildcard.
2734
2665
  * @param listener The function that will be called whenever data in the
@@ -2806,7 +2737,7 @@ export interface Queries {
2806
2737
  * store.delListener(listenerId);
2807
2738
  * ```
2808
2739
  * @category Listener
2809
- * @since v2.0
2740
+ * @since v2.0.0
2810
2741
  */
2811
2742
  addResultRowListener(
2812
2743
  queryId: IdOrNull,
@@ -2835,7 +2766,6 @@ export interface Queries {
2835
2766
  * wildcarded with `null`. You can listen to a specific ResultRow in a
2836
2767
  * specific query, any ResultRow in a specific query, a specific ResultRow in
2837
2768
  * any query, or any ResultRow in any query.
2838
- *
2839
2769
  * @param queryId The Id of the query to listen to, or `null` as a wildcard.
2840
2770
  * @param rowId The Id of the ResultRow to listen to, or `null` as a wildcard.
2841
2771
  * @param listener The function that will be called whenever the ResultCell
@@ -2918,7 +2848,7 @@ export interface Queries {
2918
2848
  * store.delListener(listenerId);
2919
2849
  * ```
2920
2850
  * @category Listener
2921
- * @since v2.0
2851
+ * @since v2.0.0
2922
2852
  */
2923
2853
  addResultCellIdsListener(
2924
2854
  queryId: IdOrNull,
@@ -2945,7 +2875,6 @@ export interface Queries {
2945
2875
  * be wildcarded with `null`. You can listen to a specific ResultCell in a
2946
2876
  * specific ResultRow in a specific query, any ResultCell in any ResultRow in
2947
2877
  * any query, for example - or every other combination of wildcards.
2948
- *
2949
2878
  * @param queryId The Id of the query to listen to, or `null` as a wildcard.
2950
2879
  * @param rowId The Id of the ResultRow to listen to, or `null` as a wildcard.
2951
2880
  * @param cellId The Id of the ResultCell to listen to, or `null` as a
@@ -3034,7 +2963,7 @@ export interface Queries {
3034
2963
  * store.delListener(listenerId);
3035
2964
  * ```
3036
2965
  * @category Listener
3037
- * @since v2.0
2966
+ * @since v2.0.0
3038
2967
  */
3039
2968
  addResultCellListener(
3040
2969
  queryId: IdOrNull,
@@ -3049,7 +2978,6 @@ export interface Queries {
3049
2978
  *
3050
2979
  * Use the Id returned by the addMetricListener method. Note that the Queries
3051
2980
  * object may re-use this Id for future listeners added to it.
3052
- *
3053
2981
  * @param listenerId The Id of the listener to remove.
3054
2982
  * @returns A reference to the Queries object.
3055
2983
  * @example
@@ -3085,7 +3013,7 @@ export interface Queries {
3085
3013
  * // The listener is not called.
3086
3014
  * ```
3087
3015
  * @category Listener
3088
- * @since v2.0
3016
+ * @since v2.0.0
3089
3017
  */
3090
3018
  delListener(listenerId: Id): Queries;
3091
3019
 
@@ -3095,7 +3023,6 @@ export interface Queries {
3095
3023
  *
3096
3024
  * This guarantees that all of the listeners that the object registered with
3097
3025
  * the underlying Store are removed and it can be correctly garbage collected.
3098
- *
3099
3026
  * @example
3100
3027
  * This example creates a Store, adds a Queries object with a definition (that
3101
3028
  * registers a RowListener with the underlying Store), and then destroys it
@@ -3121,7 +3048,7 @@ export interface Queries {
3121
3048
  * // -> 0
3122
3049
  * ```
3123
3050
  * @category Lifecycle
3124
- * @since v2.0
3051
+ * @since v2.0.0
3125
3052
  */
3126
3053
  destroy(): void;
3127
3054
 
@@ -3134,7 +3061,6 @@ export interface Queries {
3134
3061
  * return an empty object. The method is intended to be used during
3135
3062
  * development to ensure your application is not leaking listener
3136
3063
  * registrations, for example.
3137
- *
3138
3064
  * @returns A QueriesListenerStats object containing Queries listener
3139
3065
  * statistics.
3140
3066
  * @example
@@ -3151,7 +3077,7 @@ export interface Queries {
3151
3077
  * // -> 0
3152
3078
  * ```
3153
3079
  * @category Development
3154
- * @since v2.0
3080
+ * @since v2.0.0
3155
3081
  */
3156
3082
  getListenerStats(): QueriesListenerStats;
3157
3083
  //
@@ -3164,7 +3090,6 @@ export interface Queries {
3164
3090
  * A given Store can only have one Queries object associated with it. If you
3165
3091
  * call this function twice on the same Store, your second call will return a
3166
3092
  * reference to the Queries object created by the first.
3167
- *
3168
3093
  * @param store The Store for which to register query definitions.
3169
3094
  * @returns A reference to the new Queries object.
3170
3095
  * @example
@@ -3188,6 +3113,6 @@ export interface Queries {
3188
3113
  * // -> true
3189
3114
  * ```
3190
3115
  * @category Creation
3191
- * @since v2.0
3116
+ * @since v2.0.0
3192
3117
  */
3193
3118
  export function createQueries(store: Store): Queries;