Link Search Menu Expand Document

danog\MadelineProto\Settings\Database\SqlAbstract

Back to index

Author: Daniil Gentili daniil@daniil.it

Generic db backend settings.

Method list:

  • getMaxConnections()
  • setMaxConnections(int $maxConnections)
  • getIdleTimeout()
  • setIdleTimeout(int $idleTimeout)
  • getDatabase()
  • setDatabase(string $database)
  • getUsername()
  • setUsername(string $username)
  • getUri()
  • setUri(string $uri)
  • getKey()
  • getCacheTtl()
  • setCacheTtl(int|string $cacheTtl)
  • getPassword()
  • setPassword(string $password)
  • getEnableFileReferenceDb()
  • setEnableFileReferenceDb(bool $enableFileReferenceDb)
  • getEnableMinDb()
  • setEnableMinDb(bool $enableMinDb)
  • getEnableUsernameDb()
  • setEnableUsernameDb(bool $enableUsernameDb)
  • getEnableFullPeerDb()
  • setEnableFullPeerDb(bool $enableFullPeerDb)
  • getEnablePeerInfoDb()
  • setEnablePeerInfoDb(bool $enablePeerInfoDb)

Methods:

getMaxConnections()

Get maximum connection limit.

setMaxConnections(int $maxConnections)

Set maximum connection limit.

Parameters:

  • $maxConnections: int Maximum connection limit.

getIdleTimeout()

Get idle timeout.

setIdleTimeout(int $idleTimeout)

Set idle timeout.

Parameters:

  • $idleTimeout: int Idle timeout.

getDatabase()

Get database name.

setDatabase(string $database)

Set database name.

Parameters:

  • $database: string Database name.

getUsername()

Get username.

setUsername(string $username)

Set username.

Parameters:

  • $username: string Username.

getUri()

Get database URI.

setUri(string $uri)

Set database URI.

Parameters:

  • $uri: string Database URI.

getKey()

Get DB key.

getCacheTtl()

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

setCacheTtl(int|string $cacheTtl)

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:

  • $cacheTtl: int|string For how long to keep records in memory after last read, for cached backends.

getPassword()

Get password.

setPassword(string $password)

Set password.

Parameters:

  • $password: string Password.

getEnableFileReferenceDb()

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

setEnableFileReferenceDb(bool $enableFileReferenceDb)

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

Parameters:

  • $enableFileReferenceDb: bool Whether to enable the file reference database. If disabled, will break file downloads.

getEnableMinDb()

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

setEnableMinDb(bool $enableMinDb)

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

Parameters:

  • $enableMinDb: bool Whether to enable the min database. If disabled, will break sendMessage (and other methods) in certain conditions.

getEnableUsernameDb()

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

setEnableUsernameDb(bool $enableUsernameDb)

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

Parameters:

  • $enableUsernameDb: bool Whether to enable the username database. If disabled, will break sendMessage (and other methods) with usernames.

getEnableFullPeerDb()

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

setEnableFullPeerDb(bool $enableFullPeerDb)

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

Parameters:

  • $enableFullPeerDb: bool Whether to enable the full peer info database. If disabled, will break getFullInfo.

getEnablePeerInfoDb()

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

setEnablePeerInfoDb(bool $enablePeerInfoDb)

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

Parameters:

  • $enablePeerInfoDb: bool Whether to enable the peer info database. If disabled, will break getInfo.

Generated by danog/phpdoc