summaryrefslogtreecommitdiff
path: root/vendor/fguillot/picodb/lib/PicoDb/Driver/Sqlite.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/fguillot/picodb/lib/PicoDb/Driver/Sqlite.php')
-rw-r--r--vendor/fguillot/picodb/lib/PicoDb/Driver/Sqlite.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/fguillot/picodb/lib/PicoDb/Driver/Sqlite.php b/vendor/fguillot/picodb/lib/PicoDb/Driver/Sqlite.php
index ea39f007..0503d336 100644
--- a/vendor/fguillot/picodb/lib/PicoDb/Driver/Sqlite.php
+++ b/vendor/fguillot/picodb/lib/PicoDb/Driver/Sqlite.php
@@ -29,7 +29,13 @@ class Sqlite extends Base
*/
public function createConnection(array $settings)
{
- $this->pdo = new PDO('sqlite:'.$settings['filename']);
+ $options = array();
+
+ if (! empty($settings['timeout'])) {
+ $options[PDO::ATTR_TIMEOUT] = $settings['timeout'];
+ }
+
+ $this->pdo = new PDO('sqlite:'.$settings['filename'], null, null, $options);
$this->enableForeignKeys();
}