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 ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Classe « Identity »

Constructeur sqlalchemy.Identity.__init__

Signature de la constructeur __init__

def __init__(self, always: 'bool' = False, on_null: 'Optional[bool]' = None, start: 'Optional[int]' = None, increment: 'Optional[int]' = None, minvalue: 'Optional[int]' = None, maxvalue: 'Optional[int]' = None, nominvalue: 'Optional[bool]' = None, nomaxvalue: 'Optional[bool]' = None, cycle: 'Optional[bool]' = None, cache: 'Optional[int]' = None, order: 'Optional[bool]' = None) -> 'None' 

Description

help(Identity.__init__)

Construct a GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY DDL
construct to accompany a :class:`_schema.Column`.

See the :class:`.Sequence` documentation for a complete description
of most parameters.

.. note::
    MSSQL supports this construct as the preferred alternative to
    generate an IDENTITY on a column, but it uses non standard
    syntax that only support :paramref:`_schema.Identity.start`
    and :paramref:`_schema.Identity.increment`.
    All other parameters are ignored.

:param always:
  A boolean, that indicates the type of identity column.
  If ``False`` is specified, the default, then the user-specified
  value takes precedence.
  If ``True`` is specified, a user-specified value is not accepted (
  on some backends, like PostgreSQL, OVERRIDING SYSTEM VALUE, or
  similar, may be specified in an INSERT to override the sequence
  value).
  Some backends also have a default value for this parameter,
  ``None`` can be used to omit rendering this part in the DDL. It
  will be treated as ``False`` if a backend does not have a default
  value.

:param on_null:
  Set to ``True`` to specify ON NULL in conjunction with a
  ``always=False`` identity column. This option is only supported on
  some backends, like Oracle Database.

:param start: the starting index of the sequence.
:param increment: the increment value of the sequence.
:param minvalue: the minimum value of the sequence.
:param maxvalue: the maximum value of the sequence.
:param nominvalue: no minimum value of the sequence.
:param nomaxvalue: no maximum value of the sequence.
:param cycle: allows the sequence to wrap around when the maxvalue
 or minvalue has been reached.
:param cache: optional integer value; number of future values in the
 sequence which are calculated in advance.
:param order: optional boolean value; if true, renders the
 ORDER keyword.



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