@oimdb/core 1.0.4 → 1.0.6

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/index.cjs CHANGED
@@ -566,6 +566,9 @@ var OIMCollectionStoreMapDriven = class extends OIMCollectionStore {
566
566
  clear() {
567
567
  this.entities.clear();
568
568
  }
569
+ getAllPks() {
570
+ return Array.from(this.entities.keys());
571
+ }
569
572
  };
570
573
 
571
574
  // src/core/OIMEntityUpdaterFactory.ts
@@ -627,6 +630,9 @@ var OIMCollection = class {
627
630
  getAll() {
628
631
  return this.store.getAll();
629
632
  }
633
+ getAllPks() {
634
+ return this.store.getAllPks();
635
+ }
630
636
  upsertOneWithoutNotifications(entity) {
631
637
  const pk = this.selectPk(entity);
632
638
  const existingEntity = this.store.getOneByPk(pk);
@@ -707,6 +713,18 @@ var OIMReactiveCollection = class {
707
713
  getManyByPks(pks) {
708
714
  return this.collection.getManyByPks(pks);
709
715
  }
716
+ clear() {
717
+ this.collection.clear();
718
+ }
719
+ countAll() {
720
+ return this.collection.countAll();
721
+ }
722
+ getAll() {
723
+ return this.collection.getAll();
724
+ }
725
+ getAllPks() {
726
+ return this.collection.getAllPks();
727
+ }
710
728
  };
711
729
 
712
730
  // src/core/OIMIndexManual.ts
package/dist/index.d.cts CHANGED
@@ -7,6 +7,7 @@ declare abstract class OIMCollectionStore<TEntity extends object, TPk extends TO
7
7
  abstract getOneByPk(pk: TPk): TEntity | undefined;
8
8
  abstract getManyByPks(pks: readonly TPk[]): TEntity[];
9
9
  abstract getAll(): TEntity[];
10
+ abstract getAllPks(): TPk[];
10
11
  abstract countAll(): number;
11
12
  abstract clear(): void;
12
13
  }
@@ -329,6 +330,7 @@ declare class OIMCollection<TEntity extends object, TPk extends TOIMPk> {
329
330
  clear(): void;
330
331
  countAll(): number;
331
332
  getAll(): TEntity[];
333
+ getAllPks(): TPk[];
332
334
  protected upsertOneWithoutNotifications(entity: TEntity): TPk;
333
335
  }
334
336
 
@@ -365,6 +367,10 @@ declare class OIMReactiveCollection<TEntity extends object, TPk extends TOIMPk>
365
367
  removeOne(entity: TEntity): void;
366
368
  getOneByPk(pk: TPk): TEntity | undefined;
367
369
  getManyByPks(pks: readonly TPk[]): TEntity[];
370
+ clear(): void;
371
+ countAll(): number;
372
+ getAll(): TEntity[];
373
+ getAllPks(): TPk[];
368
374
  }
369
375
 
370
376
  /**
@@ -422,6 +428,7 @@ declare class OIMCollectionStoreMapDriven<TEntity extends object, TPk extends TO
422
428
  getAll(): TEntity[];
423
429
  countAll(): number;
424
430
  clear(): void;
431
+ getAllPks(): TPk[];
425
432
  }
426
433
 
427
434
  type TOIMComparator<TEntity extends object> = (a: TEntity, b: TEntity) => boolean;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ declare abstract class OIMCollectionStore<TEntity extends object, TPk extends TO
7
7
  abstract getOneByPk(pk: TPk): TEntity | undefined;
8
8
  abstract getManyByPks(pks: readonly TPk[]): TEntity[];
9
9
  abstract getAll(): TEntity[];
10
+ abstract getAllPks(): TPk[];
10
11
  abstract countAll(): number;
11
12
  abstract clear(): void;
12
13
  }
@@ -329,6 +330,7 @@ declare class OIMCollection<TEntity extends object, TPk extends TOIMPk> {
329
330
  clear(): void;
330
331
  countAll(): number;
331
332
  getAll(): TEntity[];
333
+ getAllPks(): TPk[];
332
334
  protected upsertOneWithoutNotifications(entity: TEntity): TPk;
333
335
  }
334
336
 
@@ -365,6 +367,10 @@ declare class OIMReactiveCollection<TEntity extends object, TPk extends TOIMPk>
365
367
  removeOne(entity: TEntity): void;
366
368
  getOneByPk(pk: TPk): TEntity | undefined;
367
369
  getManyByPks(pks: readonly TPk[]): TEntity[];
370
+ clear(): void;
371
+ countAll(): number;
372
+ getAll(): TEntity[];
373
+ getAllPks(): TPk[];
368
374
  }
369
375
 
370
376
  /**
@@ -422,6 +428,7 @@ declare class OIMCollectionStoreMapDriven<TEntity extends object, TPk extends TO
422
428
  getAll(): TEntity[];
423
429
  countAll(): number;
424
430
  clear(): void;
431
+ getAllPks(): TPk[];
425
432
  }
426
433
 
427
434
  type TOIMComparator<TEntity extends object> = (a: TEntity, b: TEntity) => boolean;
package/dist/index.js CHANGED
@@ -511,6 +511,9 @@ var OIMCollectionStoreMapDriven = class extends OIMCollectionStore {
511
511
  clear() {
512
512
  this.entities.clear();
513
513
  }
514
+ getAllPks() {
515
+ return Array.from(this.entities.keys());
516
+ }
514
517
  };
515
518
 
516
519
  // src/core/OIMEntityUpdaterFactory.ts
@@ -572,6 +575,9 @@ var OIMCollection = class {
572
575
  getAll() {
573
576
  return this.store.getAll();
574
577
  }
578
+ getAllPks() {
579
+ return this.store.getAllPks();
580
+ }
575
581
  upsertOneWithoutNotifications(entity) {
576
582
  const pk = this.selectPk(entity);
577
583
  const existingEntity = this.store.getOneByPk(pk);
@@ -652,6 +658,18 @@ var OIMReactiveCollection = class {
652
658
  getManyByPks(pks) {
653
659
  return this.collection.getManyByPks(pks);
654
660
  }
661
+ clear() {
662
+ this.collection.clear();
663
+ }
664
+ countAll() {
665
+ return this.collection.countAll();
666
+ }
667
+ getAll() {
668
+ return this.collection.getAll();
669
+ }
670
+ getAllPks() {
671
+ return this.collection.getAllPks();
672
+ }
655
673
  };
656
674
 
657
675
  // src/core/OIMIndexManual.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oimdb/core",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Core in-memory data library with type-safe indices, reactive subscriptions, and event processing",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",