summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-02-14 10:18:27 -0800
committerFrédéric Guillot <fred@kanboard.net>2018-02-14 10:18:27 -0800
commit0d578171feed5e09afc258346c183cf905333f4a (patch)
tree89e812512d4d6aa2e310538c9a2be8a030692176 /vendor
parentb096e907cf003659cf1b504787363352191fc639 (diff)
Add timeout parameter for database connection
Diffstat (limited to 'vendor')
-rw-r--r--vendor/composer/installed.json84
-rw-r--r--vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php4
-rw-r--r--vendor/fguillot/picodb/lib/PicoDb/Driver/Postgres.php7
-rw-r--r--vendor/fguillot/picodb/lib/PicoDb/Driver/Sqlite.php8
4 files changed, 59 insertions, 44 deletions
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index d702ddd7..1326ba84 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -292,48 +292,6 @@
"homepage": "https://github.com/fguillot/JsonRPC"
},
{
- "name": "fguillot/picodb",
- "version": "v1.0.16",
- "version_normalized": "1.0.16.0",
- "source": {
- "type": "git",
- "url": "https://github.com/fguillot/picoDb.git",
- "reference": "03b89d09e283cbaffbb4039e4ba6eaa3d327002a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/fguillot/picoDb/zipball/03b89d09e283cbaffbb4039e4ba6eaa3d327002a",
- "reference": "03b89d09e283cbaffbb4039e4ba6eaa3d327002a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "4.8.*"
- },
- "time": "2018-01-30T00:01:16+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "PicoDb": "lib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Frédéric Guillot",
- "homepage": "https://github.com/fguillot/"
- }
- ],
- "description": "Minimalist database query builder",
- "homepage": "https://github.com/fguillot/picoDb"
- },
- {
"name": "fguillot/simple-queue",
"version": "v1.0.1",
"version_normalized": "1.0.1.0",
@@ -1079,5 +1037,47 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com"
+ },
+ {
+ "name": "fguillot/picodb",
+ "version": "v1.0.17",
+ "version_normalized": "1.0.17.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/fguillot/picoDb.git",
+ "reference": "1699864992c40ad02395e95d7fbf44a571a116f3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/fguillot/picoDb/zipball/1699864992c40ad02395e95d7fbf44a571a116f3",
+ "reference": "1699864992c40ad02395e95d7fbf44a571a116f3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.8.*"
+ },
+ "time": "2018-02-14T00:51:01+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "PicoDb": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Frédéric Guillot",
+ "homepage": "https://github.com/fguillot/"
+ }
+ ],
+ "description": "Minimalist database query builder",
+ "homepage": "https://github.com/fguillot/picoDb"
}
]
diff --git a/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php b/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php
index 147be816..17f44057 100644
--- a/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php
+++ b/vendor/fguillot/picodb/lib/PicoDb/Driver/Mysql.php
@@ -102,6 +102,10 @@ class Mysql extends Base
$options[PDO::ATTR_PERSISTENT] = $settings['persistent'];
}
+ if (! empty($settings['timeout'])) {
+ $options[PDO::ATTR_TIMEOUT] = $settings['timeout'];
+ }
+
if (isset($settings['verify_server_cert'])) {
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = $settings['verify_server_cert'];
}
diff --git a/vendor/fguillot/picodb/lib/PicoDb/Driver/Postgres.php b/vendor/fguillot/picodb/lib/PicoDb/Driver/Postgres.php
index 94279492..86036839 100644
--- a/vendor/fguillot/picodb/lib/PicoDb/Driver/Postgres.php
+++ b/vendor/fguillot/picodb/lib/PicoDb/Driver/Postgres.php
@@ -42,6 +42,7 @@ class Postgres extends Base
$dsn = 'pgsql:dbname='.$settings['database'];
$username = null;
$password = null;
+ $options = array();
if (! empty($settings['username'])) {
$username = $settings['username'];
@@ -59,7 +60,11 @@ class Postgres extends Base
$dsn .= ';port='.$settings['port'];
}
- $this->pdo = new PDO($dsn, $username, $password);
+ if (! empty($settings['timeout'])) {
+ $options[PDO::ATTR_TIMEOUT] = $settings['timeout'];
+ }
+
+ $this->pdo = new PDO($dsn, $username, $password, $options);
if (isset($settings['schema_table'])) {
$this->schemaTable = $settings['schema_table'];
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();
}