You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param string $host The MySQL server hostname or IP address.
63
+
* @param string $port The MySQL server port number.
64
+
* @param string $username The MySQL username for authentication.
65
+
* @param string $password The MySQL password for authentication.
66
+
* @param string $database The database name to connect to.
67
+
* @param bool $persistent Whether to use persistent connections. Persistent connections are not closed at the end of the script and are cached for reuse when another script requests a connection using the same credentials.
68
+
* @param bool|null $verifyServerCertificate Whether to verify the server's SSL certificate. Set to false for self-signed certificates (not recommended for production).
69
+
* @param string|null $certificateAuthority Path to the SSL Certificate Authority (CA) file. Required for SSL/TLS connections to verify the server's certificate.
70
+
* @param string|null $clientCertificate Path to the client's SSL certificate file. Used for mutual TLS authentication.
71
+
* @param string|null $clientKey Path to the client's SSL private key file. Used for mutual TLS authentication.
72
+
* @param NamingStrategy $namingStrategy The naming strategy for database tables and columns.
73
+
* @param string|UnitEnum|null $tag An optional tag to identify this database configuration.
@@ -26,6 +27,32 @@ final class PostgresConfig implements DatabaseConfig
26
27
get => DatabaseDialect::POSTGRESQL;
27
28
}
28
29
30
+
publicbool$usePersistentConnection {
31
+
get => $this->persistent;
32
+
}
33
+
34
+
publicarray$options {
35
+
get {
36
+
$options = [];
37
+
38
+
if ($this->persistent) {
39
+
$options[PDO::ATTR_PERSISTENT] = true;
40
+
}
41
+
42
+
return$options;
43
+
}
44
+
}
45
+
46
+
/**
47
+
* @param string $host The PostgreSQL server hostname or IP address.
48
+
* @param string $port The PostgreSQL server port number.
49
+
* @param string $username The PostgreSQL username for authentication.
50
+
* @param string $password The PostgreSQL password for authentication.
51
+
* @param string $database The database name to connect to.
52
+
* @param bool $persistent Whether to use persistent connections. Persistent connections are not closed at the end of the script and are cached for reuse when another script requests a connection using the same credentials.
53
+
* @param NamingStrategy $namingStrategy The naming strategy for database tables and columns.
54
+
* @param string|UnitEnum|null $tag An optional tag to identify this database configuration.
@@ -30,9 +31,32 @@ final class SQLiteConfig implements DatabaseConfig
30
31
get => DatabaseDialect::SQLITE;
31
32
}
32
33
34
+
publicbool$usePersistentConnection {
35
+
get => $this->persistent;
36
+
}
37
+
38
+
publicarray$options {
39
+
get {
40
+
$options = [];
41
+
42
+
if ($this->persistent) {
43
+
$options[PDO::ATTR_PERSISTENT] = true;
44
+
}
45
+
46
+
return$options;
47
+
}
48
+
}
49
+
50
+
/**
51
+
* @param string $path Path to the SQLite database file. Use ':memory:' for an in-memory database.
52
+
* @param bool $persistent Whether to use persistent connections. Persistent connections are not closed at the end of the script and are cached for reuse when another script requests a connection using the same credentials.
53
+
* @param NamingStrategy $namingStrategy The naming strategy for database tables and columns.
54
+
* @param string|UnitEnum|null $tag An optional tag to identify this database configuration.
0 commit comments