namespace staticbo. dataAccess
Source: data-access/
Contains data access components.
Classes
ConnectionManagerBase
DaoBase
DaoError
Method
staticdaoBuilder(dataSource, modelPath, modelName) → bo.dataAccess.DaoBase
Factory method to create the data access object for a model instance. The path of the data access object is created using the model path and inserted the data source string before the extension. (The model name is not used by this implementation.)
Example
daoBuilder('oracle', '/path/to/model.js')
// returns require('/path/to/model.oracle.js')
Parameters
Name | Type | Optional | Description |
---|---|---|---|
dataSource |
string |
|
The name of the data source. |
modelPath |
string |
|
The model definition path of the business object model instance that the data access object belongs to. |
modelName |
string |
|
The name of the business object model. |
- Throws
-
Dao error: The name of the data source must be a non-empty string.
-
Dao error: The model path must be a non-empty string.
-
Dao error: The model path is not a valid file path.
-
Dao error: The required data access file does not exist.
-
Dao error: The data access file must return a constructor.
-
Dao error: The data access object must inherit DaoBase type.
- Returns
-
bo.dataAccess.DaoBase
The data access object of the business object model.