@sourceloop/reporting-service / Exports / DataSourcesService
Class: DataSourcesService¶
Table of contents¶
Constructors¶
Properties¶
Methods¶
Constructors¶
constructor¶
• new DataSourcesService(dataStoreAdapter
, dataTypeMap
)
The constructor function initializes a DataStoreAdapter based on the database type and options provided in the environment variables.
Parameters¶
Name | Type |
---|---|
dataStoreAdapter |
DataStoreAdapter |
dataTypeMap |
undefined | Record <string , DataTypeMapping > |
Defined in¶
services/reporting-service/src/services/data-sources.service.ts:20
Properties¶
dataStoreAdapter¶
• Private
dataStoreAdapter: DataStoreAdapter
Defined in¶
services/reporting-service/src/services/data-sources.service.ts:22
dataTypeMap¶
• Private
dataTypeMap: undefined
| Record
<string
, DataTypeMapping
>
Defined in¶
services/reporting-service/src/services/data-sources.service.ts:24
Methods¶
getTotalDataSourceCount¶
▸ getTotalDataSourceCount(): Promise
<number
>
The function getTotalDataSourceCount
returns the total number of data sources by listing the
tables and returning the length of the resulting array.
Returns¶
Promise
<number
>
the total count of data sources as a number.
Defined in¶
services/reporting-service/src/services/data-sources.service.ts:73
listDataSourceColumns¶
▸ listDataSourceColumns(dataSource
): Promise
<ColumnForDataSourceModel
[]>
The function "listDataSourceColumns" asynchronously retrieves a list of columns for a given data source.
Parameters¶
Name | Type | Description |
---|---|---|
dataSource |
string |
A string representing the name or identifier of the data source. |
Returns¶
Promise
<ColumnForDataSourceModel
[]>
a Promise that resolves to an array of ColumnForDataSourceModel objects.
Defined in¶
services/reporting-service/src/services/data-sources.service.ts:42
listdataSources¶
▸ listdataSources(): Promise
<DataSourceList
[]>
The function "listdataSources" asynchronously retrieves a list of data sources from the data store adapter and returns it as an array of DataSourceList objects.
Returns¶
Promise
<DataSourceList
[]>
a Promise that resolves to an array of DataSourceList objects.
Defined in¶
services/reporting-service/src/services/data-sources.service.ts:32