Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé
Classe « DOUBLE »

Constructeur sqlalchemy.DOUBLE.__init__

Signature de la constructeur __init__

def __init__(self: 'Float[_N]', precision: 'Optional[int]' = None, asdecimal: 'bool' = False, decimal_return_scale: 'Optional[int]' = None) 

Description

help(DOUBLE.__init__)

Construct a Float.

:param precision: the numeric precision for use in DDL ``CREATE
   TABLE``. Backends **should** attempt to ensure this precision
   indicates a number of digits for the generic
   :class:`_sqltypes.Float` datatype.

   .. note:: For the Oracle Database backend, the
      :paramref:`_sqltypes.Float.precision` parameter is not accepted
      when rendering DDL, as Oracle Database does not support float precision
      specified as a number of decimal places. Instead, use the
      Oracle Database-specific :class:`_oracle.FLOAT` datatype and specify the
      :paramref:`_oracle.FLOAT.binary_precision` parameter. This is new
      in version 2.0 of SQLAlchemy.

      To create a database agnostic :class:`_types.Float` that
      separately specifies binary precision for Oracle Database, use
      :meth:`_types.TypeEngine.with_variant` as follows::

            from sqlalchemy import Column
            from sqlalchemy import Float
            from sqlalchemy.dialects import oracle

            Column(
                "float_data",
                Float(5).with_variant(oracle.FLOAT(binary_precision=16), "oracle"),
            )

:param asdecimal: the same flag as that of :class:`.Numeric`, but
  defaults to ``False``.   Note that setting this flag to ``True``
  results in floating point conversion.

:param decimal_return_scale: Default scale to use when converting
 from floats to Python decimals.  Floating point values will typically
 be much longer due to decimal inaccuracy, and most floating point
 database types don't have a notion of "scale", so by default the
 float type looks for the first ten decimal places when converting.
 Specifying this value will override that length.  Note that the
 MySQL float types, which do include "scale", will use "scale"
 as the default for decimal_return_scale, if not otherwise specified.



Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé