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 |
|
int |
int |
|
int / long [2] |
int / long [2] |
|
float / int / long [2] |
float |
|
||
|
str / unicode [3] |
str / unicode [3] |
|
str / unicode [3] |
str / unicode [3] |
|
||
|
datetime.datetime without microseconds [4] |
datetime.datetime without microseconds [4] |
|
||
|
||
|
||
|
bytes |
bytes |
in python 2 integers over sys.maxint are represented by the
long
type
str when using python 3 ; unicode when using python 2
Datetime objects are not localized to any timezone