Classe « Identity »
Signature de la constructeur __init__
def __init__(self, always=False, on_null=None, start=None, increment=None, minvalue=None, maxvalue=None, nominvalue=None, nomaxvalue=None, cycle=None, cache=None, order=None)
Description
__init__.__doc__
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.
: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.
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 :