--- title: danog\MadelineProto\Db\MysqlArray: MySQL database backend. description: --- # `danog\MadelineProto\Db\MysqlArray` [Back to index](../../../index.md) > Author: Daniil Gentili MySQL database backend. ## Method list: * `initStartup(): \Generator` * `isset( $key): \Promise true if the offset exists, otherwise false` * `offsetSet(string|int $index, $value)` * `offsetUnset(string|int $index): \Amp\Promise` * `count(): \Promise The number of elements or public properties in the associated array or object, respectively.` * `initConnection(\danog\MadelineProto\Settings\Database\Mysql $settings): \Generator` * `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise` ## Methods: ### `initStartup(): \Generator` Initialize on startup. #### See also: * `\Generator` --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `isset( $key): \Promise true if the offset exists, otherwise false` Check if key isset. Parameters: * `$key`: `` Return value: true if the offset exists, otherwise false --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `offsetSet(string|int $index, $value)` Set value for an offset. Parameters: * `$index`: `string|int`

The index to set for.

* `$value`: `` --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `offsetUnset(string|int $index): \Amp\Promise` Unset value for an offset. Parameters: * `$index`: `string|int`

The offset to unset.

#### See also: * `\Amp\Promise` --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `count(): \Promise The number of elements or public properties in the associated array or object, respectively.` Count elements. Return value: The number of elements or public properties in the associated array or object, respectively. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `initConnection(\danog\MadelineProto\Settings\Database\Mysql $settings): \Generator` Initialize connection. Parameters: * `$settings`: `\danog\MadelineProto\Settings\Database\Mysql` #### See also: * [`\danog\MadelineProto\Settings\Database\Mysql`: MySQL backend settings.](../Settings/Database/Mysql.md) * `\Generator` --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) ### `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise` Parameters: * `$table`: `string` * `$value`: `\danog\MadelineProto\Db\DbArray|array|null` * `$settings`: `\danog\MadelineProto\Settings\Database\DatabaseAbstract` Fully typed return value: ``` \Amp\Promise ``` #### See also: * [`\danog\MadelineProto\Db\DbArray`: DB array interface.](./DbArray.md) * [`\danog\MadelineProto\Settings\Database\DatabaseAbstract`: Base class for database backends.](../Settings/Database/DatabaseAbstract.md) * `\Amp\Promise` --- Generated by [danog/phpdoc](https://phpdoc.daniil.it) --- Generated by [danog/phpdoc](https://phpdoc.daniil.it)