Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
berkut1 committed Jul 18, 2024
1 parent 2c10fc0 commit cb740c3
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions docs/en/reference/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,21 @@ or ``null`` if no data is present.
it approximates precision which can lead to false assumptions in
applications.

real
+++++

Maps and converts single precision floating-point values.
This type is suitable for storing numeric data with approximate precision, where 4-byte (32-bit) storage is sufficient.
Single precision values typically have a wide range, accommodating most numerical requirements with a precision of up to 7 decimal digits.
Values retrieved from the database are always converted to PHP's ``float``/``double`` type or ``null`` if no data is present.

float
+++++

Maps and converts numeric data with floating-point precision.
If you only need an approximate precision for numbers with fractions, you should
consider using this type.
Values retrieved from the database are always converted to PHP's
Maps and converts double precision floating-point values.
This type is suitable for storing numeric data with higher precision, requiring 8-byte (64-bit) storage.
Double precision values typically offer an extensive range, meeting the demands of more precise calculations
with a precision of up to 15 decimal digits. Values retrieved from the database are always converted to PHP's
``float``/``double`` type or ``null`` if no data is present.

String types
Expand Down Expand Up @@ -572,6 +580,16 @@ Please also notice the mapping specific footnotes for additional information.
| | +--------------------------+ | |
| | | **SQLite** | | |
+-------------------+---------------+--------------------------+---------+----------------------------------------------------------+
| **real** | ``float`` | **MySQL** | *all* | ``FLOAT`` ``UNSIGNED`` [10] |
| | +--------------------------+---------+----------------------------------------------------------+
| | | **PostgreSQL** | *all* | ``REAL`` |
| | +--------------------------+ | |
| | | **Oracle** | | |
| | +--------------------------+ | |
| | | **SQL Server** | | |
| | +--------------------------+ | |
| | | **SQLite** | | |
+-------------------+---------------+--------------------------+---------+----------------------------------------------------------+
| **float** | ``float`` | **MySQL** | *all* | ``DOUBLE PRECISION`` ``UNSIGNED`` [10] |
| | +--------------------------+---------+----------------------------------------------------------+
| | | **PostgreSQL** | *all* | ``DOUBLE PRECISION`` |
Expand Down

0 comments on commit cb740c3

Please sign in to comment.