Installation guide

9. DB-API Type Objects and Constructors
TimeFromTicks(ticks)
This function constructs an mxDateTime DateTimeDelta object holding a time
value from the given ticks value (number of seconds since the epoch; see the
documentation of the standard Python
time module for details).
TimestampFromTicks(ticks)
This function constructs an mxDateTime DateTime object holding a time
stamp value from the given ticks value (number of seconds since the epoch;
see the documentation of the standard Python
time module for details).
Usage of Unix ticks (number of seconds since the Epoch) for date/time
database interfacing can cause troubles because of the limited date range they
cover.
Binary(string)
This function constructs a buffer object pointing to the (long) string value. On
Python versions without buffer objects (prior to 1.5.2), the string is taken as is.
STRING
This type object is used to describe columns in a database that are string-
based:
SQL.CHAR, SQL.BINARY.
BINARY
This type object is used to describe (long) binary columns in a database:
SQL.LONGVARCHAR, SQL.LONGVARBINARY (e.g. LONG, RAW, BLOB, TEXT).
NUMBER
This type object is used to describe numeric columns in a database:
SQL.DECIMAL, SQL.NUMERIC, SQL.DOUBLE, SQL.FLOAT, SQL.REAL,
SQL.DOUBLE, SQL.INTEGER, SQL.TINYINT, SQL.SMALLINT, SQL.BIT,
SQL.BIGINT.
DATETIME
This type object is used to describe date/time columns in a database:
SQL.DATE, SQL.TIME, SQL.TIMESTAMP.
ROWID
This type object is used to describe the "Row ID" column in a database.
mxODBC does not support this special column type and thus no type code is
equal to this type object.
SQL NULL values are represented by the Python None singleton on input and
output.
157