@oimdb/core 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/README.md +164 -161
- package/dist/index.cjs +926 -722
- package/dist/index.d.cts +206 -137
- package/dist/index.d.ts +206 -137
- package/dist/index.js +916 -716
- package/llms.txt +314 -275
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ interface IOIMEffectService {
|
|
|
10
10
|
setPositionInSubscribedSlot(effect: TOIMEffect, edge: number, positionInSlot: number): void;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
type
|
|
13
|
+
type TOIMEditable<TSlot> = {
|
|
14
14
|
-readonly [K in keyof TSlot]: TSlot[K];
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -18,18 +18,39 @@ interface IOIMSlotOwner {
|
|
|
18
18
|
holdSlot(slot: TOIMSlot): void;
|
|
19
19
|
unholdSlot(slot: TOIMSlot): void;
|
|
20
20
|
releaseSlotIfUnheld(slot: TOIMSlot): void;
|
|
21
|
-
unsafeMutateSlot(slot: TOIMSlot, mutateSlot: (
|
|
21
|
+
unsafeMutateSlot(slot: TOIMSlot, mutateSlot: (editableSlot: TOIMEditable<TOIMSlot>) => void): void;
|
|
22
22
|
subscribeToSlot(slot: TOIMSlot, effect: TOIMEffect, edge: number): number;
|
|
23
23
|
unsubscribeFromSlot(slot: TOIMSlot, positionInSlot: number, effect: TOIMEffect): boolean;
|
|
24
24
|
onSlotFirstSubscribed(slot: TOIMSlot): void;
|
|
25
25
|
onSlotLastUnsubscribed(slot: TOIMSlot): void;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
declare class OIMSourceTracker {
|
|
29
|
+
private readonly slotSourceList;
|
|
30
|
+
private computedSourceList;
|
|
31
|
+
private committedAllRootSlots;
|
|
32
|
+
private trackedAllRootSlots;
|
|
33
|
+
private isTrackedAllRootSlotsChanged;
|
|
34
|
+
private committedComputedRootSlots;
|
|
35
|
+
private trackedComputedRootSlots;
|
|
36
|
+
readSourceSlot<TSlot extends TOIMSlot>(slot: TSlot): TSlot;
|
|
37
|
+
readSourceComputedValue<TValue>(computedSlot: TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined>): TValue;
|
|
38
|
+
openSourceTracking(): void;
|
|
39
|
+
closeSourceTracking(): boolean;
|
|
40
|
+
isAnyComputedRootSlotsReplaced(): boolean;
|
|
41
|
+
trackReplacedRootSlots(): boolean;
|
|
42
|
+
getTrackedSourceSlots(): readonly TOIMSlot[];
|
|
43
|
+
getTrackedSourceComputeds(): readonly TOIMComputedContentSlot<unknown, OIMSourceTracker | undefined>[];
|
|
44
|
+
getTrackedAllRootSlots(): readonly TOIMSlot[];
|
|
45
|
+
commitTrackedSources(): void;
|
|
46
|
+
private trackAllRootSlots;
|
|
47
|
+
}
|
|
48
|
+
|
|
28
49
|
interface IOIMComputedValueService<TValue = unknown> {
|
|
29
|
-
getValueForSlot(computedSlot: TOIMComputedContentSlot<TValue>): TValue;
|
|
50
|
+
getValueForSlot(computedSlot: TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined>): TValue;
|
|
30
51
|
}
|
|
31
52
|
|
|
32
|
-
type TOIMComputedContentSlot<TValue = unknown> = TOIMSlot & Readonly<
|
|
53
|
+
type TOIMComputedContentSlot<TValue = unknown, TSourceTracker extends OIMSourceTracker | undefined = undefined> = TOIMSlot & Readonly<TOIMComputedDerivation> & {
|
|
33
54
|
readonly owner: IOIMSlotOwner;
|
|
34
55
|
readonly computedValueService: IOIMComputedValueService<TValue>;
|
|
35
56
|
readonly value: TValue;
|
|
@@ -37,14 +58,12 @@ type TOIMComputedContentSlot<TValue = unknown> = TOIMSlot & Readonly<TOIMDerivat
|
|
|
37
58
|
readonly checkedAtEpoch: number;
|
|
38
59
|
readonly isDeriving: boolean;
|
|
39
60
|
readonly allRootSlots: readonly TOIMSlot[] | undefined;
|
|
61
|
+
readonly sourceTracker: TSourceTracker;
|
|
40
62
|
};
|
|
41
63
|
|
|
42
|
-
type
|
|
64
|
+
type TOIMComputedDerivation = {
|
|
43
65
|
readonly sourceSlots: readonly TOIMSlot[];
|
|
44
|
-
readonly sourceComputeds: readonly TOIMComputedContentSlot[];
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
type TOIMDerivation = TOIMComputedSources & {
|
|
66
|
+
readonly sourceComputeds: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker | undefined>[];
|
|
48
67
|
ranAtRevision: number;
|
|
49
68
|
ranAtEpoch: number;
|
|
50
69
|
};
|
|
@@ -63,9 +82,9 @@ declare class OIMChannelQueue<TEntry> {
|
|
|
63
82
|
keepFirstEntries(keptCount: number): void;
|
|
64
83
|
}
|
|
65
84
|
|
|
66
|
-
interface
|
|
85
|
+
interface IOIMSlotContentChangeListener<TSlot, TPatch = unknown> {
|
|
67
86
|
onContentChanged(slot: TSlot, patch: TPatch | undefined, changedColumns: readonly string[] | undefined): void;
|
|
68
|
-
|
|
87
|
+
onManyContentsChanged(slotChannelQueue: OIMChannelQueue<TSlot>, patchChannelQueue: OIMChannelQueue<TPatch | undefined>, changedColumnsChannelQueue: OIMChannelQueue<readonly string[] | undefined>): void;
|
|
69
88
|
}
|
|
70
89
|
|
|
71
90
|
type TOIMIndexKeysPositions = {
|
|
@@ -87,7 +106,7 @@ type TOIMStoreSlot<TStore = unknown, TSlot extends TOIMSlot = TOIMSlot, TPatch =
|
|
|
87
106
|
readonly store: TStore;
|
|
88
107
|
readonly slotService: TSlotService;
|
|
89
108
|
readonly channelSlot: TOIMChannelSlot;
|
|
90
|
-
readonly contentChangeListeners:
|
|
109
|
+
readonly contentChangeListeners: IOIMSlotContentChangeListener<TSlot, TPatch>[] | undefined;
|
|
91
110
|
readonly contentChangeListenerReadColumnNames: (readonly string[] | undefined)[] | undefined;
|
|
92
111
|
readonly indexKeysPositions: TOIMIndexKeysPositions | undefined;
|
|
93
112
|
readonly columnListenerCountsByColumnName: Map<string, number> | undefined;
|
|
@@ -233,7 +252,7 @@ type TOIMChannelSlot = TOIMFlushSchedulerSlot & {
|
|
|
233
252
|
dropped: boolean;
|
|
234
253
|
};
|
|
235
254
|
|
|
236
|
-
type TOIMEffect =
|
|
255
|
+
type TOIMEffect = TOIMComputedDerivation & {
|
|
237
256
|
readonly effectService: IOIMEffectService;
|
|
238
257
|
readonly channelSlot: TOIMChannelSlot;
|
|
239
258
|
readonly allRootSlots: readonly TOIMSlot[];
|
|
@@ -242,6 +261,7 @@ type TOIMEffect = TOIMDerivation & {
|
|
|
242
261
|
effectFlags: number;
|
|
243
262
|
readonly body: TOIMEffectBody;
|
|
244
263
|
cleanup: (() => void) | undefined;
|
|
264
|
+
readonly sourceTracker: OIMSourceTracker | undefined;
|
|
245
265
|
};
|
|
246
266
|
|
|
247
267
|
type TOIMSlot = {
|
|
@@ -255,7 +275,7 @@ type TOIMSlot = {
|
|
|
255
275
|
readonly releaseDueAfterUnholdMs: number;
|
|
256
276
|
readonly slotFlags: number;
|
|
257
277
|
readonly columnSlotStore: unknown;
|
|
258
|
-
readonly storeSlot: TOIMStoreSlot
|
|
278
|
+
readonly storeSlot: TOIMStoreSlot;
|
|
259
279
|
readonly owner: IOIMSlotOwner;
|
|
260
280
|
};
|
|
261
281
|
|
|
@@ -309,7 +329,7 @@ type TOIMColumnSlot = TOIMSlot & {
|
|
|
309
329
|
readonly key: string;
|
|
310
330
|
};
|
|
311
331
|
|
|
312
|
-
type TOIMComputedSlot<TValue = unknown, TKey extends NonNullable<unknown> = NonNullable<unknown
|
|
332
|
+
type TOIMComputedSlot<TValue = unknown, TKey extends NonNullable<unknown> = NonNullable<unknown>, TSourceTracker extends OIMSourceTracker | undefined = undefined> = TOIMComputedContentSlot<TValue, TSourceTracker> & TOIMIndexableSlot<TKey>;
|
|
313
333
|
|
|
314
334
|
type TOIMComputedColumnSlot = TOIMComputedSlot<unknown, string>;
|
|
315
335
|
|
|
@@ -335,7 +355,7 @@ declare class OIMSlotOwner implements IOIMSlotOwner {
|
|
|
335
355
|
subscribeToSlot(slot: TOIMSlot, effect: TOIMEffect, edge: number): number;
|
|
336
356
|
unsubscribeFromSlot(slot: TOIMSlot, positionInSlot: number, effect: TOIMEffect): boolean;
|
|
337
357
|
releaseSlotIfUnheld(_slot: TOIMSlot): void;
|
|
338
|
-
unsafeMutateSlot(slot: TOIMSlot, mutateSlot: (
|
|
358
|
+
unsafeMutateSlot(slot: TOIMSlot, mutateSlot: (editableSlot: TOIMEditable<TOIMSlot>) => void): void;
|
|
339
359
|
onSlotFirstSubscribed(_slot: TOIMSlot): void;
|
|
340
360
|
onSlotLastUnsubscribed(_slot: TOIMSlot): void;
|
|
341
361
|
protected onSlotIdle(_slot: TOIMSlot): void;
|
|
@@ -395,7 +415,7 @@ declare class OIMPullColumnSlotOwner extends OIMColumnSlotOwner<TOIMComputedCont
|
|
|
395
415
|
}
|
|
396
416
|
|
|
397
417
|
interface IOIMSlotStamp<TSlot> {
|
|
398
|
-
stamp(
|
|
418
|
+
stamp(editableSlot: TOIMEditable<TSlot>): void;
|
|
399
419
|
}
|
|
400
420
|
|
|
401
421
|
type TOIMOrderedListCommand = {
|
|
@@ -506,59 +526,55 @@ declare class OIMThrowAtOnceErrorPolicy implements IOIMErrorPolicy {
|
|
|
506
526
|
onErrorCaught(error: unknown): void;
|
|
507
527
|
}
|
|
508
528
|
|
|
509
|
-
|
|
510
|
-
private readonly slotEffectSourceList;
|
|
511
|
-
private computedEffectSourceList;
|
|
512
|
-
private committedAllRootSlots;
|
|
513
|
-
private trackedAllRootSlots;
|
|
514
|
-
private isTrackedAllRootSlotsChanged;
|
|
515
|
-
readSourceSlot<TSlot extends TOIMSlot>(slot: TSlot): TSlot;
|
|
516
|
-
readSourceComputedValue<TValue>(computedSlot: TOIMComputedContentSlot<TValue>): TValue;
|
|
517
|
-
openSourceTracking(): void;
|
|
518
|
-
closeSourceTracking(): boolean;
|
|
519
|
-
getTrackedSourceSlots(): readonly TOIMSlot[];
|
|
520
|
-
getTrackedSourceComputeds(): readonly TOIMComputedContentSlot[];
|
|
521
|
-
getTrackedAllRootSlots(): readonly TOIMSlot[];
|
|
522
|
-
commitTrackedSources(): void;
|
|
523
|
-
private trackAllRootSlots;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
type TOIMEffectBodyWithSourceTracking = (effectSourceTracker: OIMEffectSourceTracker) => (() => void) | void;
|
|
529
|
+
type TOIMSourceTrackingEffectBody = (sourceTracker: OIMSourceTracker) => (() => void) | void;
|
|
527
530
|
|
|
528
531
|
declare class OIMEffectService implements IOIMEffectService {
|
|
529
532
|
static readonly INSTANCE: OIMEffectService;
|
|
530
|
-
createEffect(channelMap: IOIMChannelMap,
|
|
531
|
-
subscribeEffect(channelMap: IOIMChannelMap,
|
|
532
|
-
|
|
533
|
-
|
|
533
|
+
createEffect(channelMap: IOIMChannelMap, body: TOIMEffectBody, sourceSlots?: readonly TOIMSlot[], sourceComputeds?: readonly TOIMComputedContentSlot[], sourceTrackingComputeds?: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker>[]): TOIMEffect;
|
|
534
|
+
subscribeEffect(channelMap: IOIMChannelMap, body: TOIMEffectBody, sourceSlots?: readonly TOIMSlot[], sourceComputeds?: readonly TOIMComputedContentSlot[], sourceTrackingComputeds?: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker>[]): TOIMDisposer;
|
|
535
|
+
createAndRunEffect(channelMap: IOIMChannelMap, body: TOIMEffectBody, sourceSlots?: readonly TOIMSlot[], sourceComputeds?: readonly TOIMComputedContentSlot[], sourceTrackingComputeds?: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker>[]): TOIMEffect;
|
|
536
|
+
createSourceTrackingEffect(channelMap: IOIMChannelMap, sourceTrackingEffectBody: TOIMSourceTrackingEffectBody): TOIMEffect;
|
|
537
|
+
private createEffectOverSourceTrackingComputeds;
|
|
538
|
+
private createEffectOverSourceTracker;
|
|
539
|
+
private scheduleEffectRunIfWrittenSinceFrameOpened;
|
|
534
540
|
markEffectRunScheduled(effect: TOIMEffect, isSourceCheckOwed: boolean): boolean;
|
|
535
541
|
runScheduledEffect(effect: TOIMEffect): void;
|
|
536
542
|
runEffectIfSourcesChanged(effect: TOIMEffect): void;
|
|
537
543
|
runEffect(effect: TOIMEffect): void;
|
|
538
544
|
disposeEffect(effect: TOIMEffect): void;
|
|
539
545
|
setPositionInSubscribedSlot(effect: TOIMEffect, edge: number, positionInSlot: number): void;
|
|
540
|
-
private
|
|
546
|
+
private runSourceTrackingEffectBody;
|
|
541
547
|
private resubscribeToTrackedSources;
|
|
542
548
|
private getSubscribedSlotAtEdge;
|
|
543
549
|
private runCleanup;
|
|
544
550
|
private unsubscribeFrom;
|
|
545
551
|
}
|
|
546
552
|
|
|
547
|
-
type
|
|
553
|
+
type TOIMComputedSources = {
|
|
554
|
+
readonly sourceSlots: readonly TOIMSlot[];
|
|
555
|
+
readonly sourceComputeds: readonly TOIMComputedContentSlot[];
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
type TOIMComputedValueReleaser<TValue> = (value: TValue) => void;
|
|
559
|
+
|
|
560
|
+
type TOIMComputedValueServiceOptions<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined>> = {
|
|
548
561
|
derive?: ((computedSlot: TComputedSlot) => TValue) | undefined;
|
|
549
562
|
sameValueGuard?: TOIMSameValueGuard<TValue> | undefined;
|
|
563
|
+
releaseValue?: TOIMComputedValueReleaser<TValue> | undefined;
|
|
550
564
|
};
|
|
551
565
|
|
|
552
|
-
declare class OIMComputedValueService<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue> = TOIMComputedContentSlot<TValue>> implements IOIMComputedValueService<TValue> {
|
|
566
|
+
declare class OIMComputedValueService<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined> = TOIMComputedContentSlot<TValue>> implements IOIMComputedValueService<TValue> {
|
|
553
567
|
private readonly derive;
|
|
554
|
-
|
|
568
|
+
protected readonly sameValueGuard: TOIMSameValueGuard<TValue>;
|
|
569
|
+
protected readonly releaseValue: TOIMComputedValueReleaser<TValue>;
|
|
555
570
|
constructor(options: TOIMComputedValueServiceOptions<TValue, TComputedSlot>);
|
|
556
571
|
getValueForSlot(computedSlot: TComputedSlot): TValue;
|
|
572
|
+
releaseSlotValue(computedSlot: TComputedSlot): void;
|
|
557
573
|
}
|
|
558
574
|
|
|
559
|
-
interface IOIMSlotContentService<TSlot extends TOIMSlot
|
|
575
|
+
interface IOIMSlotContentService<TSlot extends TOIMSlot> {
|
|
560
576
|
isSlotEmpty(slot: TSlot): boolean;
|
|
561
|
-
releaseSlotContent(slot: TSlot
|
|
577
|
+
releaseSlotContent(slot: TSlot): void;
|
|
562
578
|
hasReference(slot: TSlot): boolean;
|
|
563
579
|
}
|
|
564
580
|
|
|
@@ -570,26 +586,27 @@ interface IOIMSingleSlotCreator<TSlot extends TOIMSlot> {
|
|
|
570
586
|
createSingleSlot(storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TSlot;
|
|
571
587
|
}
|
|
572
588
|
|
|
573
|
-
type TOIMSlotContentComputedServiceOptions<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue>> = {
|
|
589
|
+
type TOIMSlotContentComputedServiceOptions<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined>> = {
|
|
574
590
|
computedValueService: OIMComputedValueService<TValue, TComputedSlot>;
|
|
575
591
|
createSources?: ((computedSlot: TComputedSlot) => Partial<TOIMComputedSources>) | undefined;
|
|
576
592
|
initialValue?: TValue | undefined;
|
|
577
593
|
};
|
|
578
594
|
|
|
579
|
-
declare class OIMSlotContentComputedService<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue> = TOIMComputedContentSlot<TValue>> implements IOIMSlotContentService<TComputedSlot>, IOIMKeyedSlotCreator<NonNullable<unknown>,
|
|
595
|
+
declare class OIMSlotContentComputedService<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined> = TOIMComputedContentSlot<TValue>> implements IOIMSlotContentService<TComputedSlot>, IOIMKeyedSlotCreator<NonNullable<unknown>, TComputedSlot & TOIMIndexableSlot>, IOIMSingleSlotCreator<TComputedSlot> {
|
|
580
596
|
private readonly computedValueService;
|
|
581
597
|
private readonly createSources;
|
|
582
598
|
private readonly initialValue;
|
|
583
599
|
constructor(options: TOIMSlotContentComputedServiceOptions<TValue, TComputedSlot>);
|
|
584
|
-
createSlot<TKey extends NonNullable<unknown>>(key: TKey, storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TComputedSlot &
|
|
585
|
-
createSingleSlot(storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner):
|
|
600
|
+
createSlot<TKey extends NonNullable<unknown>>(key: TKey, storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TComputedSlot & TOIMIndexableSlot<TKey>;
|
|
601
|
+
createSingleSlot(storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TComputedSlot;
|
|
586
602
|
isSlotEmpty(): boolean;
|
|
587
603
|
releaseSlotContent(computedSlot: TComputedSlot): void;
|
|
588
604
|
hasReference(): boolean;
|
|
589
|
-
|
|
605
|
+
protected createSourceTracker(): OIMSourceTracker | undefined;
|
|
606
|
+
protected attachSources(computedSlot: TComputedSlot, storeSlot: TOIMStoreSlot): void;
|
|
590
607
|
}
|
|
591
608
|
|
|
592
|
-
declare function oimRefreshSourceComputeds(sourceComputeds: readonly TOIMComputedContentSlot[]): void;
|
|
609
|
+
declare function oimRefreshSourceComputeds(sourceComputeds: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker | undefined>[]): void;
|
|
593
610
|
|
|
594
611
|
interface IOIMSlotReleasePolicy {
|
|
595
612
|
readonly releasesWrittenSlots: boolean;
|
|
@@ -602,12 +619,12 @@ interface IOIMSlotReleasePolicy {
|
|
|
602
619
|
cancelSlotRelease(slot: TOIMSlot): void;
|
|
603
620
|
}
|
|
604
621
|
|
|
605
|
-
type TOIMSlotOwnerServiceOptions<TSlot extends TOIMSlot, TStore, TColumnName extends string, TColumnSlot extends TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot
|
|
622
|
+
type TOIMSlotOwnerServiceOptions<TSlot extends TOIMSlot, TStore, TColumnName extends string, TColumnSlot extends TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot>> = {
|
|
606
623
|
slotStamp?: IOIMSlotStamp<TSlot> | undefined;
|
|
607
624
|
slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
|
|
608
625
|
slotSubscriptionListener?: IOIMSlotSubscriptionListener | undefined;
|
|
609
626
|
slotFilingService: IOIMSlotFilingService<TSlot, TStore>;
|
|
610
|
-
slotContentService: IOIMSlotContentService<TSlot
|
|
627
|
+
slotContentService: IOIMSlotContentService<TSlot>;
|
|
611
628
|
columnSlotOwnerOptions: TOIMColumnSlotOwnerOptions<TColumnSlot, TColumnName>;
|
|
612
629
|
createColumnSlotOwner: (columnSlotOwnerOptions: TOIMColumnSlotOwnerOptions<TColumnSlot, TColumnName>) => TColumnSlotOwner;
|
|
613
630
|
};
|
|
@@ -622,7 +639,7 @@ declare class OIMSlotOwnerService<TSlot extends TOIMSlot, TStore, TColumnName ex
|
|
|
622
639
|
readonly settlesWrittenSlots: boolean;
|
|
623
640
|
private readonly slotSubscriptionListener;
|
|
624
641
|
readonly columnSlotOwner: TColumnSlotOwner;
|
|
625
|
-
constructor(options: TOIMSlotOwnerServiceOptions<TSlot, TStore, TColumnName, TColumnSlot, TColumnSlotOwner
|
|
642
|
+
constructor(options: TOIMSlotOwnerServiceOptions<TSlot, TStore, TColumnName, TColumnSlot, TColumnSlotOwner>);
|
|
626
643
|
isSlotEmpty(slot: TSlot): boolean;
|
|
627
644
|
hasColumnSlots(slot: TOIMSlot): boolean;
|
|
628
645
|
hasContentChangeListeners(slot: TOIMSlot): boolean;
|
|
@@ -654,10 +671,10 @@ interface IOIMSlotContentWriter<TSlot extends TOIMSlot, TContent> {
|
|
|
654
671
|
clearSlotContent(slot: TSlot): void;
|
|
655
672
|
}
|
|
656
673
|
|
|
657
|
-
declare class
|
|
658
|
-
static readonly INSTANCE:
|
|
659
|
-
addContentChangeListener<TSlot extends TOIMSlot, TPatch>(storeSlot: TOIMStoreSlot<unknown, TSlot, TPatch>, listener:
|
|
660
|
-
removeContentChangeListener<TSlot extends TOIMSlot, TPatch>(storeSlot: TOIMStoreSlot<unknown, TSlot, TPatch>, listener:
|
|
674
|
+
declare class OIMSlotContentChangeListenerService {
|
|
675
|
+
static readonly INSTANCE: OIMSlotContentChangeListenerService;
|
|
676
|
+
addContentChangeListener<TSlot extends TOIMSlot, TPatch>(storeSlot: TOIMStoreSlot<unknown, TSlot, TPatch>, listener: IOIMSlotContentChangeListener<TSlot, TPatch>, readColumnNames: readonly string[] | undefined): void;
|
|
677
|
+
removeContentChangeListener<TSlot extends TOIMSlot, TPatch>(storeSlot: TOIMStoreSlot<unknown, TSlot, TPatch>, listener: IOIMSlotContentChangeListener<TSlot, TPatch>): boolean;
|
|
661
678
|
addReadColumn(storeSlot: TOIMStoreSlot, columnName: string): void;
|
|
662
679
|
removeReadColumn(storeSlot: TOIMStoreSlot, columnName: string): void;
|
|
663
680
|
addReadAnyColumn(storeSlot: TOIMStoreSlot): void;
|
|
@@ -706,7 +723,7 @@ declare class OIMColumnSlotService<TSlot extends TOIMSlot, TColumnName extends s
|
|
|
706
723
|
unholdColumn(columnSlot: TColumnSlot): void;
|
|
707
724
|
}
|
|
708
725
|
|
|
709
|
-
type TOIMSlotCollectionServiceOptions<TKey extends NonNullable<unknown>, TSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot
|
|
726
|
+
type TOIMSlotCollectionServiceOptions<TKey extends NonNullable<unknown>, TSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>> = Omit<TOIMSlotOwnerServiceOptions<TSlot, TStore, TColumnName, TColumnSlot, TColumnSlotOwner>, 'slotFilingService' | 'slotContentService'> & {
|
|
710
727
|
slotStoreService: IOIMSlotStoreService<TKey, TSlot, TStore>;
|
|
711
728
|
slotContentService: TSlotContentService & IOIMSlotContentService<TSlot> & IOIMKeyedSlotCreator<TKey, TSlot>;
|
|
712
729
|
storeSlotListener?: IOIMStoreSlotListener | undefined;
|
|
@@ -719,11 +736,11 @@ declare class OIMSlotCollectionService<TKey extends NonNullable<unknown>, TSlot
|
|
|
719
736
|
protected readonly slotStoreService: IOIMSlotStoreService<TKey, TSlot, TStore>;
|
|
720
737
|
protected readonly keyedSlotCreator: IOIMKeyedSlotCreator<TKey, TSlot>;
|
|
721
738
|
private readonly storeSlotListener;
|
|
722
|
-
constructor(options: TOIMSlotCollectionServiceOptions<TKey, TSlot, TStore, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner
|
|
739
|
+
constructor(options: TOIMSlotCollectionServiceOptions<TKey, TSlot, TStore, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner>);
|
|
723
740
|
get slotOwner(): IOIMSlotOwner;
|
|
724
741
|
createStoreSlot(channelMap: IOIMChannelMap): TOIMStoreSlot<TStore, TSlot, TPatch, this>;
|
|
725
742
|
createStoreSlotFrom(sourceStoreSlot: TOIMStoreSlot): TOIMStoreSlot<TStore, TSlot, TPatch, this>;
|
|
726
|
-
protected
|
|
743
|
+
protected createStoreSlotOverNewStore<TStoreSlot extends TOIMStoreSlot<TStore, TSlot, TPatch>>(createStoreSlotLiteral: (store: TStore) => TStoreSlot): TStoreSlot;
|
|
727
744
|
findSlotByKey(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch>, key: TKey): TSlot | undefined;
|
|
728
745
|
hasSlotContentByKey(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch>, key: TKey): boolean;
|
|
729
746
|
getSlotByKey(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch>, key: TKey): TSlot;
|
|
@@ -752,7 +769,7 @@ declare class OIMSingleSlotStoreService<TSlot extends TOIMSlot> implements IOIMS
|
|
|
752
769
|
getSlotCount(store: TOIMSingleSlotStore<TSlot>): number;
|
|
753
770
|
}
|
|
754
771
|
|
|
755
|
-
type TOIMSingleSlotServiceOptions<TSlot extends TOIMSlot, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot
|
|
772
|
+
type TOIMSingleSlotServiceOptions<TSlot extends TOIMSlot, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>> = Omit<TOIMSlotOwnerServiceOptions<TSlot, TOIMSingleSlotStore<TSlot>, TColumnName, TColumnSlot, TColumnSlotOwner>, 'slotFilingService' | 'slotContentService'> & {
|
|
756
773
|
slotStoreService: OIMSingleSlotStoreService<TSlot>;
|
|
757
774
|
slotContentService: TSlotContentService & IOIMSlotContentService<TSlot> & IOIMSingleSlotCreator<TSlot>;
|
|
758
775
|
storeSlotListener?: IOIMStoreSlotListener | undefined;
|
|
@@ -765,7 +782,7 @@ declare class OIMSingleSlotService<TSlot extends TOIMSlot, TSlotContentService,
|
|
|
765
782
|
protected readonly slotStoreService: OIMSingleSlotStoreService<TSlot>;
|
|
766
783
|
protected readonly singleSlotCreator: IOIMSingleSlotCreator<TSlot>;
|
|
767
784
|
private readonly storeSlotListener;
|
|
768
|
-
constructor(options: TOIMSingleSlotServiceOptions<TSlot, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner
|
|
785
|
+
constructor(options: TOIMSingleSlotServiceOptions<TSlot, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner>);
|
|
769
786
|
get slotOwner(): IOIMSlotOwner;
|
|
770
787
|
createStoreSlot(channelMap: IOIMChannelMap): TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch, this>;
|
|
771
788
|
findSingleSlot(storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch>): TSlot | undefined;
|
|
@@ -807,6 +824,7 @@ declare class OIMSlotContentEntityService<TEntity extends object, TKey extends N
|
|
|
807
824
|
private writeSlotToChannelAndReleaseIfUnheld;
|
|
808
825
|
private dispatchContentChangeAndReleaseIfUnheld;
|
|
809
826
|
releaseSlotContent(entitySlot: TOIMEntityContentSlot<TEntity>): void;
|
|
827
|
+
private clearEntityAndMarkColumns;
|
|
810
828
|
private isOnFastPath;
|
|
811
829
|
private hasChangedColumnReaders;
|
|
812
830
|
private updateEntitySlotEmptiness;
|
|
@@ -814,6 +832,20 @@ declare class OIMSlotContentEntityService<TEntity extends object, TKey extends N
|
|
|
814
832
|
private dispatchColumnsChanged;
|
|
815
833
|
}
|
|
816
834
|
|
|
835
|
+
type TOIMSlotContentServiceKey<TSlotContentService> = TSlotContentService extends {
|
|
836
|
+
createSlot(key: infer TKey, ...rest: never[]): unknown;
|
|
837
|
+
} ? Extract<TKey, NonNullable<unknown>> : never;
|
|
838
|
+
|
|
839
|
+
type TOIMSlotContentServiceSlot<TSlotContentService> = TSlotContentService extends {
|
|
840
|
+
createSlot(...args: never[]): infer TSlot;
|
|
841
|
+
} ? Extract<TSlot, TOIMKeyedSlot<TOIMSlotContentServiceKey<TSlotContentService>>> : never;
|
|
842
|
+
|
|
843
|
+
type TOIMSlotContentServiceContent<TSlotContentService> = TSlotContentService extends {
|
|
844
|
+
writeSlotContent(slot: never, content: infer TContent): boolean;
|
|
845
|
+
} ? TContent : never;
|
|
846
|
+
|
|
847
|
+
type TOIMSlotContentServicePatch<TSlotContentService> = TOIMSlotContentServiceContent<TSlotContentService> extends readonly unknown[] ? TOIMSlotContentServiceContent<TSlotContentService> : Partial<TOIMSlotContentServiceContent<TSlotContentService>>;
|
|
848
|
+
|
|
817
849
|
interface IOIMIndexKeysService {
|
|
818
850
|
createPositions(): TOIMIndexKeysPositions;
|
|
819
851
|
allocatePosition(positions: TOIMIndexKeysPositions): number;
|
|
@@ -822,45 +854,32 @@ interface IOIMIndexKeysService {
|
|
|
822
854
|
set<TIndexKey>(slot: TOIMIndexableSlot, position: number, indexKey: TIndexKey | undefined): void;
|
|
823
855
|
}
|
|
824
856
|
|
|
825
|
-
type
|
|
826
|
-
channelScheduler?: TOIMChannelScheduler | undefined;
|
|
827
|
-
errorPolicy?: IOIMErrorPolicy | undefined;
|
|
828
|
-
onBeforeFlush?: (() => void) | undefined;
|
|
829
|
-
getNowMs?: (() => number) | undefined;
|
|
830
|
-
releaseTimer?: TOIMTimer | undefined;
|
|
831
|
-
entityWriter?: IOIMEntityWriter | undefined;
|
|
832
|
-
indexKeysService?: IOIMIndexKeysService | undefined;
|
|
857
|
+
type TOIMDefaultsOptions = {
|
|
833
858
|
slotStamp?: IOIMSlotStamp<TOIMSlot> | undefined;
|
|
834
859
|
slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
|
|
860
|
+
entityWriter?: IOIMEntityWriter | undefined;
|
|
861
|
+
entitySlotEmptinessPolicy?: IOIMSlotEmptinessPolicy<TOIMEntityContentSlot> | undefined;
|
|
862
|
+
indexKeysService?: IOIMIndexKeysService | undefined;
|
|
863
|
+
columnSlotStoreService?: IOIMSlotStoreService<string, TOIMColumnSlot> | undefined;
|
|
864
|
+
computedColumnSlotStoreService?: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
|
|
865
|
+
storeSlotListener?: IOIMStoreSlotListener | undefined;
|
|
835
866
|
};
|
|
836
867
|
|
|
837
|
-
declare class
|
|
838
|
-
readonly
|
|
839
|
-
readonly collectorSlot: TOIMCollectorSlot;
|
|
840
|
-
readonly defaultChannelSlot: TOIMChannelSlot;
|
|
841
|
-
readonly entityWriter: IOIMEntityWriter | undefined;
|
|
868
|
+
declare class OIMDefaults {
|
|
869
|
+
static readonly INSTANCE: OIMDefaults;
|
|
842
870
|
readonly slotStamp: IOIMSlotStamp<TOIMSlot> | undefined;
|
|
843
871
|
readonly slotReleasePolicy: IOIMSlotReleasePolicy | undefined;
|
|
872
|
+
readonly entityWriter: IOIMEntityWriter | undefined;
|
|
873
|
+
readonly entitySlotEmptinessPolicy: IOIMSlotEmptinessPolicy<TOIMEntityContentSlot> | undefined;
|
|
844
874
|
readonly indexKeysService: IOIMIndexKeysService | undefined;
|
|
845
|
-
|
|
846
|
-
|
|
875
|
+
readonly columnSlotStoreService: IOIMSlotStoreService<string, TOIMColumnSlot> | undefined;
|
|
876
|
+
readonly computedColumnSlotStoreService: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
|
|
877
|
+
readonly storeSlotListener: IOIMStoreSlotListener | undefined;
|
|
878
|
+
constructor(options?: TOIMDefaultsOptions);
|
|
847
879
|
}
|
|
848
880
|
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
} ? Extract<TKey, NonNullable<unknown>> : never;
|
|
852
|
-
|
|
853
|
-
type TOIMSlotContentServiceSlot<TSlotContentService> = TSlotContentService extends {
|
|
854
|
-
createSlot(...args: never[]): infer TSlot;
|
|
855
|
-
} ? Extract<TSlot, TOIMKeyedSlot<TOIMSlotContentServiceKey<TSlotContentService>>> : never;
|
|
856
|
-
|
|
857
|
-
type TOIMSlotContentServiceContent<TSlotContentService> = TSlotContentService extends {
|
|
858
|
-
writeSlotContent(slot: never, content: infer TContent): boolean;
|
|
859
|
-
} ? TContent : never;
|
|
860
|
-
|
|
861
|
-
type TOIMSlotContentServicePatch<TSlotContentService> = TOIMSlotContentServiceContent<TSlotContentService> extends readonly unknown[] ? TOIMSlotContentServiceContent<TSlotContentService> : Partial<TOIMSlotContentServiceContent<TSlotContentService>>;
|
|
862
|
-
|
|
863
|
-
declare function createOIMSlotCollectionService<TSlotContentService extends object, TStore = Map<TOIMSlotContentServiceKey<TSlotContentService>, TOIMSlotContentServiceSlot<TSlotContentService>>, TColumnName extends string = string>(db: OIMDB, options: {
|
|
881
|
+
declare function createOIMSlotCollectionService<TSlotContentService extends object, TStore = Map<TOIMSlotContentServiceKey<TSlotContentService>, TOIMSlotContentServiceSlot<TSlotContentService>>, TColumnName extends string = string>(options: {
|
|
882
|
+
defaults?: OIMDefaults | undefined;
|
|
864
883
|
slotContentService: TSlotContentService & IOIMKeyedSlotCreator<TOIMSlotContentServiceKey<TSlotContentService>, TOIMSlotContentServiceSlot<TSlotContentService>> & IOIMSlotContentWriter<TOIMSlotContentServiceSlot<TSlotContentService>, TOIMSlotContentServiceContent<TSlotContentService>> & IOIMSlotContentService<TOIMSlotContentServiceSlot<TSlotContentService>>;
|
|
865
884
|
slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
|
|
866
885
|
slotSubscriptionListener?: IOIMSlotSubscriptionListener | undefined;
|
|
@@ -876,7 +895,8 @@ type TOIMSlotContentServiceSingleSlot<TSlotContentService> = TSlotContentService
|
|
|
876
895
|
createSingleSlot(...args: never[]): infer TSlot;
|
|
877
896
|
} ? Extract<TSlot, TOIMSlot> : never;
|
|
878
897
|
|
|
879
|
-
declare function createOIMSingleSlotService<TSlotContentService extends object, TColumnName extends string = string>(
|
|
898
|
+
declare function createOIMSingleSlotService<TSlotContentService extends object, TColumnName extends string = string>(options: {
|
|
899
|
+
defaults?: OIMDefaults | undefined;
|
|
880
900
|
slotContentService: TSlotContentService & IOIMSingleSlotCreator<TOIMSlotContentServiceSingleSlot<TSlotContentService>> & IOIMSlotContentWriter<TOIMSlotContentServiceSingleSlot<TSlotContentService>, TOIMSlotContentServiceContent<TSlotContentService>> & IOIMSlotContentService<TOIMSlotContentServiceSingleSlot<TSlotContentService>>;
|
|
881
901
|
slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
|
|
882
902
|
slotSubscriptionListener?: IOIMSlotSubscriptionListener | undefined;
|
|
@@ -884,7 +904,8 @@ declare function createOIMSingleSlotService<TSlotContentService extends object,
|
|
|
884
904
|
columnNames?: readonly TColumnName[] | undefined;
|
|
885
905
|
}): OIMWritableSingleSlotService<TOIMSlotContentServiceSingleSlot<TSlotContentService>, TOIMSlotContentServiceContent<TSlotContentService>, TSlotContentService & IOIMSingleSlotCreator<TOIMSlotContentServiceSingleSlot<TSlotContentService>> & IOIMSlotContentWriter<TOIMSlotContentServiceSingleSlot<TSlotContentService>, TOIMSlotContentServiceContent<TSlotContentService>> & IOIMSlotContentService<TOIMSlotContentServiceSingleSlot<TSlotContentService>>, TColumnName, TOIMColumnSlot, OIMPushColumnSlotOwner>;
|
|
886
906
|
|
|
887
|
-
declare function createOIMSlotContentEntityService<TEntity extends object, TKey extends NonNullable<unknown> = TOIMStoreKey, TColumnName extends TOIMEntityColumnName<TEntity> = TOIMEntityColumnName<TEntity>>(
|
|
907
|
+
declare function createOIMSlotContentEntityService<TEntity extends object, TKey extends NonNullable<unknown> = TOIMStoreKey, TColumnName extends TOIMEntityColumnName<TEntity> = TOIMEntityColumnName<TEntity>>(options?: {
|
|
908
|
+
defaults?: OIMDefaults | undefined;
|
|
888
909
|
entityWriter?: IOIMEntityWriter | undefined;
|
|
889
910
|
slotEmptinessPolicy?: IOIMSlotEmptinessPolicy<TOIMEntityContentSlot<TEntity>> | undefined;
|
|
890
911
|
}): OIMSlotContentEntityService<TEntity, TKey, TColumnName>;
|
|
@@ -896,13 +917,11 @@ interface IOIMBucketCommands {
|
|
|
896
917
|
recordWholeList(bucketSlot: TOIMBucketContentSlot<unknown>): void;
|
|
897
918
|
}
|
|
898
919
|
|
|
899
|
-
type TOIMBucketSlotOwnerService<TSlots, TBucketMemberSlot extends TOIMSlot = TOIMSlot, TBucketSlot extends TOIMBucketContentSlot<TSlots> = TOIMBucketContentSlot<TSlots>, TStore = unknown> = OIMSlotOwnerService<TBucketSlot, TStore, string, TOIMColumnSlot, OIMPushColumnSlotOwner, readonly TBucketMemberSlot[]>;
|
|
900
|
-
|
|
901
920
|
type TOIMSlotContentBucketServiceOptions = {
|
|
902
921
|
bucketCommands?: IOIMBucketCommands | undefined;
|
|
903
922
|
};
|
|
904
923
|
|
|
905
|
-
declare abstract class OIMSlotContentBucketService<TBucketMemberSlot extends TOIMSlot, TSlots, TKey extends NonNullable<unknown> = TOIMStoreKey> implements IOIMSlotContentService<TOIMBucketContentSlot<TSlots
|
|
924
|
+
declare abstract class OIMSlotContentBucketService<TBucketMemberSlot extends TOIMSlot, TSlots, TKey extends NonNullable<unknown> = TOIMStoreKey> implements IOIMSlotContentService<TOIMBucketContentSlot<TSlots>>, IOIMKeyedSlotCreator<TKey, TOIMBucketSlot<TSlots, TKey>>, IOIMSingleSlotCreator<TOIMBucketContentSlot<TSlots>>, IOIMSlotContentWriter<TOIMBucketContentSlot<TSlots>, readonly TBucketMemberSlot[]> {
|
|
906
925
|
protected readonly bucketCommands: IOIMBucketCommands;
|
|
907
926
|
protected constructor(options: TOIMSlotContentBucketServiceOptions);
|
|
908
927
|
protected abstract createBucketMemberSlotsStore(): TSlots;
|
|
@@ -919,7 +938,7 @@ declare abstract class OIMSlotContentBucketService<TBucketMemberSlot extends TOI
|
|
|
919
938
|
createSingleSlot(storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TOIMBucketContentSlot<TSlots>;
|
|
920
939
|
isSlotEmpty(bucketSlot: TOIMBucketContentSlot<TSlots>): boolean;
|
|
921
940
|
hasReference(): boolean;
|
|
922
|
-
releaseSlotContent(bucketSlot: TOIMBucketContentSlot<TSlots
|
|
941
|
+
releaseSlotContent(bucketSlot: TOIMBucketContentSlot<TSlots>): void;
|
|
923
942
|
markContentChanged(bucketSlot: TOIMBucketContentSlot<TSlots>): void;
|
|
924
943
|
markBucketColumnsChanged(bucketSlot: TOIMBucketContentSlot<TSlots>, patch: object | undefined, changedColumns: readonly string[] | undefined): void;
|
|
925
944
|
addBucketMemberSlot(bucketSlot: TOIMBucketContentSlot<TSlots>, bucketMemberSlot: TBucketMemberSlot): void;
|
|
@@ -1049,27 +1068,29 @@ declare class OIMSlotContentSortedArrayBucketService<TBucketMemberSlot extends T
|
|
|
1049
1068
|
repositionBucketMemberSlot(bucketSlot: TOIMBucketContentSlot<TOIMBucketSlotsArrayStore<TBucketMemberSlot>>, bucketMemberSlot: TBucketMemberSlot): void;
|
|
1050
1069
|
}
|
|
1051
1070
|
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1071
|
+
type TOIMBucketSlotOwnerService<TSlots, TBucketMemberSlot extends TOIMSlot = TOIMSlot, TBucketSlot extends TOIMBucketContentSlot<TSlots> = TOIMBucketContentSlot<TSlots>, TStore = unknown> = OIMSlotOwnerService<TBucketSlot, TStore, string, TOIMColumnSlot, OIMPushColumnSlotOwner, readonly TBucketMemberSlot[]>;
|
|
1072
|
+
|
|
1073
|
+
type TOIMDBOptions = {
|
|
1074
|
+
channelScheduler?: TOIMChannelScheduler | undefined;
|
|
1075
|
+
errorPolicy?: IOIMErrorPolicy | undefined;
|
|
1076
|
+
onBeforeFlush?: (() => void) | undefined;
|
|
1077
|
+
getNowMs?: (() => number) | undefined;
|
|
1078
|
+
releaseTimer?: TOIMTimer | undefined;
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
declare class OIMDB implements IOIMChannelMap {
|
|
1082
|
+
readonly clock: TOIMChannelClock;
|
|
1083
|
+
readonly collectorSlot: TOIMCollectorSlot;
|
|
1084
|
+
readonly defaultChannelSlot: TOIMChannelSlot;
|
|
1085
|
+
constructor(options?: TOIMDBOptions);
|
|
1086
|
+
flush(): void;
|
|
1062
1087
|
}
|
|
1063
1088
|
|
|
1064
1089
|
declare class OIMDefaultValue<TValue> {
|
|
1065
|
-
private readonly name;
|
|
1066
1090
|
private readonly createValue;
|
|
1067
1091
|
private defaultValue;
|
|
1068
|
-
|
|
1069
|
-
constructor(name: string, createValue: () => TValue);
|
|
1092
|
+
constructor(createValue: () => TValue);
|
|
1070
1093
|
getValue(): TValue;
|
|
1071
|
-
setValue(value: TValue): void;
|
|
1072
|
-
private assertNoLateOverride;
|
|
1073
1094
|
}
|
|
1074
1095
|
|
|
1075
1096
|
declare class OIMFlushSchedulerService {
|
|
@@ -1079,7 +1100,7 @@ declare class OIMFlushSchedulerService {
|
|
|
1079
1100
|
cancelSchedule(flushSchedulerSlot: TOIMFlushSchedulerSlot): void;
|
|
1080
1101
|
}
|
|
1081
1102
|
|
|
1082
|
-
type TOIMComputedStoreSlot<TStore = unknown, TValue = unknown, TComputedSlot extends TOIMComputedContentSlot<TValue> = TOIMComputedContentSlot<TValue>> = TOIMStoreSlot<TStore, TComputedSlot> & {
|
|
1103
|
+
type TOIMComputedStoreSlot<TStore = unknown, TValue = unknown, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined> = TOIMComputedContentSlot<TValue>> = TOIMStoreSlot<TStore, TComputedSlot> & {
|
|
1083
1104
|
readonly derive: ((computedSlot: TComputedSlot) => TValue) | undefined;
|
|
1084
1105
|
readonly createSources: ((computedSlot: TComputedSlot) => Partial<TOIMComputedSources>) | undefined;
|
|
1085
1106
|
};
|
|
@@ -1091,6 +1112,7 @@ type TOIMComputedDerivationOptions<TValue, TComputedSlot extends TOIMComputedCon
|
|
|
1091
1112
|
createSources?: ((computedSlot: TComputedSlot) => Partial<TOIMComputedSources>) | undefined;
|
|
1092
1113
|
derive?: ((computedSlot: TComputedSlot) => TValue) | undefined;
|
|
1093
1114
|
sameValueGuard?: TOIMSameValueGuard<TValue> | undefined;
|
|
1115
|
+
releaseValue?: TOIMComputedValueReleaser<TValue> | undefined;
|
|
1094
1116
|
initialValue?: TValue | undefined;
|
|
1095
1117
|
};
|
|
1096
1118
|
|
|
@@ -1106,14 +1128,19 @@ declare class OIMComputedService<TKey extends NonNullable<unknown>, TValue, TCom
|
|
|
1106
1128
|
createComputedStoreSlot(channelMap: IOIMChannelMap, derive?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => TValue) | undefined, createSources?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => Partial<TOIMComputedSources>) | undefined): TOIMComputedStoreSlot<TComputedStore, TValue, TOIMComputedSlot<TValue, TKey>>;
|
|
1107
1129
|
}
|
|
1108
1130
|
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
derive?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => TValue) | undefined;
|
|
1131
|
+
type TOIMComputedServiceFactoryOptions<TValue> = {
|
|
1132
|
+
defaults?: OIMDefaults | undefined;
|
|
1112
1133
|
sameValueGuard?: TOIMSameValueGuard<TValue> | undefined;
|
|
1134
|
+
releaseValue?: TOIMComputedValueReleaser<TValue> | undefined;
|
|
1113
1135
|
initialValue?: TValue | undefined;
|
|
1114
1136
|
slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
|
|
1115
1137
|
columnSlotStoreService?: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
|
|
1116
1138
|
columnNames?: readonly Extract<keyof TValue, string>[] | undefined;
|
|
1139
|
+
};
|
|
1140
|
+
|
|
1141
|
+
declare function createOIMComputedService<TKey extends NonNullable<unknown>, TValue, TComputedStore = Map<TKey, TOIMComputedSlot<TValue, TKey>>>(options: TOIMComputedServiceFactoryOptions<TValue> & {
|
|
1142
|
+
createSources?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => Partial<TOIMComputedSources>) | undefined;
|
|
1143
|
+
derive?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => TValue) | undefined;
|
|
1117
1144
|
computedSlotStoreService?: IOIMSlotStoreService<TKey, TOIMComputedSlot<TValue, TKey>, TComputedStore> | undefined;
|
|
1118
1145
|
}): OIMComputedService<TKey, TValue, TComputedStore>;
|
|
1119
1146
|
|
|
@@ -1125,29 +1152,68 @@ declare class OIMSingleComputedService<TValue> {
|
|
|
1125
1152
|
createComputedStoreSlot(channelMap: IOIMChannelMap, derive?: ((computedSlot: TOIMComputedContentSlot<TValue>) => TValue) | undefined, createSources?: ((computedSlot: TOIMComputedContentSlot<TValue>) => Partial<TOIMComputedSources>) | undefined): TOIMComputedStoreSlot<TOIMSingleSlotStore<TOIMComputedContentSlot<TValue>>, TValue>;
|
|
1126
1153
|
}
|
|
1127
1154
|
|
|
1128
|
-
declare function createOIMSingleComputedService<TValue>(options?: {
|
|
1155
|
+
declare function createOIMSingleComputedService<TValue>(options?: TOIMComputedServiceFactoryOptions<TValue> & {
|
|
1129
1156
|
createSources?: ((computedSlot: TOIMComputedContentSlot<TValue>) => Partial<TOIMComputedSources>) | undefined;
|
|
1130
1157
|
derive?: ((computedSlot: TOIMComputedContentSlot<TValue>) => TValue) | undefined;
|
|
1158
|
+
}): OIMSingleComputedService<TValue>;
|
|
1159
|
+
|
|
1160
|
+
type TOIMSourceTrackingComputedSlot<TValue = unknown, TKey extends NonNullable<unknown> = NonNullable<unknown>> = TOIMComputedSlot<TValue, TKey, OIMSourceTracker>;
|
|
1161
|
+
|
|
1162
|
+
type TOIMSourceTrackingComputedDerive<TValue, TComputedSlot> = (computedSlot: TComputedSlot, sourceTracker: OIMSourceTracker) => TValue;
|
|
1163
|
+
|
|
1164
|
+
type TOIMSourceTrackingComputedDerivationOptions<TValue, TComputedSlot> = {
|
|
1165
|
+
columnSlotOwnerOptions: TOIMColumnSlotOwnerOptions<TOIMComputedColumnSlot, Extract<keyof TValue, string>>;
|
|
1166
|
+
slotReleasePolicy: IOIMSlotReleasePolicy;
|
|
1167
|
+
storeSlotListener: IOIMStoreSlotListener;
|
|
1168
|
+
derive: TOIMSourceTrackingComputedDerive<TValue, TComputedSlot>;
|
|
1131
1169
|
sameValueGuard?: TOIMSameValueGuard<TValue> | undefined;
|
|
1170
|
+
releaseValue?: TOIMComputedValueReleaser<TValue> | undefined;
|
|
1132
1171
|
initialValue?: TValue | undefined;
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1172
|
+
};
|
|
1173
|
+
|
|
1174
|
+
type TOIMSourceTrackingComputedContentSlot<TValue = unknown> = TOIMComputedContentSlot<TValue, OIMSourceTracker>;
|
|
1175
|
+
|
|
1176
|
+
declare class OIMSlotContentSourceTrackingComputedService<TValue, TComputedSlot extends TOIMSourceTrackingComputedContentSlot<TValue> = TOIMSourceTrackingComputedContentSlot<TValue>> extends OIMSlotContentComputedService<TValue, TComputedSlot> {
|
|
1177
|
+
protected createSourceTracker(): OIMSourceTracker;
|
|
1178
|
+
protected attachSources(): void;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
declare class OIMSourceTrackingComputedService<TKey extends NonNullable<unknown>, TValue, TComputedStore> {
|
|
1182
|
+
readonly computedCollectionService: OIMSlotCollectionService<TKey, TOIMSourceTrackingComputedSlot<TValue, TKey>, TComputedStore, OIMSlotContentSourceTrackingComputedService<TValue, TOIMSourceTrackingComputedSlot<TValue, TKey>>, Extract<keyof TValue, string>, TOIMComputedColumnSlot, OIMPullColumnSlotOwner>;
|
|
1183
|
+
constructor(options: TOIMSourceTrackingComputedDerivationOptions<TValue, TOIMSourceTrackingComputedSlot<TValue, TKey>> & {
|
|
1184
|
+
computedSlotStoreService: IOIMSlotStoreService<TKey, TOIMSourceTrackingComputedSlot<TValue, TKey>, TComputedStore>;
|
|
1185
|
+
});
|
|
1186
|
+
createComputedStoreSlot(channelMap: IOIMChannelMap): TOIMStoreSlot<TComputedStore, TOIMSourceTrackingComputedSlot<TValue, TKey>>;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
declare class OIMSingleSourceTrackingComputedService<TValue> {
|
|
1190
|
+
readonly computedSingleSlotService: OIMSingleSlotService<TOIMSourceTrackingComputedContentSlot<TValue>, OIMSlotContentSourceTrackingComputedService<TValue>, Extract<keyof TValue, string>, TOIMComputedColumnSlot, OIMPullColumnSlotOwner>;
|
|
1191
|
+
constructor(options: TOIMSourceTrackingComputedDerivationOptions<TValue, TOIMSourceTrackingComputedContentSlot<TValue>>);
|
|
1192
|
+
createComputedStoreSlot(channelMap: IOIMChannelMap): TOIMStoreSlot<TOIMSingleSlotStore<TOIMSourceTrackingComputedContentSlot<TValue>>, TOIMSourceTrackingComputedContentSlot<TValue>>;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
declare function createOIMSourceTrackingComputedService<TKey extends NonNullable<unknown>, TValue, TComputedStore = Map<TKey, TOIMSourceTrackingComputedSlot<TValue, TKey>>>(options: TOIMComputedServiceFactoryOptions<TValue> & {
|
|
1196
|
+
derive: TOIMSourceTrackingComputedDerive<TValue, TOIMSourceTrackingComputedSlot<TValue, TKey>>;
|
|
1197
|
+
computedSlotStoreService?: IOIMSlotStoreService<TKey, TOIMSourceTrackingComputedSlot<TValue, TKey>, TComputedStore> | undefined;
|
|
1198
|
+
}): OIMSourceTrackingComputedService<TKey, TValue, TComputedStore>;
|
|
1199
|
+
|
|
1200
|
+
declare function createOIMSingleSourceTrackingComputedService<TValue>(options: TOIMComputedServiceFactoryOptions<TValue> & {
|
|
1201
|
+
derive: TOIMSourceTrackingComputedDerive<TValue, TOIMSourceTrackingComputedContentSlot<TValue>>;
|
|
1202
|
+
}): OIMSingleSourceTrackingComputedService<TValue>;
|
|
1137
1203
|
|
|
1138
1204
|
type TOIMSortedComputedSlot<TEntity extends object, TKey extends NonNullable<unknown>> = TOIMComputedSlot<readonly TOIMEntitySlot<TEntity>[], TKey>;
|
|
1139
1205
|
|
|
1140
1206
|
type TOIMIndexStoreSlot<TStore = unknown, TBucketSlot extends TOIMSlot = TOIMSlot, TBucketPatch = unknown, TSourceSlot extends TOIMSlot = TOIMSlot, TSourcePatch = unknown, TKey = unknown, TSourceStore = unknown, TSlotService = unknown> = TOIMStoreSlot<TStore, TBucketSlot, TBucketPatch, TSlotService> & {
|
|
1141
1207
|
readonly sourceStoreSlot: TOIMStoreSlot<TSourceStore, TSourceSlot, TSourcePatch>;
|
|
1142
1208
|
readonly indexKeysPosition: number;
|
|
1143
|
-
readonly contentChangeListener:
|
|
1209
|
+
readonly contentChangeListener: IOIMSlotContentChangeListener<TSourceSlot, TSourcePatch>;
|
|
1144
1210
|
readonly requestedKeys: readonly TKey[] | undefined;
|
|
1145
1211
|
readonly bucketColumnNames: Set<string>;
|
|
1146
1212
|
readonly isAnyBucketColumnRead: boolean;
|
|
1147
1213
|
readonly isDisposed: boolean;
|
|
1148
1214
|
};
|
|
1149
1215
|
|
|
1150
|
-
type TOIMSlotCollectionIndexServiceOptions<TKey extends NonNullable<unknown>, TEntity extends object, TBucketSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TSourceKey extends NonNullable<unknown>, TSourceStore> = TOIMSlotCollectionServiceOptions<TKey, TBucketSlot, TStore, TSlotContentService, string, TOIMColumnSlot, OIMPushColumnSlotOwner
|
|
1216
|
+
type TOIMSlotCollectionIndexServiceOptions<TKey extends NonNullable<unknown>, TEntity extends object, TBucketSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TSourceKey extends NonNullable<unknown>, TSourceStore> = TOIMSlotCollectionServiceOptions<TKey, TBucketSlot, TStore, TSlotContentService, string, TOIMColumnSlot, OIMPushColumnSlotOwner> & {
|
|
1151
1217
|
keyOf: (entity: TEntity) => TKey;
|
|
1152
1218
|
columns?: readonly string[] | undefined;
|
|
1153
1219
|
sourceSlotCollectionService: Pick<OIMSlotCollectionService<TSourceKey, TOIMEntitySlot<TEntity, TSourceKey>, TSourceStore, unknown>, 'getSlots'>;
|
|
@@ -1187,7 +1253,7 @@ declare class OIMSlotCollectionIndexService<TKey extends NonNullable<unknown>, T
|
|
|
1187
1253
|
private groupUnderMintedBucketKey;
|
|
1188
1254
|
private decideIndexKeyForSlot;
|
|
1189
1255
|
private collectSourceSlotsForKey;
|
|
1190
|
-
private
|
|
1256
|
+
private fillBucketSlotWithSourceSlots;
|
|
1191
1257
|
}
|
|
1192
1258
|
|
|
1193
1259
|
type TOIMSlotCollectionIndexServiceStoreSlot<TKey extends NonNullable<unknown>, TEntity extends object, TSlots, TSourceKey extends NonNullable<unknown>, TSourceStore> = Parameters<OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore>['getBucketColumnByKey']>[0];
|
|
@@ -1197,7 +1263,7 @@ type TOIMSortableColumnName<TEntity extends object> = {
|
|
|
1197
1263
|
}[keyof TEntity] & string;
|
|
1198
1264
|
|
|
1199
1265
|
type TOIMSortColumn<TEntity extends object> = {
|
|
1200
|
-
|
|
1266
|
+
columnName: TOIMSortableColumnName<TEntity>;
|
|
1201
1267
|
direction: 'asc' | 'desc';
|
|
1202
1268
|
};
|
|
1203
1269
|
|
|
@@ -1220,6 +1286,7 @@ declare class OIMSortedComputedService<TKey extends NonNullable<unknown>, TEntit
|
|
|
1220
1286
|
type TOIMDefaultSlotStore<TKey, TSlot> = Map<TKey, TSlot>;
|
|
1221
1287
|
|
|
1222
1288
|
declare function createOIMSortedComputedService<TKey extends NonNullable<unknown>, TEntity extends object, TSlots, TSourceKey extends NonNullable<unknown>, TSourceStore, TComputedStore = TOIMDefaultSlotStore<TKey, TOIMComputedSlot<readonly TOIMEntitySlot<TEntity>[], TKey>>>(options: {
|
|
1289
|
+
defaults?: OIMDefaults | undefined;
|
|
1223
1290
|
indexService: OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore>;
|
|
1224
1291
|
sortColumns?: readonly TOIMSortColumn<TEntity>[] | undefined;
|
|
1225
1292
|
comparator?: ((left: TEntity, right: TEntity) => number) | undefined;
|
|
@@ -1245,6 +1312,7 @@ declare class OIMBucketMemoComputedService<TKey extends NonNullable<unknown>, TB
|
|
|
1245
1312
|
}
|
|
1246
1313
|
|
|
1247
1314
|
declare function createOIMBucketMemoComputedService<TKey extends NonNullable<unknown>, TBucketMemberSlot extends TOIMSlot, TSlots, TBucketStore, TComputedStore = TOIMDefaultSlotStore<TKey, TOIMComputedSlot<readonly TBucketMemberSlot[], TKey>>>(options: {
|
|
1315
|
+
defaults?: OIMDefaults | undefined;
|
|
1248
1316
|
bucketCollectionService: OIMSlotCollectionService<TKey, TOIMBucketSlot<TSlots, TKey>, TBucketStore, OIMSlotContentBucketService<TBucketMemberSlot, TSlots>, string, TOIMColumnSlot, OIMPushColumnSlotOwner, readonly TBucketMemberSlot[]>;
|
|
1249
1317
|
slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
|
|
1250
1318
|
columnSlotStoreService?: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
|
|
@@ -1277,6 +1345,7 @@ declare class OIMSlotCollectionSortedArrayIndexService<TKey extends NonNullable<
|
|
|
1277
1345
|
|
|
1278
1346
|
type TOIMSlotCollectionIndexServiceFactoryOptions<TEntity extends object, TSourceKey extends NonNullable<unknown>, TSourceStore> = {
|
|
1279
1347
|
entityService: Pick<OIMSlotCollectionService<TSourceKey, TOIMEntitySlot<TEntity, TSourceKey>, TSourceStore, unknown>, 'getSlots'>;
|
|
1348
|
+
defaults?: OIMDefaults | undefined;
|
|
1280
1349
|
slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
|
|
1281
1350
|
slotSubscriptionListener?: IOIMSlotSubscriptionListener | undefined;
|
|
1282
1351
|
columnSlotStoreService?: IOIMSlotStoreService<string, TOIMColumnSlot> | undefined;
|
|
@@ -1295,16 +1364,16 @@ type TOIMIndexKeyOptions<TKey, TEntity extends object, TColumns extends readonly
|
|
|
1295
1364
|
columns: [TKey] extends [never] ? never : [TKey] extends [TOIMIndexKey<TEntity, TColumns>] ? TColumns : never;
|
|
1296
1365
|
};
|
|
1297
1366
|
|
|
1298
|
-
declare function createOIMSlotCollectionIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey = [TOIMIndexKey<TEntity, TColumns>] extends [TOIMStoreKey] ? Extract<TOIMIndexKey<TEntity, TColumns>, TOIMStoreKey> : never, TSourceStore = unknown, TSlots = TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentPositionalArrayBucketService<TOIMEntitySlot<TEntity>, TKey> & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>>(
|
|
1367
|
+
declare function createOIMSlotCollectionIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey = [TOIMIndexKey<TEntity, TColumns>] extends [TOIMStoreKey] ? Extract<TOIMIndexKey<TEntity, TColumns>, TOIMStoreKey> : never, TSourceStore = unknown, TSlots = TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentPositionalArrayBucketService<TOIMEntitySlot<TEntity>, TKey> & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>>(options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
|
|
1299
1368
|
slotContentService?: (TSlotContentService & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>) | undefined;
|
|
1300
1369
|
bucketSlotStoreService?: undefined;
|
|
1301
1370
|
} & TOIMIndexKeyOptions<TKey, TEntity, TColumns>): OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore, TSlotContentService, TOIMBucketSlot<TSlots, TKey>, Map<TKey, TOIMBucketSlot<TSlots, TKey>>>;
|
|
1302
|
-
declare function createOIMSlotCollectionIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey | readonly TOIMStoreKey[] = TOIMStoreKey, TSourceStore = unknown, TSlots = TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentPositionalArrayBucketService<TOIMEntitySlot<TEntity>, TKey> & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>, TStore = Map<TKey, TOIMBucketSlot<TSlots, TKey>>>(
|
|
1371
|
+
declare function createOIMSlotCollectionIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey | readonly TOIMStoreKey[] = TOIMStoreKey, TSourceStore = unknown, TSlots = TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentPositionalArrayBucketService<TOIMEntitySlot<TEntity>, TKey> & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>, TStore = Map<TKey, TOIMBucketSlot<TSlots, TKey>>>(options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
|
|
1303
1372
|
slotContentService?: (TSlotContentService & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>) | undefined;
|
|
1304
1373
|
bucketSlotStoreService: IOIMSlotStoreService<TKey, TOIMBucketSlot<TSlots, TKey>, TStore>;
|
|
1305
1374
|
} & TOIMIndexKeyOptions<TKey, TEntity, TColumns>): OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore, TSlotContentService, TOIMBucketSlot<TSlots, TKey>, TStore>;
|
|
1306
1375
|
|
|
1307
|
-
declare function createOIMSlotCollectionSortedArrayIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey = [TOIMIndexKey<TEntity, TColumns>] extends [TOIMStoreKey] ? Extract<TOIMIndexKey<TEntity, TColumns>, TOIMStoreKey> : never, TSourceStore = unknown, TStore = Map<TKey, TOIMBucketSlot<TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TKey>>>(
|
|
1376
|
+
declare function createOIMSlotCollectionSortedArrayIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey = [TOIMIndexKey<TEntity, TColumns>] extends [TOIMStoreKey] ? Extract<TOIMIndexKey<TEntity, TColumns>, TOIMStoreKey> : never, TSourceStore = unknown, TStore = Map<TKey, TOIMBucketSlot<TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TKey>>>(options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
|
|
1308
1377
|
sortColumns: readonly TOIMSortColumn<TEntity>[];
|
|
1309
1378
|
bucketSlotStoreService?: IOIMSlotStoreService<TKey, TOIMBucketSlot<TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TKey>, TStore> | undefined;
|
|
1310
1379
|
} & TOIMIndexKeyOptions<TKey, TEntity, TColumns>): OIMSlotCollectionSortedArrayIndexService<TKey, TEntity, TSourceKey, TSourceStore, TOIMBucketSlot<TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TKey>, TStore>;
|
|
@@ -1350,9 +1419,9 @@ type TOIMEntityWriterOptions = {
|
|
|
1350
1419
|
patchEntityColumn?: typeof oimPatchEntityColumn | undefined;
|
|
1351
1420
|
};
|
|
1352
1421
|
|
|
1353
|
-
declare function
|
|
1422
|
+
declare function createOIMInPlaceEntityWriter(options?: TOIMEntityWriterOptions): IOIMEntityWriter;
|
|
1354
1423
|
|
|
1355
|
-
declare function
|
|
1424
|
+
declare function createOIMReplacingEntityWriter(options?: TOIMEntityWriterOptions): IOIMEntityWriter;
|
|
1356
1425
|
|
|
1357
1426
|
declare function oimInsertEntityWithoutCopy<TEntity extends object>(slot: TOIMEntityContentSlot<TEntity>, entity: TEntity): void;
|
|
1358
1427
|
|
|
@@ -1360,11 +1429,11 @@ declare function oimInsertEntityWithCopy<TEntity extends object>(slot: TOIMEntit
|
|
|
1360
1429
|
|
|
1361
1430
|
declare function oimInsertEntityWithSanitizedCopy<TEntity extends object>(slot: TOIMEntityContentSlot<TEntity>, entity: TEntity): void;
|
|
1362
1431
|
|
|
1363
|
-
declare const
|
|
1432
|
+
declare const oimGuardedPatchEntityColumns: typeof oimPatchEntityColumns;
|
|
1364
1433
|
|
|
1365
|
-
declare const
|
|
1434
|
+
declare const oimGuardedPatchEntityColumn: typeof oimPatchEntityColumn;
|
|
1366
1435
|
|
|
1367
|
-
declare const
|
|
1436
|
+
declare const oimGuardedPutEntityColumns: typeof oimPutEntityColumns;
|
|
1368
1437
|
|
|
1369
1438
|
declare function oimMintAfterWriteSlotReleaseWheel(collectorSlot: TOIMCollectorSlot): OIMSlotReleaseWheel;
|
|
1370
1439
|
|
|
@@ -1540,7 +1609,7 @@ interface IOIMKeyTreeWalk<TCompositeKeyPart> {
|
|
|
1540
1609
|
}
|
|
1541
1610
|
|
|
1542
1611
|
type TOIMSlotStoreTree<TSlot, TCompositeKeyPart> = {
|
|
1543
|
-
readonly
|
|
1612
|
+
readonly rootCompositeKeyNode: TOIMCompositeKeyNode<TSlot, TCompositeKeyPart>;
|
|
1544
1613
|
readonly slots: Set<TSlot>;
|
|
1545
1614
|
};
|
|
1546
1615
|
|
|
@@ -1589,4 +1658,4 @@ declare const OIM_REMOVED_WITHOUT_A_POSITION = -2;
|
|
|
1589
1658
|
|
|
1590
1659
|
declare function oimOrderedListCommandsOfTransition(prev: readonly TOIMSlot[], next: readonly TOIMSlot[], maxCommandsPerSlot?: number): TOIMOrderedListCommand[];
|
|
1591
1660
|
|
|
1592
|
-
export { type IOIMBucketCommands, type IOIMBucketMemberSlotsArrayService, type IOIMChannelMap, type IOIMComputedValueService, type
|
|
1661
|
+
export { type IOIMBucketCommands, type IOIMBucketMemberSlotsArrayService, type IOIMChannelMap, type IOIMComputedValueService, type IOIMEffectService, type IOIMEntityWriter, type IOIMErrorPolicy, type IOIMFlushSchedulerListener, type IOIMIndexKeysService, type IOIMKeyTreeWalk, type IOIMKeyedSlotCreator, type IOIMSingleSlotCreator, type IOIMSlotContentChangeListener, type IOIMSlotContentService, type IOIMSlotContentWriter, type IOIMSlotEmptinessPolicy, type IOIMSlotFilingService, type IOIMSlotOwner, type IOIMSlotRefetchListener, type IOIMSlotReleaseDueFramePolicy, type IOIMSlotReleasePolicy, type IOIMSlotStamp, type IOIMSlotStoreService, type IOIMSlotSubscriptionListener, type IOIMStoreSlotListener, OIMAppendingIndexKeysService, OIMBucketCommands, OIMBucketMemberSlotsArrayService, OIMBucketMemoComputedService, OIMBucketUniqueMemberSlotsArrayService, type OIMChannelQueue, OIMChannelService, OIMColumnSlotOwner, OIMColumnSlotService, OIMCompositeKeyTreeWalk, OIMComputedService, OIMComputedValueService, OIMDB, OIMDefaultValue, OIMDefaults, OIMEffectService, OIMFlushSchedulerService, OIMIndexKeysService, OIMKeyTreeWalk, OIMLogAndContinueErrorPolicy, OIMNoSlotSubscriptionListener, OIMNoStoreSlotListener, OIMPullColumnSlotOwner, type OIMPushColumnSlotOwner, OIMReclaimingIndexKeysService, OIMScalarKeyTreeWalk, OIMSingleComputedService, OIMSingleSlotService, OIMSingleSlotStoreService, OIMSingleSourceTrackingComputedService, OIMSlotAfterIdleReleasePolicy, OIMSlotAfterUnholdReleasePolicy, OIMSlotAfterWriteReleasePolicy, OIMSlotAtEmptyReleasePolicy, OIMSlotAtUnholdReleasePolicy, OIMSlotCollectionIndexService, OIMSlotCollectionService, OIMSlotCollectionSortedArrayIndexService, OIMSlotContentArrayBucketService, OIMSlotContentBucketService, OIMSlotContentChangeListenerService, type OIMSlotContentComputedService, OIMSlotContentEntityService, OIMSlotContentPositionalArrayBucketService, OIMSlotContentSetBucketService, OIMSlotContentSortedArrayBucketService, type OIMSlotContentSourceTrackingComputedService, OIMSlotEarliestReleasePolicy, OIMSlotMapStoreService, OIMSlotNeverReleasePolicy, OIMSlotOwner, type OIMSlotOwnerService, OIMSlotRefetchWheel, OIMSlotReleaseAutoDueFramePolicy, OIMSlotReleaseManualDueFramePolicy, OIMSlotReleaseWheel, OIMSlotTreeStoreService, OIMSlotWheel, OIMSortedComputedService, type OIMSourceTracker, OIMSourceTrackingComputedService, OIMThrowAtOnceErrorPolicy, OIMUnusedSlotCollectorService, OIMWritableSingleSlotService, OIMWritableSlotCollectionService, OIM_FROZEN_EMPTY_SLOTS, OIM_NOTHING_WAS_INSERTED, OIM_NOTHING_WAS_REMOVED, OIM_REMOVED_WITHOUT_A_POSITION, OIM_SLICE_LENGTH_MS, type TOIMBucketCommandsOptions, type TOIMBucketContentSlot, type TOIMBucketMemoComputedServiceOptions, type TOIMBucketMemoComputedSlot, type TOIMBucketSlot, type TOIMBucketSlotOwnerService, type TOIMBucketSlotsArrayStore, type TOIMBucketSlotsSetStore, type TOIMChannelClock, type TOIMChannelFrame, type TOIMChannelScheduler, type TOIMChannelSlot, type TOIMChannelSlotOptions, type TOIMCollectorSlot, type TOIMCollectorSlotOptions, type TOIMColumnGroup, type TOIMColumnReaders, type TOIMColumnSlot, type TOIMColumnSlotOwnerOptions, type TOIMCompositeKeyNode, type TOIMComputedColumnSlot, type TOIMComputedContentSlot, type TOIMComputedDerivation, type TOIMComputedDerivationOptions, type TOIMComputedServiceFactoryOptions, type TOIMComputedServiceOptions, type TOIMComputedSlot, type TOIMComputedSources, type TOIMComputedStoreSlot, type TOIMComputedValueReleaser, type TOIMComputedValueServiceOptions, type TOIMDBOptions, type TOIMDefaultSlotStore, type TOIMDefaultsOptions, type TOIMDisposer, type TOIMEditable, type TOIMEffect, type TOIMEffectBody, type TOIMEntityColumnName, type TOIMEntityColumnValue, type TOIMEntityContentSlot, type TOIMEntityInserter, type TOIMEntitySlot, type TOIMEntitySlotOwnerService, type TOIMEntityWriterOptions, type TOIMFactoryOptions, type TOIMFlushSchedulerSlot, type TOIMIndexKey, type TOIMIndexKeyOptions, type TOIMIndexKeysPositions, type TOIMIndexStoreSlot, type TOIMIndexableSlot, type TOIMKeyedSlot, type TOIMLogAndContinueErrorPolicyOptions, type TOIMOrderedListCommand, type TOIMSameValueGuard, type TOIMSingleSlotServiceOptions, type TOIMSingleSlotStore, type TOIMSingleSlotStoreSlot, type TOIMSlot, type TOIMSlotAfterIdleReleasePolicyOptions, type TOIMSlotAfterUnholdReleasePolicyOptions, type TOIMSlotAfterWriteReleasePolicyOptions, type TOIMSlotCollectionIndexServiceFactoryOptions, type TOIMSlotCollectionIndexServiceOptions, type TOIMSlotCollectionIndexServiceStoreSlot, type TOIMSlotCollectionServiceOptions, type TOIMSlotContentArrayBucketServiceOptions, type TOIMSlotContentBucketServiceOptions, type TOIMSlotContentComputedServiceOptions, type TOIMSlotContentEntityServiceOptions, type TOIMSlotContentServiceContent, type TOIMSlotContentServiceKey, type TOIMSlotContentServicePatch, type TOIMSlotContentServiceSingleSlot, type TOIMSlotContentServiceSlot, type TOIMSlotContentSortedArrayBucketServiceOptions, type TOIMSlotOwnerServiceOptions, type TOIMSlotRefetchWheelOptions, type TOIMSlotReleaseWheelOptions, type TOIMSlotStoreTree, type TOIMSlotWheelOptions, type TOIMSortColumn, type TOIMSortableColumnName, type TOIMSortedComputedServiceOptions, type TOIMSortedComputedSlot, type TOIMSourceTrackingComputedContentSlot, type TOIMSourceTrackingComputedDerivationOptions, type TOIMSourceTrackingComputedDerive, type TOIMSourceTrackingComputedSlot, type TOIMSourceTrackingEffectBody, type TOIMStoreKey, type TOIMStoreSlot, type TOIMTimer, type TOIMUnusedSlotCollectorSlot, createOIMBucketMemoComputedService, createOIMChannelSlot, createOIMCollectorSlot, createOIMComputedService, createOIMInPlaceEntityWriter, createOIMReplacingEntityWriter, createOIMSingleComputedService, createOIMSingleSlotService, createOIMSingleSourceTrackingComputedService, createOIMSlotCollectionIndexService, createOIMSlotCollectionService, createOIMSlotCollectionSortedArrayIndexService, createOIMSlotContentEntityService, createOIMSortedComputedService, createOIMSourceTrackingComputedService, createOIMUnusedSlotCollectorSlot, oimColumnsComparator, oimGuardedPatchEntityColumn, oimGuardedPatchEntityColumns, oimGuardedPutEntityColumns, oimHoldSlots, oimInsertEntityWithCopy, oimInsertEntityWithSanitizedCopy, oimInsertEntityWithoutCopy, oimIsAnySlotChangedAfter, oimIsSlotEmpty, oimIsSlotReleased, oimMintAfterIdleSlotReleaseWheel, oimMintAfterUnholdSlotReleaseWheel, oimMintAfterWriteSlotReleaseWheel, oimOrderedListCommandsOfTransition, oimPatchEntityColumn, oimPatchEntityColumns, oimPutEntityColumns, oimRefreshSourceComputeds, oimSameKeySequence, oimSameSlotSequence, oimSameValueZeroGuard, oimSliceOfMs, oimUnholdSlotsIfAlive };
|