@@ -140,64 +140,66 @@ and decode it in the constructor in the Config class:
140140Description of Values
141141*********************
142142
143- ================ ===========================================================================================================
144- Config Name Description
145- ================ ===========================================================================================================
146- **DSN ** The DSN connect string (an all-in-one configuration sequence).
147- **hostname ** The hostname of your database server. Often this is 'localhost'.
148- **username ** The username used to connect to the database. (``SQLite3 `` does not use this.)
149- **password ** The password used to connect to the database. (``SQLite3 `` does not use this.)
150- **database ** The name of the database you want to connect to.
151-
152- .. note:: CodeIgniter doesn't support dots (``.``) in the table and column names.
153- Since v4.5.0, database names with dots are supported.
154- **DBDriver ** The database driver name. The case must match the driver name.
155- You can set a fully qualified classname to use your custom driver.
156- Supported drivers: ``MySQLi ``, ``Postgre ``, ``SQLite3 ``, ``SQLSRV ``, and ``OCI8 ``.
157- **DBPrefix ** An optional table prefix which will be added to the table name when running
158- :doc: `Query Builder <query_builder >` queries. This permits multiple CodeIgniter
159- installations to share one database.
160- **pConnect ** true/false (boolean) - Whether to use a persistent connection.
161- **DBDebug ** true/false (boolean) - Whether to throw exceptions when database errors occur.
162- **charset ** The character set used in communicating with the database.
163- **DBCollat ** (``MySQLi `` only) The character collation used in communicating with the database.
164- **swapPre ** A default table prefix that should be swapped with ``DBPrefix ``. This is useful for distributed
165- applications where you might run manually written queries, and need the prefix to still be
166- customizable by the end user.
167- **schema ** (``Postgre `` and ``SQLSRV `` only) The database schema, default value varies by driver.
168- **encrypt ** (``MySQLi `` and ``SQLSRV `` only) Whether to use an encrypted connection.
169- See :ref: `MySQLi encrypt <mysqli-encrypt >` for ``MySQLi `` settings.
170- ``SQLSRV `` driver accepts true/false.
171- **compress ** (``MySQLi `` only) Whether to use client compression.
172- **strictOn ** (``MySQLi `` only) true/false (boolean) - Whether to force "Strict Mode" connections, good for ensuring
173- strict SQL while developing an application.
174- **port ** The database port number - Empty string ``'' `` for default port (or dynamic port with ``SQLSRV ``).
175- **foreignKeys ** (``SQLite3 `` only) true/false (boolean) - Whether to enable Foreign Key constraint.
176-
177- .. important:: SQLite3 Foreign Key constraint is disabled by default.
178- See `SQLite documentation <https://www.sqlite.org/pragma.html#pragma_foreign_keys >`_.
179- To enforce Foreign Key constraint, set this config item to true.
180- **busyTimeout ** (``SQLite3 `` only) milliseconds (int) - Sleeps for a specified amount of time when a table is locked.
181- **synchronous ** (``SQLite3 `` only) flag (int) - How strict SQLite will be at flushing to disk during transactions.
182- Use `null ` to stay with the default setting. This can be used since v4.6.0.
183- **numberNative ** (``MySQLi `` only) true/false (boolean) - Whether to enable MYSQLI_OPT_INT_AND_FLOAT_NATIVE.
184- **foundRows ** (``MySQLi `` only) true/false (boolean) - Whether to enable MYSQLI_CLIENT_FOUND_ROWS.
185- **dateFormat ** The default date/time formats as PHP's `DateTime format `_.
186- * ``date `` - date format
187- * ``datetime `` - date and time format
188- * ``datetime-ms `` - date and time with millisecond format
189- * ``datetime-us `` - date and time with microsecond format
190- * ``time `` - time format
191- This can be used since v4.5.0, and you can get the value, e.g., ``$db->dateFormat['datetime'] ``.
192- Currently, the database drivers do not use these values directly,
193- but :ref: `Model <model-saving-dates >` uses them.
194- **timezone ** (``MySQLi ``, ``Postgre ``, and ``OCI8 `` only) The database session timezone.
195- * ``false `` - Don't set session timezone (default, backward compatible)
196- * ``true `` - Automatically sync with ``App::$appTimezone ``
197- * ``string `` - Specific timezone offset (e.g., ``'+05:30' ``) or named timezone (e.g., ``'America/New_York' ``)
198- Named timezones are automatically converted to offsets for database compatibility.
199- See :ref: `database-config-timezone ` for details.
200- ================ ===========================================================================================================
143+ =========================== =====================================================================================================
144+ Config Name Description
145+ =========================== =====================================================================================================
146+ **DSN ** The DSN connect string (an all-in-one configuration sequence).
147+ **hostname ** The hostname of your database server. Often this is 'localhost'.
148+ **username ** The username used to connect to the database. (``SQLite3 `` does not use this.)
149+ **password ** The password used to connect to the database. (``SQLite3 `` does not use this.)
150+ **database ** The name of the database you want to connect to.
151+
152+ .. note:: CodeIgniter doesn't support dots (``.``) in the table and column names.
153+ Since v4.5.0, database names with dots are supported.
154+ **DBDriver ** The database driver name. The case must match the driver name.
155+ You can set a fully qualified classname to use your custom driver.
156+ Supported drivers: ``MySQLi ``, ``Postgre ``, ``SQLite3 ``, ``SQLSRV ``, and ``OCI8 ``.
157+ **DBPrefix ** An optional table prefix which will be added to the table name when running
158+ :doc: `Query Builder <query_builder >` queries. This permits multiple CodeIgniter
159+ installations to share one database.
160+ **pConnect ** true/false (boolean) - Whether to use a persistent connection.
161+ **DBDebug ** true/false (boolean) - Whether to throw exceptions when database errors occur.
162+ **charset ** The character set used in communicating with the database.
163+ **DBCollat ** (``MySQLi `` only) The character collation used in communicating with the database.
164+ **swapPre ** A default table prefix that should be swapped with ``DBPrefix ``. This is useful for distributed
165+ applications where you might run manually written queries, and need the prefix to still be
166+ customizable by the end user.
167+ **schema ** (``Postgre `` and ``SQLSRV `` only) The database schema, default value varies by driver.
168+ **encrypt ** (``MySQLi `` and ``SQLSRV `` only) Whether to use an encrypted connection.
169+ See :ref: `MySQLi encrypt <mysqli-encrypt >` for ``MySQLi `` settings.
170+ ``SQLSRV `` driver accepts true/false.
171+ **trustServerCertificate ** (``SQLSRV `` only) true/false (boolean) - Whether to trust the server certificate
172+ without validating it against a trusted certificate authority.
173+ **compress ** (``MySQLi `` only) Whether to use client compression.
174+ **strictOn ** (``MySQLi `` only) true/false (boolean) - Whether to force "Strict Mode" connections, good for ensuring
175+ strict SQL while developing an application.
176+ **port ** The database port number - Empty string ``'' `` for default port (or dynamic port with ``SQLSRV ``).
177+ **foreignKeys ** (``SQLite3 `` only) true/false (boolean) - Whether to enable Foreign Key constraint.
178+
179+ .. important:: SQLite3 Foreign Key constraint is disabled by default.
180+ See `SQLite documentation <https://www.sqlite.org/pragma.html#pragma_foreign_keys >`_.
181+ To enforce Foreign Key constraint, set this config item to true.
182+ **busyTimeout ** (``SQLite3 `` only) milliseconds (int) - Sleeps for a specified amount of time when a table is locked.
183+ **synchronous ** (``SQLite3 `` only) flag (int) - How strict SQLite will be at flushing to disk during transactions.
184+ Use `null ` to stay with the default setting. This can be used since v4.6.0.
185+ **numberNative ** (``MySQLi `` only) true/false (boolean) - Whether to enable MYSQLI_OPT_INT_AND_FLOAT_NATIVE.
186+ **foundRows ** (``MySQLi `` only) true/false (boolean) - Whether to enable MYSQLI_CLIENT_FOUND_ROWS.
187+ **dateFormat ** The default date/time formats as PHP's `DateTime format `_.
188+ * ``date `` - date format
189+ * ``datetime `` - date and time format
190+ * ``datetime-ms `` - date and time with millisecond format
191+ * ``datetime-us `` - date and time with microsecond format
192+ * ``time `` - time format
193+ This can be used since v4.5.0, and you can get the value, e.g., ``$db->dateFormat['datetime'] ``.
194+ Currently, the database drivers do not use these values directly,
195+ but :ref: `Model <model-saving-dates >` uses them.
196+ **timezone ** (``MySQLi ``, ``Postgre ``, and ``OCI8 `` only) The database session timezone.
197+ * ``false `` - Don't set session timezone (default, backward compatible)
198+ * ``true `` - Automatically sync with ``App::$appTimezone ``
199+ * ``string `` - Specific timezone offset (e.g., ``'+05:30' ``) or named timezone (e.g., ``'America/New_York' ``)
200+ Named timezones are automatically converted to offsets for database compatibility.
201+ See :ref: `database-config-timezone ` for details.
202+ =========================== =====================================================================================================
201203
202204.. _DateTime format : https://www.php.net/manual/en/datetime.format.php
203205
0 commit comments