Constructor
new FileDataSource(name, properties)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | the datasource name | |||||||||
properties |
Object | the datasource properties
Properties
|
Example
import File from 'core/datasource/File.js';
let earthquakeDatasource = new File("EQ", {
protocol: "file",
paths: ["./data/earthquake.1.csv"]
});
Extends
Methods
(async) connect()
Connect the dataSource then the protocol will be opened as well.
- Overrides:
- Source:
(async) disconnect()
Disconnect the dataSource then the protocol will be closed as well.
- Overrides:
- Source:
getId() → {String}
Gets the datasource id.
- Overrides:
- Source:
Returns:
the datasource id
- Type
- String
getName() → {String}
Gets the datasource name.
- Overrides:
- Source:
Returns:
the datasource name
- Type
- String
(async) updateProperties(name, properties)
Update properties
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | the datasource name | ||||||||||||||||||||||||
properties |
Object | the datasource properties
Properties
|
- Overrides:
- Source: