Logo Search packages:      
Sourcecode: sqlalchemy version File versions  Download package

sqlalchemy::types::Interval Class Reference

Inheritance diagram for sqlalchemy::types::Interval:

sqlalchemy::types::_DateAffinity sqlalchemy::types::TypeDecorator sqlalchemy::sql::visitors::Visitable

List of all members.

Detailed Description

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

The Interval type deals with ``datetime.timedelta`` objects.  In
PostgreSQL, 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`).

Definition at line 1562 of file types.py.

Public Member Functions

def __getattr__
def __init__
def __init__
def __repr__
def adapt
def bind_processor
def coerce_compared_value
def compare_values
def compile
def copy
def copy_value
def dialect_impl
def get_dbapi_type
def is_mutable
def load_dialect_impl
def process_bind_param
def process_result_value
def result_processor
def type_engine

Public Attributes


Static Public Attributes

tuple epoch = dt.datetime.utcfromtimestamp(0)
 impl = DateTime

Private Member Functions

def _coerce_compared_value
def _expression_adaptations
def _type_affinity

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index