Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Some typos in database/configuration.rst #8825

Merged
merged 13 commits into from
Apr 30, 2024
Merged
28 changes: 14 additions & 14 deletions user_guide_src/source/database/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ prototype:
The name of the class property is the connection name, and can be used
while connecting to specify a group name.

.. note:: The default location of the SQLite3 database is in the **writable** folder.
If you want to change the location, you must set the full path to the new folder.
.. note:: The default location of the SQLite3 database is the **writable** folder.
If you want to change the location, you must set the full path to the new folder (e.g., 'database' => WRITEPATH . 'db/database_name.db').

DSN
---

Some database drivers (such as Postgre, OCI8) requires a full DSN string to connect.
Some database drivers (such as Postgre, OCI8) requires a full DSN (Data Source Name) string to connect.
But if you do not specify a DSN string for a driver that requires it, CodeIgniter
will try to build it with the rest of the provided settings.

Expand All @@ -48,7 +48,7 @@ you're using the driver's underlying native PHP extension, like this:
DSN in Universal Manner
^^^^^^^^^^^^^^^^^^^^^^^

You can also set a Data Source Name in universal manner (URL like). In that case DSNs must have this prototype:
You can also set a DSN in universal manner (URL like). In that case DSNs must have this prototype:

.. literalinclude:: configuration/003.php
:lines: 11-14
Expand Down Expand Up @@ -113,7 +113,7 @@ Configuring with .env File

You can also save your configuration values within a **.env** file with the current server's
database settings. You only need to enter the values that change from what is in the
default group's configuration settings. The values should be name following this format, where
default group's configuration settings. The values should follow this format, where
``default`` is the group name::

database.default.username = 'root';
Expand All @@ -137,11 +137,11 @@ and decode it in the constructor in the Config class:
.. _database-config-explanation-of-values:

*********************
Explanation of Values
Description of Values
*********************

================ ===========================================================================================================
Name Config Description
Config Name Description
================ ===========================================================================================================
**DSN** The DSN connect string (an all-in-one configuration sequence).
**hostname** The hostname of your database server. Often this is 'localhost'.
Expand All @@ -154,31 +154,31 @@ Explanation of Values
**DBDriver** The database driver name. The case must match the driver name.
You can set a fully qualified classname to use your custom driver.
Supported drivers: ``MySQLi``, ``Postgre``, ``SQLite3``, ``SQLSRV``, and ``OCI8``.
**DBPrefix** An optional table prefix which will added to the table name when running
**DBPrefix** An optional table prefix which will be added to the table name when running
:doc:`Query Builder <query_builder>` queries. This permits multiple CodeIgniter
installations to share one database.
**pConnect** true/false (boolean) - Whether to use a persistent connection.
**DBDebug** true/false (boolean) - Whether to throw exceptions or not when database errors occur.
**DBDebug** true/false (boolean) - Whether to throw exceptions when database errors occur.
**charset** The character set used in communicating with the database.
**DBCollat** (``MySQLi`` only) The character collation used in communicating with the database.
**swapPre** A default table prefix that should be swapped with ``DBPrefix``. This is useful for distributed
applications where you might run manually written queries, and need the prefix to still be
customizable by the end user.
**schema** (``Postgre`` and ``SQLSRV`` only) The database schema, default value varies by driver.
**encrypt** (``MySQLi`` and ``SQLSRV`` only) Whether or not to use an encrypted connection.
**encrypt** (``MySQLi`` and ``SQLSRV`` only) Whether to use an encrypted connection.
See :ref:`MySQLi encrypt <mysqli-encrypt>` for ``MySQLi`` settings.
``SQLSRV`` driver accepts true/false.
**compress** (``MySQLi`` only) Whether or not to use client compression.
**compress** (``MySQLi`` only) Whether to use client compression.
**strictOn** (``MySQLi`` only) true/false (boolean) - Whether to force "Strict Mode" connections, good for ensuring
strict SQL while developing an application.
**port** The database port number - Empty string ``''`` for default port (or dynamic port with ``SQLSRV``).
**foreignKeys** (``SQLite3`` only) true/false (boolean) - Whether or not to enable Foreign Key constraint.
**foreignKeys** (``SQLite3`` only) true/false (boolean) - Whether to enable Foreign Key constraint.

.. important:: SQLite3 Foreign Key constraint is disabled by default.
See `SQLite documentation <https://www.sqlite.org/pragma.html#pragma_foreign_keys>`_.
To enforce Foreign Key constraint, set this config item to true.
**busyTimeout** (``SQLite3`` only) milliseconds (int) - Sleeps for a specified amount of time when a table is locked.
**numberNative** (``MySQLi`` only) true/false (boolean) - Whether or not to enable MYSQLI_OPT_INT_AND_FLOAT_NATIVE.
**numberNative** (``MySQLi`` only) true/false (boolean) - Whether to enable MYSQLI_OPT_INT_AND_FLOAT_NATIVE.
**dateFormat** The default date/time formats as PHP's `DateTime format`_.
* ``date`` - date format
* ``datetime`` - date and time format
Expand Down Expand Up @@ -225,4 +225,4 @@ MySQLi driver accepts an array with the following options:
* ``ssl_ca`` - Path to the certificate authority file
* ``ssl_capath`` - Path to a directory containing trusted CA certificates in PEM format
* ``ssl_cipher`` - List of *allowed* ciphers to be used for the encryption, separated by colons (``:``)
* ``ssl_verify`` - true/false; Whether to verify the server certificate or not
* ``ssl_verify`` - true/false (boolean) - Whether to verify the server certificate or not