class staticbo.dataAccess. DaoBase
Source: data-access/
Serves as the base class for data access objects.
Property
new DaoBase(name)
Creates a new data access object.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
name |
string |
|
The name of the data access object. |
- Throws
-
Dao error: The data access object name must be a non-empty string.
Property
read-onlyname
string
The name of the data access object.
Methods
$hasCreate() → boolean
Determines if create method exists.
- Returns
-
boolean
True when create method exists, otherwise false.
$runMethod(methodName[, ...methodArg]) → any type
Executes the named method on the data access object.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
methodName |
string |
|
The name of the method to check. |
methodArg |
any type |
Yes |
The arguments of the method to execute. The last argument must be a callback function in case of asynchronous models. Value can be repeated. |