An utility class providing convenient access to the API
Definition at line 42 of file libasynql.php.
◆ create()
static create |
( |
Plugin |
$plugin, |
|
|
|
$configData, |
|
|
array |
$sqlMap, |
|
|
bool |
$logQueries = null |
|
) |
| |
|
static |
Create a DatabaseConnector from a plugin and a config entry, and initializes it with the relevant SQL files according to the selected dialect
- Parameters
-
Plugin | $plugin | the plugin using libasynql |
mixed | $configData | the config entry for database settings |
| string[]|string[][] | $sqlMap an associative array with key as the SQL dialect ("mysql", "sqlite") and value as a string or string array indicating the relevant SQL files in the plugin's resources directory |
bool | $logQueries | whether libasynql should log the queries with the plugin logger at the DEBUG level. Default !libasynql::isPackaged() . |
- Returns
- DataConnector
- Exceptions
-
SqlError | if the connection could not be created |
Definition at line 71 of file libasynql.php.
◆ detectPackaged()
static detectPackaged |
( |
| ) |
|
|
static |
◆ isPackaged()
The documentation for this class was generated from the following file: