Class: SimpleMongoReader
Read in from MongoDB
Implements
Constructors
constructor
• new SimpleMongoReader(client
)
Parameters
Name | Type |
---|---|
client | MongoClient |
Defined in
packages/core/src/readers/SimpleMongoReader.ts:11
Properties
client
• Private
client: MongoClient
Defined in
packages/core/src/readers/SimpleMongoReader.ts:9
Methods
flatten
▸ Private
flatten(texts
): string
[]
Flattens an array of strings or string arrays into a single-dimensional array of strings.
Parameters
Name | Type | Description |
---|---|---|
texts | (string | string [])[] | The array of strings or string arrays to flatten. |
Returns
string
[]
The flattened array of strings.
Defined in
packages/core/src/readers/SimpleMongoReader.ts:20
loadData
▸ loadData(dbName
, collectionName
, fieldNames?
, separator?
, filterQuery?
, maxDocs?
, metadataNames?
): Promise
<Document
<Metadata
>[]>
Loads data from MongoDB collection