Link Search Menu Expand Document

danog\MadelineProto\Db\SqlArray

Back to index

Author: Daniil Gentili daniil@daniil.it

Generic SQL database backend.

Method list:

  • getIterator()
  • unset(string|int $index): \Amp\Promise<array>
  • count(): \Promise<int> The number of elements or public properties in the associated array or object, respectively.
  • clear(): \Amp\Promise<\Amp\Sql\CommandResult>
  • initConnection()
  • initStartup(): \Generator
  • getTable(): string
  • isset(mixed $key): \Promise<bool> true if the offset exists, otherwise false
  • getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $previous, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise

Methods:

getIterator()

unset(string|int $index): \Amp\Promise<array>

Unset value for an offset.

Parameters:

  • $index: string|int

    The offset to unset.


See also:

  • \Amp\Promise

`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.

clear(): \Amp\Promise<\Amp\Sql\CommandResult>

Clear all elements.

See also:

  • \Amp\Sql\CommandResult
  • \Amp\Promise

initConnection()

Initialize connection.

initStartup(): \Generator

Initialize on startup.

See also:

  • \Generator

getTable(): string

Get the value of table.

isset(mixed $key): \Promise<bool> true if the offset exists, otherwise false

Check if key isset.

Parameters:

  • $key: mixed

Return value: true if the offset exists, otherwise false

getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $previous, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise

Parameters:

  • $table: string
  • $previous: \danog\MadelineProto\Db\DbArray|array|null
  • $settings: \danog\MadelineProto\Settings\Database\DatabaseAbstract

Fully typed return value:

\Amp\Promise<static>

See also:


Generated by danog/phpdoc