@furystack/mongodb-store
Version:
MongoDB Store implementation for FuryStack
33 lines • 840 B
TypeScript
import type { Constructable, Injector } from '@furystack/inject';
import type { MongoClientOptions } from 'mongodb';
export declare const useMongoDb: <T extends object>({ injector, model, primaryKey, db, collection, url, options, }: {
/**
* The Injector instance to use
*/
injector: Injector;
/**
* The constructable model class
*/
model: Constructable<T>;
/**
* The name of the Primary Key property
*/
primaryKey: keyof T;
/**
* Url of the MongoDb repository
*/
url: string;
/**
* MongoDb Database name
*/
db: string;
/**
* MongoDb Collection name
*/
collection: string;
/**
* Optional options for the MongoDb Client
*/
options?: MongoClientOptions;
}) => void;
//# sourceMappingURL=store-manager-helpers.d.ts.map