Backend Types supportedΒΆ

This table give a comprehensive list of the SQL Types that are expected to be supported by the database backends. If the type is not supported then the backend will have to emulate the behavior described here.

The columns are in the following order:

  • The SQL type [1] representing the field

  • The python type expected on input

  • The python type received on output

None will represent the NULL value and vice versa, it can be used as input or output for any SQL type.

SQL Type

Python input type

Python output type

BOOL

bool

bool

INTEGER

int

int

BIGINT

int / long [2]

int / long [2]

FLOAT

float / int / long [2]

float

NUMERIC

decimal.Decimal

decimal.Decimal

VARCHAR / VARCHAR(length)

str / unicode [3]

str / unicode [3]

TEXT

str / unicode [3]

str / unicode [3]

TIMESTAMP

datetime.datetime

datetime.datetime

DATETIME

datetime.datetime without microseconds [4]

datetime.datetime without microseconds [4]

DATE

datetime.date

datetime.date

TIME

datetime.time

datetime.time

INTERVAL

datetime.timedelta

datetime.timedelta

BLOB

bytes

bytes