libasynql  3.2.0
Asynchronous MySQL access library for PocketMine plugins.
libasynql Class Reference

Static Public Member Functions

static isPackaged ()
 
static detectPackaged ()
 
static create (Plugin $plugin, $configData, array $sqlMap, bool $logQueries=null)
 

Detailed Description

An utility class providing convenient access to the API

Definition at line 42 of file libasynql.php.

Member Function Documentation

◆ 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$pluginthe plugin using libasynql
mixed$configDatathe 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$logQuerieswhether libasynql should log the queries with the plugin logger at the DEBUG level. Default !libasynql::isPackaged().
Returns
DataConnector
Exceptions
SqlErrorif the connection could not be created

Definition at line 71 of file libasynql.php.

◆ detectPackaged()

static detectPackaged ( )
static

Definition at line 50 of file libasynql.php.

◆ isPackaged()

static isPackaged ( )
static

Definition at line 46 of file libasynql.php.


The documentation for this class was generated from the following file: