From cb740c32e9e9c319d68e44389440752c381ea278 Mon Sep 17 00:00:00 2001 From: berkut1 Date: Wed, 17 Jul 2024 00:03:39 +0300 Subject: [PATCH] update doc --- docs/en/reference/types.rst | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/en/reference/types.rst b/docs/en/reference/types.rst index deaf5c85d7d..841e9675fe6 100644 --- a/docs/en/reference/types.rst +++ b/docs/en/reference/types.rst @@ -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 @@ -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`` |