Module « sqlalchemy »
Classe « Sequence »
Informations générales
Héritage
builtins.object
Traversible
builtins.object
SchemaEventTarget
SchemaItem
builtins.object
HasMemoized
Generative
builtins.object
SQLRole
StatementRole
Executable
DefaultGenerator
builtins.object
IdentityOptions
Sequence
Définition
class Sequence(IdentityOptions, DefaultGenerator):
Description [extrait de Sequence.__doc__]
Represents a named database sequence.
The :class:`.Sequence` object represents the name and configurational
parameters of a database sequence. It also represents
a construct that can be "executed" by a SQLAlchemy :class:`_engine.Engine`
or :class:`_engine.Connection`,
rendering the appropriate "next value" function
for the target database and returning a result.
The :class:`.Sequence` is typically associated with a primary key column::
some_table = Table(
'some_table', metadata,
Column('id', Integer, Sequence('some_table_seq'),
primary_key=True)
)
When CREATE TABLE is emitted for the above :class:`_schema.Table`, if the
target platform supports sequences, a CREATE SEQUENCE statement will
be emitted as well. For platforms that don't support sequences,
the :class:`.Sequence` construct is ignored.
.. seealso::
:ref:`defaults_sequences`
:class:`.CreateSequence`
:class:`.DropSequence`
Constructeur(s)
__init__(self, name, start=None, increment=None, minvalue=None, maxvalue=None, nominvalue=None, nomaxvalue=None, cycle=None, schema=None, cache=None, order=None, data_type=None, optional=False, quote=None, metadata=None, quote_schema=None, for_update=False) |
Construct a :class:`.Sequence` object. [extrait de __init__.__doc__] |
Liste des attributs statiques
allows_lambda | False |
column | None |
create_drop_stringify_dialect | default |
dispatch | <sqlalchemy.event.base.DDLEventsDispatch object at 0x7f40cbc2af40> |
info | <sqlalchemy.util.langhelpers.memoized_property object at 0x7f40cbc85d20> |
is_callable | <sqlalchemy.util.langhelpers.memoized_property object at 0x7f40cbae8b50> |
is_clause_element | <sqlalchemy.util.langhelpers.memoized_property object at 0x7f40cbaea860> |
is_delete | False |
is_dml | False |
is_insert | False |
is_select | False |
is_sequence | True |
is_server_default | False |
is_text | False |
is_update | False |
supports_execution | True |
uses_inspection | False |
Liste des opérateurs
Opérateurs hérités de la classe object
__eq__,
__ge__,
__gt__,
__le__,
__lt__,
__ne__
Liste des méthodes
Toutes les méthodes
Méthodes d'instance
Méthodes statiques
Méthodes dépréciées
Méthodes héritées de la classe DefaultGenerator
__init_subclass__, __subclasshook__, execute
Méthodes héritées de la classe SchemaItem
__repr__
Méthodes héritées de la classe Traversible
__class_getitem__, get_children
Méthodes héritées de la classe Executable
execution_options, get_execution_options, options, scalar
Méthodes héritées de la classe HasMemoized
memoized_attribute, memoized_instancemethod
Méthodes héritées de la classe object
__delattr__,
__dir__,
__format__,
__getattribute__,
__hash__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__str__
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 :