SQLAlchemy 0.3 Documentation
- class BLOB(Binary)
- class BOOLEAN(Boolean)
- class Binary(TypeEngine)
- class Boolean(TypeEngine)
- class CHAR(String)
- class CLOB(TEXT)
- class DATE(Date)
- class DATETIME(DateTime)
- class DECIMAL(Numeric)
- class Date(TypeEngine)
- class DateTime(TypeEngine)
- class FLOAT(Float)
- class Float(Numeric)
- class INT(Integer)
- class Integer(TypeEngine)
- class Interval(TypeDecorator)
- class NCHAR(Unicode)
- class NullTypeEngine(TypeEngine)
- class Numeric(TypeEngine)
- class PickleType(MutableType,TypeDecorator)
- class SMALLINT(SmallInteger)
- class SmallInteger(Integer)
- class String(TypeEngine)
- class TEXT(String)
- class TIME(Time)
- class TIMESTAMP(DateTime)
- class Time(TypeEngine)
- class TypeDecorator(AbstractType)
- class TypeEngine(AbstractType)
- class Unicode(String)
- class VARCHAR(String)
module sqlalchemy.types
class BLOB(Binary)
back to section topclass BOOLEAN(Boolean)
back to section topclass Binary(TypeEngine)
back to section topclass Boolean(TypeEngine)
back to section topclass CHAR(String)
back to section topclass CLOB(TEXT)
back to section topclass DATE(Date)
back to section topclass DATETIME(DateTime)
back to section topclass DECIMAL(Numeric)
back to section topclass FLOAT(Float)
back to section topclass Float(Numeric)
back to section topclass INT(Integer)
back to section topclass Interval(TypeDecorator)
Type to be used in Column statements to store python timedeltas.
If it's possible it uses native engine features to store timedeltas (now it's only PostgreSQL Interval type), if there is no such it fallbacks to DateTime storage with converting from/to timedelta on the fly
Converting is very simple - just use epoch(zero timestamp, 01.01.1970) as base, so if we need to store timedelta = 1 day (24 hours) in database it will be stored as DateTime = '2nd Jan 1970 00:00', see convert_bind_param and convert_result_value to actual conversion code
Checks if engine has native implementation of timedelta python type, if so it returns right class to handle it, if there is no native support, it fallback to engine's DateTime implementation class
class NCHAR(Unicode)
back to section topclass NullTypeEngine(TypeEngine)
back to section topclass Numeric(TypeEngine)
back to section topclass PickleType(MutableType,TypeDecorator)
back to section topclass SMALLINT(SmallInteger)
back to section topclass String(TypeEngine)
back to section topclass TEXT(String)
back to section topclass TIME(Time)
back to section topclass TIMESTAMP(DateTime)
back to section topclass TypeDecorator(AbstractType)
loads the dialect-specific implementation of this type.
by default calls dialect.type_descriptor(self.impl), but can be overridden to provide different behavior.
class TypeEngine(AbstractType)
return a list of classes to test for a match when adapting this type to a dialect-specific type.
