@milaboratories/pl-model-common 1.13.3 → 1.13.4
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.
- package/dist/branding.d.ts +3 -3
- package/dist/branding.d.ts.map +1 -1
- package/dist/drivers/pframe/data_info.d.ts +13 -1
- package/dist/drivers/pframe/data_info.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/ids.d.ts +2 -1
- package/dist/drivers/pframe/spec/ids.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +132 -128
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/branding.ts +2 -2
- package/src/drivers/pframe/data_info.ts +20 -2
- package/src/drivers/pframe/spec/anchored.ts +1 -1
- package/src/drivers/pframe/spec/ids.ts +2 -1
|
@@ -235,13 +235,19 @@ export interface BinaryPartitionedDataInfoEntries<Blob> {
|
|
|
235
235
|
parts: PColumnDataEntry<BinaryChunk<Blob>>[];
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Union type representing all possible entry-based partitioned data storage formats
|
|
240
|
+
*/
|
|
241
|
+
export type PartitionedDataInfoEntries<Blob> =
|
|
242
|
+
| JsonPartitionedDataInfoEntries<Blob>
|
|
243
|
+
| BinaryPartitionedDataInfoEntries<Blob>;
|
|
244
|
+
|
|
238
245
|
/**
|
|
239
246
|
* Union type representing all possible entry-based data storage formats
|
|
240
247
|
*/
|
|
241
248
|
export type DataInfoEntries<Blob> =
|
|
242
249
|
| JsonDataInfoEntries
|
|
243
|
-
|
|
|
244
|
-
| BinaryPartitionedDataInfoEntries<Blob>;
|
|
250
|
+
| PartitionedDataInfoEntries<Blob>;
|
|
245
251
|
|
|
246
252
|
/**
|
|
247
253
|
* Type guard function that checks if the given value is a valid DataInfoEntries.
|
|
@@ -280,6 +286,18 @@ export function isDataInfoEntries<Blob>(value: unknown): value is DataInfoEntrie
|
|
|
280
286
|
}
|
|
281
287
|
}
|
|
282
288
|
|
|
289
|
+
/**
|
|
290
|
+
* Type guard function that checks if the given value is a valid PartitionedDataInfoEntries.
|
|
291
|
+
*
|
|
292
|
+
* @template Blob - Type parameter representing the storage reference type
|
|
293
|
+
* @param value - The value to check
|
|
294
|
+
* @returns True if the value is a valid PartitionedDataInfoEntries, false otherwise
|
|
295
|
+
*/
|
|
296
|
+
export function isPartitionedDataInfoEntries<Blob>(value: unknown): value is PartitionedDataInfoEntries<Blob> {
|
|
297
|
+
if (!isDataInfoEntries(value)) return false;
|
|
298
|
+
return value.type === 'JsonPartitioned' || value.type === 'BinaryPartitioned';
|
|
299
|
+
}
|
|
300
|
+
|
|
283
301
|
/**
|
|
284
302
|
* Converts DataInfo to DataInfoEntries
|
|
285
303
|
*
|
|
@@ -40,7 +40,7 @@ export class AnchoredIdDeriver {
|
|
|
40
40
|
* Creates a new anchor context from a set of anchor column specifications
|
|
41
41
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
42
42
|
*/
|
|
43
|
-
constructor(
|
|
43
|
+
constructor(public readonly anchors: Record<string, PColumnSpec>) {
|
|
44
44
|
const anchorEntries = Object.entries(anchors);
|
|
45
45
|
anchorEntries.sort((a, b) => a[0].localeCompare(b[0]));
|
|
46
46
|
for (const [anchorId, spec] of anchorEntries) {
|
|
@@ -2,6 +2,7 @@ import type { Branded } from '../../../branding';
|
|
|
2
2
|
import type { AnchoredPColumnId } from './selectors';
|
|
3
3
|
import type { FilteredPColumnId } from './filtered_column';
|
|
4
4
|
import canonicalize from 'canonicalize';
|
|
5
|
+
import type { PObjectId } from '../../../pool';
|
|
5
6
|
/**
|
|
6
7
|
* Universal column identifier optionally anchored and optionally filtered.
|
|
7
8
|
*/
|
|
@@ -10,7 +11,7 @@ export type UniversalPColumnId = AnchoredPColumnId | FilteredPColumnId;
|
|
|
10
11
|
/**
|
|
11
12
|
* Canonically serialized {@link UniversalPColumnId}.
|
|
12
13
|
*/
|
|
13
|
-
export type SUniversalPColumnId = Branded<
|
|
14
|
+
export type SUniversalPColumnId = Branded<PObjectId, 'SUniversalPColumnId', '__pl_model_brand_2__'>;
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Canonically serializes a {@link UniversalPColumnId} to a string.
|