Jet\Lock_Backend_MariaDB
One of the backends of the lock subsystem.
This is a more sophisticated lock variant that uses MariaDB (MySQL) database locks. It utilizes the native features of this database directly, so it is not an ORM implementation.
This backend is suitable for higher-load applications and multi-server setups.
ATTENTION! If you decide to use this backend, you must first create a table in the MariaDB (MySQL) database where the backend stores locks. This can be done with the following call:
Jet\Lock_Backend_MariaDB::createDbTable();
The class interface extends the abstract class Jet\Lock_Backend with these methods:
| Method | Description |
|---|---|
| public static setDb( ?Db_Backend_Interface $db ) : void |
Allows setting which database connection the backend should use. |
| public static getDb( ) : Db_Backend_Interface |
Returns the database connection that the backend uses. |
| public static setTableName( string $table_name ) : void |
Allows setting the name of the database table used by the backend. |
| public static getTableName( ) : string |
Returns the current name of the database table used by the backend. |
| public static createDbTable( ) : void |
Creates the database table used by the backend. It takes into account current settings (i.e., database connection and table name). |