@milaboratories/pl-model-common 1.25.1 → 1.25.3

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 (288) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +29 -0
  2. package/dist/author_marker.d.ts +9 -6
  3. package/dist/base32_encode.cjs +40 -46
  4. package/dist/base32_encode.cjs.map +1 -1
  5. package/dist/base32_encode.js +40 -45
  6. package/dist/base32_encode.js.map +1 -1
  7. package/dist/base64.cjs +5 -4
  8. package/dist/base64.cjs.map +1 -1
  9. package/dist/base64.d.ts +10 -6
  10. package/dist/base64.js +5 -3
  11. package/dist/base64.js.map +1 -1
  12. package/dist/block_state.d.ts +21 -23
  13. package/dist/bmodel/block_config.cjs +9 -10
  14. package/dist/bmodel/block_config.cjs.map +1 -1
  15. package/dist/bmodel/block_config.d.ts +53 -72
  16. package/dist/bmodel/block_config.js +9 -9
  17. package/dist/bmodel/block_config.js.map +1 -1
  18. package/dist/bmodel/code.cjs +7 -6
  19. package/dist/bmodel/code.cjs.map +1 -1
  20. package/dist/bmodel/code.d.ts +17 -13
  21. package/dist/bmodel/code.js +6 -4
  22. package/dist/bmodel/code.js.map +1 -1
  23. package/dist/bmodel/container.d.ts +46 -44
  24. package/dist/bmodel/index.cjs +3 -0
  25. package/dist/bmodel/index.d.ts +5 -6
  26. package/dist/bmodel/index.js +3 -0
  27. package/dist/bmodel/normalization.cjs +90 -106
  28. package/dist/bmodel/normalization.cjs.map +1 -1
  29. package/dist/bmodel/normalization.d.ts +7 -3
  30. package/dist/bmodel/normalization.js +90 -105
  31. package/dist/bmodel/normalization.js.map +1 -1
  32. package/dist/bmodel/types.d.ts +4 -1
  33. package/dist/branding.d.ts +5 -5
  34. package/dist/common_types.d.ts +19 -15
  35. package/dist/driver_kit.d.ts +25 -17
  36. package/dist/drivers/ChunkedStreamReader.cjs +168 -203
  37. package/dist/drivers/ChunkedStreamReader.cjs.map +1 -1
  38. package/dist/drivers/ChunkedStreamReader.d.ts +104 -100
  39. package/dist/drivers/ChunkedStreamReader.js +168 -202
  40. package/dist/drivers/ChunkedStreamReader.js.map +1 -1
  41. package/dist/drivers/blob.cjs +15 -17
  42. package/dist/drivers/blob.cjs.map +1 -1
  43. package/dist/drivers/blob.d.ts +35 -35
  44. package/dist/drivers/blob.js +14 -15
  45. package/dist/drivers/blob.js.map +1 -1
  46. package/dist/drivers/index.cjs +18 -0
  47. package/dist/drivers/index.d.ts +29 -9
  48. package/dist/drivers/index.js +18 -0
  49. package/dist/drivers/interfaces.d.ts +17 -14
  50. package/dist/drivers/log.cjs +4 -3
  51. package/dist/drivers/log.cjs.map +1 -1
  52. package/dist/drivers/log.d.ts +52 -49
  53. package/dist/drivers/log.js +4 -2
  54. package/dist/drivers/log.js.map +1 -1
  55. package/dist/drivers/ls.cjs +16 -19
  56. package/dist/drivers/ls.cjs.map +1 -1
  57. package/dist/drivers/ls.d.ts +73 -76
  58. package/dist/drivers/ls.js +16 -17
  59. package/dist/drivers/ls.js.map +1 -1
  60. package/dist/drivers/pframe/column_filter.d.ts +19 -15
  61. package/dist/drivers/pframe/data_info.cjs +201 -252
  62. package/dist/drivers/pframe/data_info.cjs.map +1 -1
  63. package/dist/drivers/pframe/data_info.d.ts +84 -109
  64. package/dist/drivers/pframe/data_info.js +201 -250
  65. package/dist/drivers/pframe/data_info.js.map +1 -1
  66. package/dist/drivers/pframe/data_types.cjs +38 -63
  67. package/dist/drivers/pframe/data_types.cjs.map +1 -1
  68. package/dist/drivers/pframe/data_types.d.ts +91 -93
  69. package/dist/drivers/pframe/data_types.js +38 -61
  70. package/dist/drivers/pframe/data_types.js.map +1 -1
  71. package/dist/drivers/pframe/driver.cjs +7 -0
  72. package/dist/drivers/pframe/driver.cjs.map +1 -0
  73. package/dist/drivers/pframe/driver.d.ts +50 -45
  74. package/dist/drivers/pframe/driver.js +6 -0
  75. package/dist/drivers/pframe/driver.js.map +1 -0
  76. package/dist/drivers/pframe/filter_spec.d.ts +127 -123
  77. package/dist/drivers/pframe/find_columns.d.ts +21 -17
  78. package/dist/drivers/pframe/index.cjs +15 -0
  79. package/dist/drivers/pframe/index.d.ts +23 -16
  80. package/dist/drivers/pframe/index.js +15 -0
  81. package/dist/drivers/pframe/linker_columns.cjs +184 -238
  82. package/dist/drivers/pframe/linker_columns.cjs.map +1 -1
  83. package/dist/drivers/pframe/linker_columns.d.ts +45 -38
  84. package/dist/drivers/pframe/linker_columns.js +184 -236
  85. package/dist/drivers/pframe/linker_columns.js.map +1 -1
  86. package/dist/drivers/pframe/pframe.d.ts +26 -21
  87. package/dist/drivers/pframe/query/index.cjs +1 -0
  88. package/dist/drivers/pframe/query/index.d.ts +3 -4
  89. package/dist/drivers/pframe/query/index.js +1 -0
  90. package/dist/drivers/pframe/query/query_common.d.ts +205 -247
  91. package/dist/drivers/pframe/query/query_data.d.ts +25 -23
  92. package/dist/drivers/pframe/query/query_spec.d.ts +30 -29
  93. package/dist/drivers/pframe/query/utils.cjs +164 -183
  94. package/dist/drivers/pframe/query/utils.cjs.map +1 -1
  95. package/dist/drivers/pframe/query/utils.d.ts +13 -12
  96. package/dist/drivers/pframe/query/utils.js +164 -181
  97. package/dist/drivers/pframe/query/utils.js.map +1 -1
  98. package/dist/drivers/pframe/spec/anchored.cjs +178 -216
  99. package/dist/drivers/pframe/spec/anchored.cjs.map +1 -1
  100. package/dist/drivers/pframe/spec/anchored.d.ts +53 -49
  101. package/dist/drivers/pframe/spec/anchored.js +176 -214
  102. package/dist/drivers/pframe/spec/anchored.js.map +1 -1
  103. package/dist/drivers/pframe/spec/filtered_column.cjs +8 -7
  104. package/dist/drivers/pframe/spec/filtered_column.cjs.map +1 -1
  105. package/dist/drivers/pframe/spec/filtered_column.d.ts +20 -17
  106. package/dist/drivers/pframe/spec/filtered_column.js +8 -6
  107. package/dist/drivers/pframe/spec/filtered_column.js.map +1 -1
  108. package/dist/drivers/pframe/spec/ids.cjs +16 -14
  109. package/dist/drivers/pframe/spec/ids.cjs.map +1 -1
  110. package/dist/drivers/pframe/spec/ids.d.ts +13 -8
  111. package/dist/drivers/pframe/spec/ids.js +14 -12
  112. package/dist/drivers/pframe/spec/ids.js.map +1 -1
  113. package/dist/drivers/pframe/spec/index.cjs +6 -0
  114. package/dist/drivers/pframe/spec/index.d.ts +6 -7
  115. package/dist/drivers/pframe/spec/index.js +6 -0
  116. package/dist/drivers/pframe/spec/native_id.cjs +16 -16
  117. package/dist/drivers/pframe/spec/native_id.cjs.map +1 -1
  118. package/dist/drivers/pframe/spec/native_id.d.ts +9 -4
  119. package/dist/drivers/pframe/spec/native_id.js +13 -13
  120. package/dist/drivers/pframe/spec/native_id.js.map +1 -1
  121. package/dist/drivers/pframe/spec/selectors.cjs +72 -112
  122. package/dist/drivers/pframe/spec/selectors.cjs.map +1 -1
  123. package/dist/drivers/pframe/spec/selectors.d.ts +99 -94
  124. package/dist/drivers/pframe/spec/selectors.js +72 -110
  125. package/dist/drivers/pframe/spec/selectors.js.map +1 -1
  126. package/dist/drivers/pframe/spec/spec.cjs +282 -324
  127. package/dist/drivers/pframe/spec/spec.cjs.map +1 -1
  128. package/dist/drivers/pframe/spec/spec.d.ts +263 -272
  129. package/dist/drivers/pframe/spec/spec.js +281 -322
  130. package/dist/drivers/pframe/spec/spec.js.map +1 -1
  131. package/dist/drivers/pframe/table.d.ts +28 -24
  132. package/dist/drivers/pframe/table_calculate.cjs +117 -147
  133. package/dist/drivers/pframe/table_calculate.cjs.map +1 -1
  134. package/dist/drivers/pframe/table_calculate.d.ts +219 -220
  135. package/dist/drivers/pframe/table_calculate.js +117 -145
  136. package/dist/drivers/pframe/table_calculate.js.map +1 -1
  137. package/dist/drivers/pframe/table_common.cjs +13 -14
  138. package/dist/drivers/pframe/table_common.cjs.map +1 -1
  139. package/dist/drivers/pframe/table_common.d.ts +24 -19
  140. package/dist/drivers/pframe/table_common.js +13 -13
  141. package/dist/drivers/pframe/table_common.js.map +1 -1
  142. package/dist/drivers/pframe/unique_values.d.ts +23 -18
  143. package/dist/drivers/upload.d.ts +21 -18
  144. package/dist/drivers/urls.cjs +5 -6
  145. package/dist/drivers/urls.cjs.map +1 -1
  146. package/dist/drivers/urls.d.ts +12 -9
  147. package/dist/drivers/urls.js +5 -5
  148. package/dist/drivers/urls.js.map +1 -1
  149. package/dist/errors.cjs +65 -86
  150. package/dist/errors.cjs.map +1 -1
  151. package/dist/errors.d.ts +36 -33
  152. package/dist/errors.js +65 -85
  153. package/dist/errors.js.map +1 -1
  154. package/dist/flags/block_flags.cjs +7 -6
  155. package/dist/flags/block_flags.cjs.map +1 -1
  156. package/dist/flags/block_flags.d.ts +12 -8
  157. package/dist/flags/block_flags.js +7 -5
  158. package/dist/flags/block_flags.js.map +1 -1
  159. package/dist/flags/flag_utils.cjs +69 -108
  160. package/dist/flags/flag_utils.cjs.map +1 -1
  161. package/dist/flags/flag_utils.d.ts +40 -42
  162. package/dist/flags/flag_utils.js +70 -107
  163. package/dist/flags/flag_utils.js.map +1 -1
  164. package/dist/flags/type_utils.d.ts +12 -11
  165. package/dist/httpAuth.cjs +16 -20
  166. package/dist/httpAuth.cjs.map +1 -1
  167. package/dist/httpAuth.d.ts +10 -7
  168. package/dist/httpAuth.js +16 -19
  169. package/dist/httpAuth.js.map +1 -1
  170. package/dist/index.cjs +176 -179
  171. package/dist/index.d.ts +58 -20
  172. package/dist/index.js +37 -34
  173. package/dist/json.cjs +10 -8
  174. package/dist/json.cjs.map +1 -1
  175. package/dist/json.d.ts +18 -18
  176. package/dist/json.js +8 -6
  177. package/dist/json.js.map +1 -1
  178. package/dist/navigation.cjs +3 -2
  179. package/dist/navigation.cjs.map +1 -1
  180. package/dist/navigation.d.ts +18 -21
  181. package/dist/navigation.js +3 -1
  182. package/dist/navigation.js.map +1 -1
  183. package/dist/plid.cjs +16 -20
  184. package/dist/plid.cjs.map +1 -1
  185. package/dist/plid.d.ts +11 -7
  186. package/dist/plid.js +15 -18
  187. package/dist/plid.js.map +1 -1
  188. package/dist/pool/entry.d.ts +11 -11
  189. package/dist/pool/index.d.ts +3 -4
  190. package/dist/pool/query.cjs +21 -43
  191. package/dist/pool/query.cjs.map +1 -1
  192. package/dist/pool/query.d.ts +25 -20
  193. package/dist/pool/query.js +20 -40
  194. package/dist/pool/query.js.map +1 -1
  195. package/dist/pool/spec.cjs +40 -47
  196. package/dist/pool/spec.cjs.map +1 -1
  197. package/dist/pool/spec.d.ts +33 -31
  198. package/dist/pool/spec.js +40 -45
  199. package/dist/pool/spec.js.map +1 -1
  200. package/dist/ref.cjs +51 -71
  201. package/dist/ref.cjs.map +1 -1
  202. package/dist/ref.d.ts +36 -33
  203. package/dist/ref.js +50 -69
  204. package/dist/ref.js.map +1 -1
  205. package/dist/utag.d.ts +18 -14
  206. package/dist/util.cjs +8 -7
  207. package/dist/util.cjs.map +1 -1
  208. package/dist/util.d.ts +5 -2
  209. package/dist/util.js +8 -6
  210. package/dist/util.js.map +1 -1
  211. package/dist/value_or_error.cjs +7 -3
  212. package/dist/value_or_error.cjs.map +1 -1
  213. package/dist/value_or_error.d.ts +9 -6
  214. package/dist/value_or_error.js +7 -2
  215. package/dist/value_or_error.js.map +1 -1
  216. package/package.json +6 -6
  217. package/src/flags/block_flags.ts +2 -1
  218. package/src/flags/flag_utils.ts +0 -22
  219. package/dist/author_marker.d.ts.map +0 -1
  220. package/dist/base32_encode.d.ts +0 -8
  221. package/dist/base32_encode.d.ts.map +0 -1
  222. package/dist/base64.d.ts.map +0 -1
  223. package/dist/block_state.d.ts.map +0 -1
  224. package/dist/bmodel/block_config.d.ts.map +0 -1
  225. package/dist/bmodel/code.d.ts.map +0 -1
  226. package/dist/bmodel/container.d.ts.map +0 -1
  227. package/dist/bmodel/index.d.ts.map +0 -1
  228. package/dist/bmodel/normalization.d.ts.map +0 -1
  229. package/dist/bmodel/types.d.ts.map +0 -1
  230. package/dist/branding.d.ts.map +0 -1
  231. package/dist/common_types.d.ts.map +0 -1
  232. package/dist/driver_kit.d.ts.map +0 -1
  233. package/dist/drivers/ChunkedStreamReader.d.ts.map +0 -1
  234. package/dist/drivers/blob.d.ts.map +0 -1
  235. package/dist/drivers/index.d.ts.map +0 -1
  236. package/dist/drivers/interfaces.d.ts.map +0 -1
  237. package/dist/drivers/log.d.ts.map +0 -1
  238. package/dist/drivers/ls.d.ts.map +0 -1
  239. package/dist/drivers/pframe/column_filter.d.ts.map +0 -1
  240. package/dist/drivers/pframe/data_info.d.ts.map +0 -1
  241. package/dist/drivers/pframe/data_types.d.ts.map +0 -1
  242. package/dist/drivers/pframe/driver.d.ts.map +0 -1
  243. package/dist/drivers/pframe/filter_spec.d.ts.map +0 -1
  244. package/dist/drivers/pframe/find_columns.d.ts.map +0 -1
  245. package/dist/drivers/pframe/index.d.ts.map +0 -1
  246. package/dist/drivers/pframe/linker_columns.d.ts.map +0 -1
  247. package/dist/drivers/pframe/pframe.d.ts.map +0 -1
  248. package/dist/drivers/pframe/query/index.d.ts.map +0 -1
  249. package/dist/drivers/pframe/query/query_common.d.ts.map +0 -1
  250. package/dist/drivers/pframe/query/query_data.d.ts.map +0 -1
  251. package/dist/drivers/pframe/query/query_spec.d.ts.map +0 -1
  252. package/dist/drivers/pframe/query/utils.d.ts.map +0 -1
  253. package/dist/drivers/pframe/spec/anchored.d.ts.map +0 -1
  254. package/dist/drivers/pframe/spec/filtered_column.d.ts.map +0 -1
  255. package/dist/drivers/pframe/spec/ids.d.ts.map +0 -1
  256. package/dist/drivers/pframe/spec/index.d.ts.map +0 -1
  257. package/dist/drivers/pframe/spec/native_id.d.ts.map +0 -1
  258. package/dist/drivers/pframe/spec/selectors.d.ts.map +0 -1
  259. package/dist/drivers/pframe/spec/spec.d.ts.map +0 -1
  260. package/dist/drivers/pframe/table.d.ts.map +0 -1
  261. package/dist/drivers/pframe/table_calculate.d.ts.map +0 -1
  262. package/dist/drivers/pframe/table_common.d.ts.map +0 -1
  263. package/dist/drivers/pframe/type_util.d.ts +0 -5
  264. package/dist/drivers/pframe/type_util.d.ts.map +0 -1
  265. package/dist/drivers/pframe/unique_values.d.ts.map +0 -1
  266. package/dist/drivers/upload.d.ts.map +0 -1
  267. package/dist/drivers/urls.d.ts.map +0 -1
  268. package/dist/errors.d.ts.map +0 -1
  269. package/dist/flags/block_flags.d.ts.map +0 -1
  270. package/dist/flags/flag_utils.d.ts.map +0 -1
  271. package/dist/flags/index.d.ts +0 -4
  272. package/dist/flags/index.d.ts.map +0 -1
  273. package/dist/flags/type_utils.d.ts.map +0 -1
  274. package/dist/httpAuth.d.ts.map +0 -1
  275. package/dist/index.cjs.map +0 -1
  276. package/dist/index.d.ts.map +0 -1
  277. package/dist/index.js.map +0 -1
  278. package/dist/json.d.ts.map +0 -1
  279. package/dist/navigation.d.ts.map +0 -1
  280. package/dist/plid.d.ts.map +0 -1
  281. package/dist/pool/entry.d.ts.map +0 -1
  282. package/dist/pool/index.d.ts.map +0 -1
  283. package/dist/pool/query.d.ts.map +0 -1
  284. package/dist/pool/spec.d.ts.map +0 -1
  285. package/dist/ref.d.ts.map +0 -1
  286. package/dist/utag.d.ts.map +0 -1
  287. package/dist/util.d.ts.map +0 -1
  288. package/dist/value_or_error.d.ts.map +0 -1
@@ -1,5 +1,8 @@
1
- import { type PObjectSpec } from "../../../pool";
2
- import type { AxisId, AxisValueType, Domain, PColumnSpec, ValueType } from "./spec";
1
+ import { PObjectSpec } from "../../../pool/spec.js";
2
+ import "../../../pool/index.js";
3
+ import { AxisId, AxisValueType, Domain, PColumnSpec, ValueType } from "./spec.js";
4
+
5
+ //#region src/drivers/pframe/spec/selectors.d.ts
3
6
  /**
4
7
  * Defines a pattern for matching axes within the PFrame data model.
5
8
  *
@@ -11,151 +14,151 @@ import type { AxisId, AxisValueType, Domain, PColumnSpec, ValueType } from "./sp
11
14
  * This interface is used in various selection and matching operations
12
15
  * throughout the PFrame system, such as column queries and axis lookups.
13
16
  */
14
- export interface AxisSelector {
15
- /**
16
- * Optional value type to match against.
17
- * When specified, only axes with this exact type will match.
18
- * Can be a single type or an array of types to match against any of them.
19
- * Valid types include: 'Int', 'Long', 'Float', 'Double', 'String', 'Bytes'.
20
- */
21
- type?: ValueType | ValueType[];
22
- /**
23
- * Optional name to match against.
24
- * When specified, only axes with this exact name will match.
25
- */
26
- name?: string;
27
- /**
28
- * Optional domain key-value pairs to match against.
29
- * Domains provide additional context to uniquely identify an axis beyond its name and type.
30
- * When specified, an axis will match only if it contains all the key-value pairs defined here.
31
- * An axis with additional domain entries not present in this selector will still match.
32
- */
33
- domain?: Record<string, string>;
17
+ interface AxisSelector {
18
+ /**
19
+ * Optional value type to match against.
20
+ * When specified, only axes with this exact type will match.
21
+ * Can be a single type or an array of types to match against any of them.
22
+ * Valid types include: 'Int', 'Long', 'Float', 'Double', 'String', 'Bytes'.
23
+ */
24
+ type?: ValueType | ValueType[];
25
+ /**
26
+ * Optional name to match against.
27
+ * When specified, only axes with this exact name will match.
28
+ */
29
+ name?: string;
30
+ /**
31
+ * Optional domain key-value pairs to match against.
32
+ * Domains provide additional context to uniquely identify an axis beyond its name and type.
33
+ * When specified, an axis will match only if it contains all the key-value pairs defined here.
34
+ * An axis with additional domain entries not present in this selector will still match.
35
+ */
36
+ domain?: Record<string, string>;
34
37
  }
35
38
  /** Single axis selector */
36
- export interface SingleAxisSelector {
37
- /** Axis name (required) */
38
- name: string;
39
- /** Axis type (optional) */
40
- type?: AxisValueType;
41
- /** Domain requirements (optional) */
42
- domain?: Domain;
43
- /** Parent axes requirements (optional) */
44
- parentAxes?: SingleAxisSelector[];
39
+ interface SingleAxisSelector {
40
+ /** Axis name (required) */
41
+ name: string;
42
+ /** Axis type (optional) */
43
+ type?: AxisValueType;
44
+ /** Domain requirements (optional) */
45
+ domain?: Domain;
46
+ /** Parent axes requirements (optional) */
47
+ parentAxes?: SingleAxisSelector[];
45
48
  }
46
49
  /**
47
50
  * Reference to an axis by its numerical index within the anchor column's axes array
48
51
  * Format: [anchorId, axisIndex]
49
52
  */
50
- export type AnchorAxisRefByIdx = {
51
- anchor: string;
52
- idx: number;
53
+ type AnchorAxisRefByIdx = {
54
+ anchor: string;
55
+ idx: number;
53
56
  };
54
57
  /**
55
58
  * Reference to an axis by its name within the anchor column
56
59
  * Format: [anchorId, axisName]
57
60
  */
58
- export type AnchorAxisRefByName = {
59
- anchor: string;
60
- name: string;
61
+ type AnchorAxisRefByName = {
62
+ anchor: string;
63
+ name: string;
61
64
  };
62
65
  /**
63
66
  * Reference to an axis using an AxisId matcher within the anchor
64
67
  * Format: [anchorId, axisMatcher]
65
68
  */
66
- export type AnchorAxisRefByMatcher = {
67
- anchor: string;
68
- id: AxisId;
69
+ type AnchorAxisRefByMatcher = {
70
+ anchor: string;
71
+ id: AxisId;
69
72
  };
70
73
  /**
71
74
  * Basic anchor axis reference that can be either by index or a direct AxisId
72
75
  */
73
- export type AnchorAxisIdOrRefBasic = AnchorAxisRefByIdx | AxisId;
76
+ type AnchorAxisIdOrRefBasic = AnchorAxisRefByIdx | AxisId;
74
77
  /** Union of all possible ways to reference an axis in an anchored context */
75
- export type AnchorAxisRef = AnchorAxisRefByIdx | AnchorAxisRefByName | AnchorAxisRefByMatcher;
78
+ type AnchorAxisRef = AnchorAxisRefByIdx | AnchorAxisRefByName | AnchorAxisRefByMatcher;
76
79
  /** Reference to a domain value through an anchor */
77
- export type AnchorDomainRef = {
78
- anchor: string;
80
+ type AnchorDomainRef = {
81
+ anchor: string;
79
82
  };
80
83
  /**
81
84
  * Domain value that can be either a direct string value or a reference to a domain through an anchor
82
85
  * Used to establish domain context that can be resolved relative to other anchored columns
83
86
  */
84
- export type ADomain = string | AnchorDomainRef;
87
+ type ADomain = string | AnchorDomainRef;
85
88
  /**
86
89
  * Axis identifier that can be either a direct AxisId or a reference to an axis through an anchor
87
90
  * Allows referring to axes in a way that can be resolved in different contexts
88
91
  */
89
- export type AAxisSelector = AxisSelector | AnchorAxisRef;
92
+ type AAxisSelector = AxisSelector | AnchorAxisRef;
90
93
  /**
91
94
  * Match resolution strategy for PColumns
92
95
  * Specifies how to handle when multiple columns match the criteria
93
96
  * (default is "expectSingle")
94
97
  */
95
- export type AnchoredColumnMatchStrategy = "expectSingle" | "expectMultiple" | "takeFirst";
98
+ type AnchoredColumnMatchStrategy = "expectSingle" | "expectMultiple" | "takeFirst";
96
99
  /**
97
100
  * Matcher for PColumns in an anchored context
98
101
  * Supports partial matching on axes, allowing for flexible column discovery
99
102
  */
100
- export interface AnchoredPColumnSelector {
101
- /** Optional name of the column to match; can't be used together with namePattern */
102
- name?: string;
103
- /** Optional regexp pattern for column name matching; can't be used together with name */
104
- namePattern?: string;
105
- /** Optional value type to match. If an array is provided, matches if the column's type is any of the specified types */
106
- type?: ValueType | ValueType[];
107
- /** If specified, the domain values must be anchored to this anchor */
108
- domainAnchor?: string;
109
- /** Optional domain values to match, can include anchored references, if domainAnchor is specified,
110
- * interpreted as additional domains to domain from the anchor */
111
- domain?: Record<string, ADomain>;
112
- /** Optional axes to match, can include anchored references */
113
- axes?: AAxisSelector[];
114
- /** When true, allows matching if only a subset of axes match */
115
- partialAxesMatch?: boolean;
116
- /** Optional annotations to match with exact values */
117
- annotations?: Record<string, string>;
118
- /** Optional annotation patterns to match with regex patterns */
119
- annotationPatterns?: Record<string, string>;
120
- /** Match resolution strategy, default is "expectSingle" */
121
- matchStrategy?: AnchoredColumnMatchStrategy;
103
+ interface AnchoredPColumnSelector {
104
+ /** Optional name of the column to match; can't be used together with namePattern */
105
+ name?: string;
106
+ /** Optional regexp pattern for column name matching; can't be used together with name */
107
+ namePattern?: string;
108
+ /** Optional value type to match. If an array is provided, matches if the column's type is any of the specified types */
109
+ type?: ValueType | ValueType[];
110
+ /** If specified, the domain values must be anchored to this anchor */
111
+ domainAnchor?: string;
112
+ /** Optional domain values to match, can include anchored references, if domainAnchor is specified,
113
+ * interpreted as additional domains to domain from the anchor */
114
+ domain?: Record<string, ADomain>;
115
+ /** Optional axes to match, can include anchored references */
116
+ axes?: AAxisSelector[];
117
+ /** When true, allows matching if only a subset of axes match */
118
+ partialAxesMatch?: boolean;
119
+ /** Optional annotations to match with exact values */
120
+ annotations?: Record<string, string>;
121
+ /** Optional annotation patterns to match with regex patterns */
122
+ annotationPatterns?: Record<string, string>;
123
+ /** Match resolution strategy, default is "expectSingle" */
124
+ matchStrategy?: AnchoredColumnMatchStrategy;
122
125
  }
123
126
  /**
124
127
  * Matcher for PColumns in a non-anchored context
125
128
  */
126
- export interface PColumnSelector extends AnchoredPColumnSelector {
127
- domainAnchor?: never;
128
- domain?: Record<string, string>;
129
- axes?: AxisSelector[];
129
+ interface PColumnSelector extends AnchoredPColumnSelector {
130
+ domainAnchor?: never;
131
+ domain?: Record<string, string>;
132
+ axes?: AxisSelector[];
130
133
  }
131
134
  /**
132
135
  * Strict identifier for PColumns in an anchored context
133
136
  * Unlike APColumnMatcher, this requires exact matches on domain and axes
134
137
  */
135
- export interface AnchoredPColumnId extends AnchoredPColumnSelector {
136
- /** Name is required for exact column identification */
137
- name: string;
138
- /** No namePattern in ID */
139
- namePattern?: never;
140
- /** Type is not used in exact column identification */
141
- type?: never;
142
- /** Full axes specification using only basic references */
143
- axes: AnchorAxisIdOrRefBasic[];
144
- /** Partial axes matching is not allowed for exact identification */
145
- partialAxesMatch?: never;
146
- /** Annotations are not used in exact column identification */
147
- annotations?: never;
148
- /** Annotation patterns are not used in exact column identification */
149
- annotationPatterns?: never;
150
- /** "Id" implies single match strategy */
151
- matchStrategy?: never;
138
+ interface AnchoredPColumnId extends AnchoredPColumnSelector {
139
+ /** Name is required for exact column identification */
140
+ name: string;
141
+ /** No namePattern in ID */
142
+ namePattern?: never;
143
+ /** Type is not used in exact column identification */
144
+ type?: never;
145
+ /** Full axes specification using only basic references */
146
+ axes: AnchorAxisIdOrRefBasic[];
147
+ /** Partial axes matching is not allowed for exact identification */
148
+ partialAxesMatch?: never;
149
+ /** Annotations are not used in exact column identification */
150
+ annotations?: never;
151
+ /** Annotation patterns are not used in exact column identification */
152
+ annotationPatterns?: never;
153
+ /** "Id" implies single match strategy */
154
+ matchStrategy?: never;
152
155
  }
153
156
  /**
154
157
  * Checks if a given value is an anchored column identifier
155
158
  * @param id - The value to check
156
159
  * @returns True if the value is an anchored column identifier, false otherwise
157
160
  */
158
- export declare function isAnchoredPColumnId(id: unknown): id is AnchoredPColumnId;
161
+ declare function isAnchoredPColumnId(id: unknown): id is AnchoredPColumnId;
159
162
  /**
160
163
  * Determines if an axis ID matches an axis selector.
161
164
  *
@@ -163,7 +166,7 @@ export declare function isAnchoredPColumnId(id: unknown): id is AnchoredPColumnI
163
166
  * @param axis - The AxisId to check against the selector
164
167
  * @returns true if the AxisId matches all specified criteria in the selector, false otherwise
165
168
  */
166
- export declare function matchAxis(selector: AxisSelector, axis: AxisId): boolean;
169
+ declare function matchAxis(selector: AxisSelector, axis: AxisId): boolean;
167
170
  /**
168
171
  * Determines if a given PColumnSpec matches a selector.
169
172
  *
@@ -171,12 +174,14 @@ export declare function matchAxis(selector: AxisSelector, axis: AxisId): boolean
171
174
  * @param selector - The selector criteria to match against
172
175
  * @returns true if the PColumnSpec matches all criteria in the selector, false otherwise
173
176
  */
174
- export declare function matchPColumn(pcolumn: PColumnSpec, selector: PColumnSelector): boolean;
177
+ declare function matchPColumn(pcolumn: PColumnSpec, selector: PColumnSelector): boolean;
175
178
  /**
176
179
  * Convert a predicate or array of selectors to a single predicate function
177
180
  * @param predicateOrSelectors - Either a function that takes a PColumnSpec and returns a boolean,
178
181
  * or an array of PColumnSelectors, or a single PColumnSelector
179
182
  * @returns A function that takes a PColumnSpec and returns a boolean
180
183
  */
181
- export declare function selectorsToPredicate(predicateOrSelectors: PColumnSelector | PColumnSelector[]): (spec: PObjectSpec) => boolean;
184
+ declare function selectorsToPredicate(predicateOrSelectors: PColumnSelector | PColumnSelector[]): (spec: PObjectSpec) => boolean;
185
+ //#endregion
186
+ export { AAxisSelector, ADomain, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredPColumnId, AnchoredPColumnSelector, AxisSelector, PColumnSelector, SingleAxisSelector, isAnchoredPColumnId, matchAxis, matchPColumn, selectorsToPredicate };
182
187
  //# sourceMappingURL=selectors.d.ts.map
@@ -1,125 +1,87 @@
1
- import { isPColumnSpec } from '../../../pool/spec.js';
2
- import { getAxisId } from './spec.js';
1
+ import { getAxisId } from "./spec.js";
2
+ import { isPColumnSpec } from "../../../pool/spec.js";
3
3
 
4
+ //#region src/drivers/pframe/spec/selectors.ts
4
5
  /**
5
- * Checks if a given value is an anchored column identifier
6
- * @param id - The value to check
7
- * @returns True if the value is an anchored column identifier, false otherwise
8
- */
6
+ * Checks if a given value is an anchored column identifier
7
+ * @param id - The value to check
8
+ * @returns True if the value is an anchored column identifier, false otherwise
9
+ */
9
10
  function isAnchoredPColumnId(id) {
10
- // basic check, can be extended if needed
11
- return typeof id === "object" && id !== null && "name" in id && "axes" in id;
11
+ return typeof id === "object" && id !== null && "name" in id && "axes" in id;
12
12
  }
13
13
  /**
14
- * Determines if an axis ID matches an axis selector.
15
- *
16
- * @param selector - The selector with criteria to match against
17
- * @param axis - The AxisId to check against the selector
18
- * @returns true if the AxisId matches all specified criteria in the selector, false otherwise
19
- */
14
+ * Determines if an axis ID matches an axis selector.
15
+ *
16
+ * @param selector - The selector with criteria to match against
17
+ * @param axis - The AxisId to check against the selector
18
+ * @returns true if the AxisId matches all specified criteria in the selector, false otherwise
19
+ */
20
20
  function matchAxis(selector, axis) {
21
- // Match name if specified
22
- if (selector.name !== undefined && selector.name !== axis.name)
23
- return false;
24
- // Match type if specified
25
- if (selector.type !== undefined) {
26
- if (Array.isArray(selector.type)) {
27
- if (!selector.type.includes(axis.type))
28
- return false;
29
- }
30
- else if (selector.type !== axis.type) {
31
- return false;
32
- }
33
- }
34
- // Match domain if specified - using existing logic from matchAxisId
35
- if (selector.domain !== undefined) {
36
- const axisDomain = axis.domain || {};
37
- for (const [key, value] of Object.entries(selector.domain))
38
- if (axisDomain[key] !== value)
39
- return false;
40
- }
41
- return true;
21
+ if (selector.name !== void 0 && selector.name !== axis.name) return false;
22
+ if (selector.type !== void 0) {
23
+ if (Array.isArray(selector.type)) {
24
+ if (!selector.type.includes(axis.type)) return false;
25
+ } else if (selector.type !== axis.type) return false;
26
+ }
27
+ if (selector.domain !== void 0) {
28
+ const axisDomain = axis.domain || {};
29
+ for (const [key, value] of Object.entries(selector.domain)) if (axisDomain[key] !== value) return false;
30
+ }
31
+ return true;
42
32
  }
43
33
  /**
44
- * Determines if a given PColumnSpec matches a selector.
45
- *
46
- * @param pcolumn - The PColumnSpec to check against the selector
47
- * @param selector - The selector criteria to match against
48
- * @returns true if the PColumnSpec matches all criteria in the selector, false otherwise
49
- */
34
+ * Determines if a given PColumnSpec matches a selector.
35
+ *
36
+ * @param pcolumn - The PColumnSpec to check against the selector
37
+ * @param selector - The selector criteria to match against
38
+ * @returns true if the PColumnSpec matches all criteria in the selector, false otherwise
39
+ */
50
40
  function matchPColumn(pcolumn, selector) {
51
- // Match name if specified
52
- if (selector.name !== undefined && pcolumn.name !== selector.name)
53
- return false;
54
- // Match name pattern if specified
55
- if (selector.namePattern !== undefined && !new RegExp(selector.namePattern).test(pcolumn.name))
56
- return false;
57
- // Match type if specified
58
- if (selector.type !== undefined) {
59
- if (Array.isArray(selector.type)) {
60
- if (!selector.type.includes(pcolumn.valueType))
61
- return false;
62
- }
63
- else if (selector.type !== pcolumn.valueType) {
64
- return false;
65
- }
66
- }
67
- // Match domain if specified
68
- if (selector.domain !== undefined) {
69
- const columnDomain = pcolumn.domain || {};
70
- for (const [key, value] of Object.entries(selector.domain))
71
- if (columnDomain[key] !== value)
72
- return false;
73
- }
74
- // Match axes if specified
75
- if (selector.axes !== undefined) {
76
- const pcolumnAxes = pcolumn.axesSpec.map(getAxisId);
77
- if (selector.partialAxesMatch) {
78
- // For partial matching, all selector axes must match at least one column axis
79
- for (const selectorAxis of selector.axes)
80
- if (!pcolumnAxes.some((columnAxis) => matchAxis(selectorAxis, columnAxis)))
81
- return false;
82
- }
83
- else {
84
- // For exact matching, column must have the same number of axes and all must match
85
- if (pcolumnAxes.length !== selector.axes.length)
86
- return false;
87
- // Each selector axis must match a corresponding column axis
88
- for (let i = 0; i < selector.axes.length; i++)
89
- if (!matchAxis(selector.axes[i], pcolumnAxes[i]))
90
- return false;
91
- }
92
- }
93
- // Match annotations if specified
94
- if (selector.annotations !== undefined) {
95
- const columnAnnotations = pcolumn.annotations || {};
96
- for (const [key, value] of Object.entries(selector.annotations))
97
- if (columnAnnotations[key] !== value)
98
- return false;
99
- }
100
- // Match annotation patterns if specified
101
- if (selector.annotationPatterns !== undefined) {
102
- const columnAnnotations = pcolumn.annotations || {};
103
- for (const [key, pattern] of Object.entries(selector.annotationPatterns)) {
104
- const value = columnAnnotations[key];
105
- if (value === undefined || !new RegExp(pattern).test(value))
106
- return false;
107
- }
108
- }
109
- return true;
41
+ if (selector.name !== void 0 && pcolumn.name !== selector.name) return false;
42
+ if (selector.namePattern !== void 0 && !new RegExp(selector.namePattern).test(pcolumn.name)) return false;
43
+ if (selector.type !== void 0) {
44
+ if (Array.isArray(selector.type)) {
45
+ if (!selector.type.includes(pcolumn.valueType)) return false;
46
+ } else if (selector.type !== pcolumn.valueType) return false;
47
+ }
48
+ if (selector.domain !== void 0) {
49
+ const columnDomain = pcolumn.domain || {};
50
+ for (const [key, value] of Object.entries(selector.domain)) if (columnDomain[key] !== value) return false;
51
+ }
52
+ if (selector.axes !== void 0) {
53
+ const pcolumnAxes = pcolumn.axesSpec.map(getAxisId);
54
+ if (selector.partialAxesMatch) {
55
+ for (const selectorAxis of selector.axes) if (!pcolumnAxes.some((columnAxis) => matchAxis(selectorAxis, columnAxis))) return false;
56
+ } else {
57
+ if (pcolumnAxes.length !== selector.axes.length) return false;
58
+ for (let i = 0; i < selector.axes.length; i++) if (!matchAxis(selector.axes[i], pcolumnAxes[i])) return false;
59
+ }
60
+ }
61
+ if (selector.annotations !== void 0) {
62
+ const columnAnnotations = pcolumn.annotations || {};
63
+ for (const [key, value] of Object.entries(selector.annotations)) if (columnAnnotations[key] !== value) return false;
64
+ }
65
+ if (selector.annotationPatterns !== void 0) {
66
+ const columnAnnotations = pcolumn.annotations || {};
67
+ for (const [key, pattern] of Object.entries(selector.annotationPatterns)) {
68
+ const value = columnAnnotations[key];
69
+ if (value === void 0 || !new RegExp(pattern).test(value)) return false;
70
+ }
71
+ }
72
+ return true;
110
73
  }
111
74
  /**
112
- * Convert a predicate or array of selectors to a single predicate function
113
- * @param predicateOrSelectors - Either a function that takes a PColumnSpec and returns a boolean,
114
- * or an array of PColumnSelectors, or a single PColumnSelector
115
- * @returns A function that takes a PColumnSpec and returns a boolean
116
- */
75
+ * Convert a predicate or array of selectors to a single predicate function
76
+ * @param predicateOrSelectors - Either a function that takes a PColumnSpec and returns a boolean,
77
+ * or an array of PColumnSelectors, or a single PColumnSelector
78
+ * @returns A function that takes a PColumnSpec and returns a boolean
79
+ */
117
80
  function selectorsToPredicate(predicateOrSelectors) {
118
- if (Array.isArray(predicateOrSelectors))
119
- return (spec) => predicateOrSelectors.some((selector) => isPColumnSpec(spec) && matchPColumn(spec, selector));
120
- else
121
- return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);
81
+ if (Array.isArray(predicateOrSelectors)) return (spec) => predicateOrSelectors.some((selector) => isPColumnSpec(spec) && matchPColumn(spec, selector));
82
+ else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);
122
83
  }
123
84
 
85
+ //#endregion
124
86
  export { isAnchoredPColumnId, matchAxis, matchPColumn, selectorsToPredicate };
125
- //# sourceMappingURL=selectors.js.map
87
+ //# sourceMappingURL=selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectors.js","sources":["../../../../src/drivers/pframe/spec/selectors.ts"],"sourcesContent":["import { isPColumnSpec, type PObjectSpec } from \"../../../pool\";\nimport type { AxisId, AxisValueType, Domain, PColumnSpec, ValueType } from \"./spec\";\nimport { getAxisId } from \"./spec\";\n\n/**\n * Defines a pattern for matching axes within the PFrame data model.\n *\n * AxisSelector provides a flexible way to identify axes based on their\n * properties. All fields are optional, allowing for partial matching.\n * When multiple properties are specified, all must match for an axis\n * to be selected (logical AND).\n *\n * This interface is used in various selection and matching operations\n * throughout the PFrame system, such as column queries and axis lookups.\n */\nexport interface AxisSelector {\n /**\n * Optional value type to match against.\n * When specified, only axes with this exact type will match.\n * Can be a single type or an array of types to match against any of them.\n * Valid types include: 'Int', 'Long', 'Float', 'Double', 'String', 'Bytes'.\n */\n type?: ValueType | ValueType[];\n\n /**\n * Optional name to match against.\n * When specified, only axes with this exact name will match.\n */\n name?: string;\n\n /**\n * Optional domain key-value pairs to match against.\n * Domains provide additional context to uniquely identify an axis beyond its name and type.\n * When specified, an axis will match only if it contains all the key-value pairs defined here.\n * An axis with additional domain entries not present in this selector will still match.\n */\n domain?: Record<string, string>;\n}\n\n/** Single axis selector */\nexport interface SingleAxisSelector {\n /** Axis name (required) */\n name: string;\n /** Axis type (optional) */\n type?: AxisValueType;\n /** Domain requirements (optional) */\n domain?: Domain;\n /** Parent axes requirements (optional) */\n parentAxes?: SingleAxisSelector[];\n}\n\n/**\n * Reference to an axis by its numerical index within the anchor column's axes array\n * Format: [anchorId, axisIndex]\n */\nexport type AnchorAxisRefByIdx = { anchor: string; idx: number };\n\n/**\n * Reference to an axis by its name within the anchor column\n * Format: [anchorId, axisName]\n */\nexport type AnchorAxisRefByName = { anchor: string; name: string };\n\n/**\n * Reference to an axis using an AxisId matcher within the anchor\n * Format: [anchorId, axisMatcher]\n */\nexport type AnchorAxisRefByMatcher = { anchor: string; id: AxisId };\n\n/**\n * Basic anchor axis reference that can be either by index or a direct AxisId\n */\nexport type AnchorAxisIdOrRefBasic = AnchorAxisRefByIdx | AxisId;\n\n/** Union of all possible ways to reference an axis in an anchored context */\nexport type AnchorAxisRef = AnchorAxisRefByIdx | AnchorAxisRefByName | AnchorAxisRefByMatcher;\n\n/** Reference to a domain value through an anchor */\nexport type AnchorDomainRef = { anchor: string };\n\n/**\n * Domain value that can be either a direct string value or a reference to a domain through an anchor\n * Used to establish domain context that can be resolved relative to other anchored columns\n */\nexport type ADomain = string | AnchorDomainRef;\n/**\n * Axis identifier that can be either a direct AxisId or a reference to an axis through an anchor\n * Allows referring to axes in a way that can be resolved in different contexts\n */\nexport type AAxisSelector = AxisSelector | AnchorAxisRef;\n\n/**\n * Match resolution strategy for PColumns\n * Specifies how to handle when multiple columns match the criteria\n * (default is \"expectSingle\")\n */\nexport type AnchoredColumnMatchStrategy = \"expectSingle\" | \"expectMultiple\" | \"takeFirst\";\n\n/**\n * Matcher for PColumns in an anchored context\n * Supports partial matching on axes, allowing for flexible column discovery\n */\nexport interface AnchoredPColumnSelector {\n /** Optional name of the column to match; can't be used together with namePattern */\n name?: string;\n /** Optional regexp pattern for column name matching; can't be used together with name */\n namePattern?: string;\n /** Optional value type to match. If an array is provided, matches if the column's type is any of the specified types */\n type?: ValueType | ValueType[];\n /** If specified, the domain values must be anchored to this anchor */\n domainAnchor?: string;\n /** Optional domain values to match, can include anchored references, if domainAnchor is specified,\n * interpreted as additional domains to domain from the anchor */\n domain?: Record<string, ADomain>;\n /** Optional axes to match, can include anchored references */\n axes?: AAxisSelector[];\n /** When true, allows matching if only a subset of axes match */\n partialAxesMatch?: boolean;\n /** Optional annotations to match with exact values */\n annotations?: Record<string, string>;\n /** Optional annotation patterns to match with regex patterns */\n annotationPatterns?: Record<string, string>;\n /** Match resolution strategy, default is \"expectSingle\" */\n matchStrategy?: AnchoredColumnMatchStrategy;\n}\n\n/**\n * Matcher for PColumns in a non-anchored context\n */\nexport interface PColumnSelector extends AnchoredPColumnSelector {\n domainAnchor?: never;\n domain?: Record<string, string>;\n axes?: AxisSelector[];\n}\n\n/**\n * Strict identifier for PColumns in an anchored context\n * Unlike APColumnMatcher, this requires exact matches on domain and axes\n */\nexport interface AnchoredPColumnId extends AnchoredPColumnSelector {\n /** Name is required for exact column identification */\n name: string;\n /** No namePattern in ID */\n namePattern?: never;\n /** Type is not used in exact column identification */\n type?: never;\n /** Full axes specification using only basic references */\n axes: AnchorAxisIdOrRefBasic[];\n /** Partial axes matching is not allowed for exact identification */\n partialAxesMatch?: never;\n /** Annotations are not used in exact column identification */\n annotations?: never;\n /** Annotation patterns are not used in exact column identification */\n annotationPatterns?: never;\n /** \"Id\" implies single match strategy */\n matchStrategy?: never;\n}\n\n/**\n * Checks if a given value is an anchored column identifier\n * @param id - The value to check\n * @returns True if the value is an anchored column identifier, false otherwise\n */\nexport function isAnchoredPColumnId(id: unknown): id is AnchoredPColumnId {\n // basic check, can be extended if needed\n return typeof id === \"object\" && id !== null && \"name\" in id && \"axes\" in id;\n}\n\n/**\n * Determines if an axis ID matches an axis selector.\n *\n * @param selector - The selector with criteria to match against\n * @param axis - The AxisId to check against the selector\n * @returns true if the AxisId matches all specified criteria in the selector, false otherwise\n */\nexport function matchAxis(selector: AxisSelector, axis: AxisId): boolean {\n // Match name if specified\n if (selector.name !== undefined && selector.name !== axis.name) return false;\n\n // Match type if specified\n if (selector.type !== undefined) {\n if (Array.isArray(selector.type)) {\n if (!selector.type.includes(axis.type)) return false;\n } else if (selector.type !== axis.type) {\n return false;\n }\n }\n\n // Match domain if specified - using existing logic from matchAxisId\n if (selector.domain !== undefined) {\n const axisDomain = axis.domain || {};\n for (const [key, value] of Object.entries(selector.domain))\n if (axisDomain[key] !== value) return false;\n }\n\n return true;\n}\n\n/**\n * Determines if a given PColumnSpec matches a selector.\n *\n * @param pcolumn - The PColumnSpec to check against the selector\n * @param selector - The selector criteria to match against\n * @returns true if the PColumnSpec matches all criteria in the selector, false otherwise\n */\nexport function matchPColumn(pcolumn: PColumnSpec, selector: PColumnSelector): boolean {\n // Match name if specified\n if (selector.name !== undefined && pcolumn.name !== selector.name) return false;\n\n // Match name pattern if specified\n if (selector.namePattern !== undefined && !new RegExp(selector.namePattern).test(pcolumn.name))\n return false;\n\n // Match type if specified\n if (selector.type !== undefined) {\n if (Array.isArray(selector.type)) {\n if (!selector.type.includes(pcolumn.valueType)) return false;\n } else if (selector.type !== pcolumn.valueType) {\n return false;\n }\n }\n\n // Match domain if specified\n if (selector.domain !== undefined) {\n const columnDomain = pcolumn.domain || {};\n for (const [key, value] of Object.entries(selector.domain))\n if (columnDomain[key] !== value) return false;\n }\n\n // Match axes if specified\n if (selector.axes !== undefined) {\n const pcolumnAxes = pcolumn.axesSpec.map(getAxisId);\n\n if (selector.partialAxesMatch) {\n // For partial matching, all selector axes must match at least one column axis\n for (const selectorAxis of selector.axes)\n if (!pcolumnAxes.some((columnAxis) => matchAxis(selectorAxis, columnAxis))) return false;\n } else {\n // For exact matching, column must have the same number of axes and all must match\n if (pcolumnAxes.length !== selector.axes.length) return false;\n\n // Each selector axis must match a corresponding column axis\n for (let i = 0; i < selector.axes.length; i++)\n if (!matchAxis(selector.axes[i], pcolumnAxes[i])) return false;\n }\n }\n\n // Match annotations if specified\n if (selector.annotations !== undefined) {\n const columnAnnotations = pcolumn.annotations || {};\n for (const [key, value] of Object.entries(selector.annotations))\n if (columnAnnotations[key] !== value) return false;\n }\n\n // Match annotation patterns if specified\n if (selector.annotationPatterns !== undefined) {\n const columnAnnotations = pcolumn.annotations || {};\n for (const [key, pattern] of Object.entries(selector.annotationPatterns)) {\n const value = columnAnnotations[key];\n if (value === undefined || !new RegExp(pattern).test(value)) return false;\n }\n }\n\n return true;\n}\n\n/**\n * Convert a predicate or array of selectors to a single predicate function\n * @param predicateOrSelectors - Either a function that takes a PColumnSpec and returns a boolean,\n * or an array of PColumnSelectors, or a single PColumnSelector\n * @returns A function that takes a PColumnSpec and returns a boolean\n */\nexport function selectorsToPredicate(\n predicateOrSelectors: PColumnSelector | PColumnSelector[],\n): (spec: PObjectSpec) => boolean {\n if (Array.isArray(predicateOrSelectors))\n return (spec) =>\n predicateOrSelectors.some((selector) => isPColumnSpec(spec) && matchPColumn(spec, selector));\n else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, pred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CAAC,OAAO,CAAC,oBAAoB,CAAC;QACrC,OAAO,CAAC,IAAI,KACV,oBAAoB,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,aAAa,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;;AAC3F,QAAA,OAAO,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,EAAE,oBAAoB,CAAC;AACvF;;;;"}
1
+ {"version":3,"file":"selectors.js","names":[],"sources":["../../../../src/drivers/pframe/spec/selectors.ts"],"sourcesContent":["import { isPColumnSpec, type PObjectSpec } from \"../../../pool\";\nimport type { AxisId, AxisValueType, Domain, PColumnSpec, ValueType } from \"./spec\";\nimport { getAxisId } from \"./spec\";\n\n/**\n * Defines a pattern for matching axes within the PFrame data model.\n *\n * AxisSelector provides a flexible way to identify axes based on their\n * properties. All fields are optional, allowing for partial matching.\n * When multiple properties are specified, all must match for an axis\n * to be selected (logical AND).\n *\n * This interface is used in various selection and matching operations\n * throughout the PFrame system, such as column queries and axis lookups.\n */\nexport interface AxisSelector {\n /**\n * Optional value type to match against.\n * When specified, only axes with this exact type will match.\n * Can be a single type or an array of types to match against any of them.\n * Valid types include: 'Int', 'Long', 'Float', 'Double', 'String', 'Bytes'.\n */\n type?: ValueType | ValueType[];\n\n /**\n * Optional name to match against.\n * When specified, only axes with this exact name will match.\n */\n name?: string;\n\n /**\n * Optional domain key-value pairs to match against.\n * Domains provide additional context to uniquely identify an axis beyond its name and type.\n * When specified, an axis will match only if it contains all the key-value pairs defined here.\n * An axis with additional domain entries not present in this selector will still match.\n */\n domain?: Record<string, string>;\n}\n\n/** Single axis selector */\nexport interface SingleAxisSelector {\n /** Axis name (required) */\n name: string;\n /** Axis type (optional) */\n type?: AxisValueType;\n /** Domain requirements (optional) */\n domain?: Domain;\n /** Parent axes requirements (optional) */\n parentAxes?: SingleAxisSelector[];\n}\n\n/**\n * Reference to an axis by its numerical index within the anchor column's axes array\n * Format: [anchorId, axisIndex]\n */\nexport type AnchorAxisRefByIdx = { anchor: string; idx: number };\n\n/**\n * Reference to an axis by its name within the anchor column\n * Format: [anchorId, axisName]\n */\nexport type AnchorAxisRefByName = { anchor: string; name: string };\n\n/**\n * Reference to an axis using an AxisId matcher within the anchor\n * Format: [anchorId, axisMatcher]\n */\nexport type AnchorAxisRefByMatcher = { anchor: string; id: AxisId };\n\n/**\n * Basic anchor axis reference that can be either by index or a direct AxisId\n */\nexport type AnchorAxisIdOrRefBasic = AnchorAxisRefByIdx | AxisId;\n\n/** Union of all possible ways to reference an axis in an anchored context */\nexport type AnchorAxisRef = AnchorAxisRefByIdx | AnchorAxisRefByName | AnchorAxisRefByMatcher;\n\n/** Reference to a domain value through an anchor */\nexport type AnchorDomainRef = { anchor: string };\n\n/**\n * Domain value that can be either a direct string value or a reference to a domain through an anchor\n * Used to establish domain context that can be resolved relative to other anchored columns\n */\nexport type ADomain = string | AnchorDomainRef;\n/**\n * Axis identifier that can be either a direct AxisId or a reference to an axis through an anchor\n * Allows referring to axes in a way that can be resolved in different contexts\n */\nexport type AAxisSelector = AxisSelector | AnchorAxisRef;\n\n/**\n * Match resolution strategy for PColumns\n * Specifies how to handle when multiple columns match the criteria\n * (default is \"expectSingle\")\n */\nexport type AnchoredColumnMatchStrategy = \"expectSingle\" | \"expectMultiple\" | \"takeFirst\";\n\n/**\n * Matcher for PColumns in an anchored context\n * Supports partial matching on axes, allowing for flexible column discovery\n */\nexport interface AnchoredPColumnSelector {\n /** Optional name of the column to match; can't be used together with namePattern */\n name?: string;\n /** Optional regexp pattern for column name matching; can't be used together with name */\n namePattern?: string;\n /** Optional value type to match. If an array is provided, matches if the column's type is any of the specified types */\n type?: ValueType | ValueType[];\n /** If specified, the domain values must be anchored to this anchor */\n domainAnchor?: string;\n /** Optional domain values to match, can include anchored references, if domainAnchor is specified,\n * interpreted as additional domains to domain from the anchor */\n domain?: Record<string, ADomain>;\n /** Optional axes to match, can include anchored references */\n axes?: AAxisSelector[];\n /** When true, allows matching if only a subset of axes match */\n partialAxesMatch?: boolean;\n /** Optional annotations to match with exact values */\n annotations?: Record<string, string>;\n /** Optional annotation patterns to match with regex patterns */\n annotationPatterns?: Record<string, string>;\n /** Match resolution strategy, default is \"expectSingle\" */\n matchStrategy?: AnchoredColumnMatchStrategy;\n}\n\n/**\n * Matcher for PColumns in a non-anchored context\n */\nexport interface PColumnSelector extends AnchoredPColumnSelector {\n domainAnchor?: never;\n domain?: Record<string, string>;\n axes?: AxisSelector[];\n}\n\n/**\n * Strict identifier for PColumns in an anchored context\n * Unlike APColumnMatcher, this requires exact matches on domain and axes\n */\nexport interface AnchoredPColumnId extends AnchoredPColumnSelector {\n /** Name is required for exact column identification */\n name: string;\n /** No namePattern in ID */\n namePattern?: never;\n /** Type is not used in exact column identification */\n type?: never;\n /** Full axes specification using only basic references */\n axes: AnchorAxisIdOrRefBasic[];\n /** Partial axes matching is not allowed for exact identification */\n partialAxesMatch?: never;\n /** Annotations are not used in exact column identification */\n annotations?: never;\n /** Annotation patterns are not used in exact column identification */\n annotationPatterns?: never;\n /** \"Id\" implies single match strategy */\n matchStrategy?: never;\n}\n\n/**\n * Checks if a given value is an anchored column identifier\n * @param id - The value to check\n * @returns True if the value is an anchored column identifier, false otherwise\n */\nexport function isAnchoredPColumnId(id: unknown): id is AnchoredPColumnId {\n // basic check, can be extended if needed\n return typeof id === \"object\" && id !== null && \"name\" in id && \"axes\" in id;\n}\n\n/**\n * Determines if an axis ID matches an axis selector.\n *\n * @param selector - The selector with criteria to match against\n * @param axis - The AxisId to check against the selector\n * @returns true if the AxisId matches all specified criteria in the selector, false otherwise\n */\nexport function matchAxis(selector: AxisSelector, axis: AxisId): boolean {\n // Match name if specified\n if (selector.name !== undefined && selector.name !== axis.name) return false;\n\n // Match type if specified\n if (selector.type !== undefined) {\n if (Array.isArray(selector.type)) {\n if (!selector.type.includes(axis.type)) return false;\n } else if (selector.type !== axis.type) {\n return false;\n }\n }\n\n // Match domain if specified - using existing logic from matchAxisId\n if (selector.domain !== undefined) {\n const axisDomain = axis.domain || {};\n for (const [key, value] of Object.entries(selector.domain))\n if (axisDomain[key] !== value) return false;\n }\n\n return true;\n}\n\n/**\n * Determines if a given PColumnSpec matches a selector.\n *\n * @param pcolumn - The PColumnSpec to check against the selector\n * @param selector - The selector criteria to match against\n * @returns true if the PColumnSpec matches all criteria in the selector, false otherwise\n */\nexport function matchPColumn(pcolumn: PColumnSpec, selector: PColumnSelector): boolean {\n // Match name if specified\n if (selector.name !== undefined && pcolumn.name !== selector.name) return false;\n\n // Match name pattern if specified\n if (selector.namePattern !== undefined && !new RegExp(selector.namePattern).test(pcolumn.name))\n return false;\n\n // Match type if specified\n if (selector.type !== undefined) {\n if (Array.isArray(selector.type)) {\n if (!selector.type.includes(pcolumn.valueType)) return false;\n } else if (selector.type !== pcolumn.valueType) {\n return false;\n }\n }\n\n // Match domain if specified\n if (selector.domain !== undefined) {\n const columnDomain = pcolumn.domain || {};\n for (const [key, value] of Object.entries(selector.domain))\n if (columnDomain[key] !== value) return false;\n }\n\n // Match axes if specified\n if (selector.axes !== undefined) {\n const pcolumnAxes = pcolumn.axesSpec.map(getAxisId);\n\n if (selector.partialAxesMatch) {\n // For partial matching, all selector axes must match at least one column axis\n for (const selectorAxis of selector.axes)\n if (!pcolumnAxes.some((columnAxis) => matchAxis(selectorAxis, columnAxis))) return false;\n } else {\n // For exact matching, column must have the same number of axes and all must match\n if (pcolumnAxes.length !== selector.axes.length) return false;\n\n // Each selector axis must match a corresponding column axis\n for (let i = 0; i < selector.axes.length; i++)\n if (!matchAxis(selector.axes[i], pcolumnAxes[i])) return false;\n }\n }\n\n // Match annotations if specified\n if (selector.annotations !== undefined) {\n const columnAnnotations = pcolumn.annotations || {};\n for (const [key, value] of Object.entries(selector.annotations))\n if (columnAnnotations[key] !== value) return false;\n }\n\n // Match annotation patterns if specified\n if (selector.annotationPatterns !== undefined) {\n const columnAnnotations = pcolumn.annotations || {};\n for (const [key, pattern] of Object.entries(selector.annotationPatterns)) {\n const value = columnAnnotations[key];\n if (value === undefined || !new RegExp(pattern).test(value)) return false;\n }\n }\n\n return true;\n}\n\n/**\n * Convert a predicate or array of selectors to a single predicate function\n * @param predicateOrSelectors - Either a function that takes a PColumnSpec and returns a boolean,\n * or an array of PColumnSelectors, or a single PColumnSelector\n * @returns A function that takes a PColumnSpec and returns a boolean\n */\nexport function selectorsToPredicate(\n predicateOrSelectors: PColumnSelector | PColumnSelector[],\n): (spec: PObjectSpec) => boolean {\n if (Array.isArray(predicateOrSelectors))\n return (spec) =>\n predicateOrSelectors.some((selector) => isPColumnSpec(spec) && matchPColumn(spec, selector));\n else return (spec) => isPColumnSpec(spec) && matchPColumn(spec, predicateOrSelectors);\n}\n"],"mappings":";;;;;;;;;AAmKA,SAAgB,oBAAoB,IAAsC;AAExE,QAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,UAAU,MAAM,UAAU;;;;;;;;;AAU5E,SAAgB,UAAU,UAAwB,MAAuB;AAEvE,KAAI,SAAS,SAAS,UAAa,SAAS,SAAS,KAAK,KAAM,QAAO;AAGvE,KAAI,SAAS,SAAS,QACpB;MAAI,MAAM,QAAQ,SAAS,KAAK,EAC9B;OAAI,CAAC,SAAS,KAAK,SAAS,KAAK,KAAK,CAAE,QAAO;aACtC,SAAS,SAAS,KAAK,KAChC,QAAO;;AAKX,KAAI,SAAS,WAAW,QAAW;EACjC,MAAM,aAAa,KAAK,UAAU,EAAE;AACpC,OAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,SAAS,OAAO,CACxD,KAAI,WAAW,SAAS,MAAO,QAAO;;AAG1C,QAAO;;;;;;;;;AAUT,SAAgB,aAAa,SAAsB,UAAoC;AAErF,KAAI,SAAS,SAAS,UAAa,QAAQ,SAAS,SAAS,KAAM,QAAO;AAG1E,KAAI,SAAS,gBAAgB,UAAa,CAAC,IAAI,OAAO,SAAS,YAAY,CAAC,KAAK,QAAQ,KAAK,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