X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fperformance%2Fstorage%2FStorageFactory.ts;h=2b6b84ffe5b8ad75da53fc7c5fa9687b0e0089cd;hb=16c46962f43a692c996b1c89a94dc572fea52d63;hp=8753bea1159d863f83b6a08cf2f0b102039d3219;hpb=789007bd09242370a9d3502da967deb414886504;p=e-mobility-charging-stations-simulator.git diff --git a/src/performance/storage/StorageFactory.ts b/src/performance/storage/StorageFactory.ts index 8753bea1..2b6b84ff 100644 --- a/src/performance/storage/StorageFactory.ts +++ b/src/performance/storage/StorageFactory.ts @@ -1,11 +1,12 @@ // Copyright Jerome Benoit. 2021-2024. All Rights Reserved. +import { BaseError } from '../../exception/index.js' +import { StorageType } from '../../types/index.js' import { JsonFileStorage } from './JsonFileStorage.js' import { MikroOrmStorage } from './MikroOrmStorage.js' import { MongoDBStorage } from './MongoDBStorage.js' +import { None } from './None.js' import type { Storage } from './Storage.js' -import { BaseError } from '../../exception/index.js' -import { StorageType } from '../../types/index.js' // eslint-disable-next-line @typescript-eslint/no-extraneous-class export class StorageFactory { @@ -31,6 +32,9 @@ export class StorageFactory { case StorageType.MYSQL: storageInstance = new MikroOrmStorage(connectionUri, logPrefix, type) break + case StorageType.NONE: + storageInstance = new None() + break default: // eslint-disable-next-line @typescript-eslint/restrict-template-expressions throw new BaseError(`${logPrefix} Unknown storage type: ${type}`)