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 ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé
Module « sqlalchemy »

Classe « Interval »

Informations générales

Héritage

builtins.object
    Generic
builtins.object
    Visitable
        TypeEngine
builtins.object
    TypeEngineMixin
        ExternalType
builtins.object
    EventTarget
        SchemaEventTarget
            TypeDecorator
builtins.object
    Generic
builtins.object
    Visitable
        TypeEngine
builtins.object
    TypeEngineMixin
        HasExpressionLookup
            _AbstractInterval
    builtins.object
        TypeEngineMixin
            Emulated
                Interval

Définition

class Interval(Emulated, _AbstractInterval, TypeDecorator):

help(Interval)

A type for ``datetime.timedelta()`` objects.

The Interval type deals with ``datetime.timedelta`` objects.  In PostgreSQL
and Oracle Database, the native ``INTERVAL`` type is used; for others, the
value is stored as a date which is relative to the "epoch" (Jan. 1, 1970).

Note that the ``Interval`` type does not currently provide date arithmetic
operations on platforms which do not support interval types natively. Such
operations usually require transformation of both sides of the expression
(such as, conversion of both sides into integer epoch values first) which
currently is a manual procedure (such as via
:attr:`~sqlalchemy.sql.expression.func`).

Constructeur(s)

Signature du constructeur Description
__init__(self, native: 'bool' = True, second_precision: 'Optional[int]' = None, day_precision: 'Optional[int]' = None) Construct an Interval object. [extrait de __init__.__doc__]

Liste des attributs statiques

Nom de l'attribut Valeur
cache_okTrue
coerce_to_is_types(<class 'NoneType'>,)
dispatch<sqlalchemy.event.base.DDLEventsDispatch object at 0x0000020D9F843260>
epoch1970-01-01 00:00:00
hashableTrue
impl_instance<sqlalchemy.util.langhelpers._memoized_property object at 0x0000020D9F654E90>
render_bind_castFalse
render_literal_castFalse
should_evaluate_noneFalse

Attributs statiques hérités de la classe _AbstractInterval

sort_key_function

Liste des propriétés

Nom de la propriétéDescription
python_type
sort_key_function

Propriétés héritées de la classe TypeDecorator

comparator_factory

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
Signature de la méthodeDescription
adapt_to_emulated(self, impltype, **kw)
bind_processor(self, dialect: 'Dialect') -> '_BindProcessorType[dt.timedelta]'
coerce_compared_value(self, op, value)
Comparator(expr: 'ColumnElement[_CT]')
comparator_factory(expr: 'ColumnElement[_CT]')
result_processor(self, dialect: 'Dialect', coltype: 'Any') -> '_ResultProcessorType[dt.timedelta]'

Méthodes héritées de la classe TypeDecorator

__getattr__, __repr__, __subclasshook__, bind_expression, column_expression, compare_values, copy, get_dbapi_type, literal_processor, load_dialect_impl, process_bind_param, process_literal_param, process_result_value, type_engine

Méthodes héritées de la classe ExternalType

__init_subclass__

Méthodes héritées de la classe TypeEngine

__str__, adapt, as_generic, compile, copy_value, dialect_impl, evaluates_none, with_variant

Méthodes héritées de la classe Generic

__class_getitem__

Méthodes héritées de la classe Visitable

__class_getitem__

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __getstate__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__

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