# danog\MadelineProto\Settings\Database\Mysql

Back to index

Author: Daniil Gentili daniil@daniil.it

MySQL backend settings.

MariaDb 10.2+ or Mysql 5.6+ required.

# Method list:

# Methods:

# getMaxConnections(): int

Get maximum connection limit.

# setMaxConnections(int $maxConnections): self

Set maximum connection limit.

Parameters:

# getIdleTimeout(): int

Get idle timeout.

# setIdleTimeout(int $idleTimeout): self

Set idle timeout.

Parameters:

# getDatabase(): string

Get database name.

# setDatabase(string $database): self

Set database name.

Parameters:

# getUsername(): string

Get username.

# setUsername(string $username): self

Set username.

Parameters:

# getUri(): string

Get database URI.

# setUri(string $uri): self

Set database URI.

Parameters:

# getKey(): string

Get DB key.

# getCacheTtl(): int

Get for how long to keep records in memory after last read, for cached backends.

# setCacheTtl(int|string $cacheTtl): self

Set for how long to keep records in memory after last read, for cached backends. The cache TTL identifier can be a string like ‘+5 minutes’. When data is retrieved from a database it is stored in memory. This helps to reduce latency, improve speed and reduce mysql/postgres/redis load. Data will be removed from the cache if last access was more than this amount of time. Clean up is done once per minute.

Parameters:

# getPassword(): string

Get password.

# setPassword(string $password): self

Set password.

Parameters:

# getEnableFileReferenceDb(): bool

Get whether to enable the file reference database. If disabled, will break file downloads.

# setEnableFileReferenceDb(bool $enableFileReferenceDb): self

Set whether to enable the file reference database. If disabled, will break file downloads.

Parameters:

# getEnableMinDb(): bool

Get whether to enable the min database. If disabled, will break sendMessage (and other methods) in certain conditions.

# setEnableMinDb(bool $enableMinDb): self

Set whether to enable the min database. If disabled, will break sendMessage (and other methods) in certain conditions.

Parameters:

# getEnableUsernameDb(): bool

Get whether to enable the username database. If disabled, will break sendMessage (and other methods) with usernames.

# setEnableUsernameDb(bool $enableUsernameDb): self

Set whether to enable the username database. If disabled, will break sendMessage (and other methods) with usernames.

Parameters:

# getEnableFullPeerDb(): bool

Get whether to enable the full peer info database. If disabled, will break getFullInfo.

# setEnableFullPeerDb(bool $enableFullPeerDb): self

Set whether to enable the full peer info database. If disabled, will break getFullInfo.

Parameters:

# getEnablePeerInfoDb(): bool

Get whether to enable the peer info database. If disabled, will break getInfo.

# setEnablePeerInfoDb(bool $enablePeerInfoDb): self

Set whether to enable the peer info database. If disabled, will break getInfo.

Parameters:


Generated by danog/phpdoc

This site uses cookies, as described in the cookie policy. By clicking on "Accept" you consent to the use of cookies.