---
title: "danog\\AsyncOrm\\Settings\\SqlSettings: Generic SQL db backend settings."
description: ""

---
# `danog\AsyncOrm\Settings\SqlSettings`
[Back to index](../../../index.md)

> Author: Daniil Gentili <daniil@daniil.it>  
> Author: Alexander Pankratov <alexander@i-c-a.su>  
  

Generic SQL db backend settings.  




## Constants
* `danog\AsyncOrm\Settings\SqlSettings::DEFAULT_SQL_MAX_CONNECTIONS`: 

* `danog\AsyncOrm\Settings\SqlSettings::DEFAULT_SQL_IDLE_TIMEOUT`: 

* `danog\AsyncOrm\Settings\SqlSettings::DEFAULT_CACHE_TTL`: 

## Properties
* `$maxConnections`: `positive-int` Maximum connection limit.
* `$idleTimeout`: `positive-int` Idle timeout.
* `$config`: `T` 
* `$serializer`: `danog\AsyncOrm\Serializer` 
* `$cacheTtl`: `int<0, max>` For how long to keep records in memory after last read.

## Method list:
* [`__construct(\Amp\Sql\SqlConfig $config, ?\danog\AsyncOrm\Serializer $serializer, int<0, max> $cacheTtl = \self::DEFAULT_CACHE_TTL, int<1, max> $maxConnections = \self::DEFAULT_SQL_MAX_CONNECTIONS, int<1, max> $idleTimeout = \self::DEFAULT_SQL_IDLE_TIMEOUT)`](#__construct)
* [`getDriverClass(): class-string<\danog\AsyncOrm\DbArray>`](#getDriverClass)

## Methods:
### <a name="__construct"></a> `__construct(\Amp\Sql\SqlConfig $config, ?\danog\AsyncOrm\Serializer $serializer, int<0, max> $cacheTtl = \self::DEFAULT_CACHE_TTL, int<1, max> $maxConnections = \self::DEFAULT_SQL_MAX_CONNECTIONS, int<1, max> $idleTimeout = \self::DEFAULT_SQL_IDLE_TIMEOUT)`




Parameters:

* `$config`: `\Amp\Sql\SqlConfig`   
* `$serializer`: `?\danog\AsyncOrm\Serializer` to use for object and mixed type values.  
* `$cacheTtl`: `int<0, max>` Cache TTL in seconds  
* `$maxConnections`: `int<1, max>` Maximum connection limit  
* `$idleTimeout`: `int<1, max>` Idle timeout  


#### See also: 
* `\Amp\Sql\SqlConfig`
* [`\danog\AsyncOrm\Serializer`: Serializer interface.](../../../danog/AsyncOrm/Serializer.md)
* `max`




### <a name="getDriverClass"></a> `getDriverClass(): class-string<\danog\AsyncOrm\DbArray>`




#### See also: 
* [`\danog\AsyncOrm\DbArray`: DB array interface.](../../../danog/AsyncOrm/DbArray.md)




---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
