Skip to content

Commit

Permalink
adding placeholder applyChanges to PersistentDataStoreWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
tanderson-ld committed Jan 9, 2025
1 parent 35a565c commit 0ea135a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 0 additions & 2 deletions packages/shared/sdk-server/src/options/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ const validations: Record<string, TypeValidator> = {
hooks: TypeValidators.createTypeArray('Hook[]', {}),
};



/**
* @internal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,19 @@ export default class PersistentDataStoreWrapper implements LDFeatureStore {
_selector: String | undefined,
_callback: () => void,
): void {
// TODO: implement
// TODO: SDK-1029 - Transactional persistent store - update this to not iterate over items and instead send data to underlying PersistentDataStore
// no need for queue at the moment as init and upsert handle that, but as part of SDK-1029, queue may be needed
if (_basis) {
this.init(_data, _callback);
} else {
Object.entries(_data).forEach(([namespace, items]) => {
Object.keys(items || {}).forEach((key) => {
const item = items[key];
this.upsert({ namespace }, { key, ...item }, () => {});
});
});
_callback();
}
}

close(): void {
Expand Down

0 comments on commit 0ea135a

Please sign in to comment.