Constructor
new File(name, properties)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | the datasource name | |||||||||
properties |
Object | the datasource properties
Properties
|
- Source:
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:
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
(protected) initDataSource(properties)
Inits the datasource with the constructor properties.
Parameters:
Name | Type | Description |
---|---|---|
properties |
- Overrides:
- Source:
onDisconnect()
Trigger when the datasource is disconnected for some reason.
- Overrides:
- Source:
updateProperties(name, properties)
Update properties
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | the datasource name | |||||||||||||||||||||||||||||||||
properties |
Object | the datasource properties
Properties
|
- Overrides:
- Source: