1 | import { Database } from '../database';
|
2 | import { SeederCollection } from '../common';
|
3 | import { CollectionInsertManyOptions } from 'mongodb';
|
4 |
|
5 |
|
6 |
|
7 | export declare class CollectionImporter {
|
8 | db: Database;
|
9 | collectionInsertManyOptions?: CollectionInsertManyOptions | undefined;
|
10 | |
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | constructor(db: Database, collectionInsertManyOptions?: CollectionInsertManyOptions | undefined);
|
17 | /**
|
18 | * Imports multiple collections into database.
|
19 | *
|
20 | * @param collections Array of collections
|
21 | */
|
22 | import(collections: SeederCollection[]): Promise<void>;
|
23 | /**
|
24 | * Imports single collection into database.
|
25 | *
|
26 | * @param collection Collection definition
|
27 | */
|
28 | private importCollection;
|
29 | }
|