SAP DB:ODBC Guida di Installazione Pagina 190

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 225
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 189
mxODBC - Python ODBC Database Interface
12. mxODBC Globals and Constants
12.1 Subpackage Globals and Constants
Each mxODBC subpackage exports the following globals and constants:
BIND_USING_SQLTYPE, BIND_USING_PYTHONTYPE
Integer values returned by or used for setting connection.bindmethod and
cursor.bindmethod.
SQL type binding means that the interface queries the database to find out
which conversion to apply and which input type to expect, while Python type
binding looks at the parameters you pass to the methods to find out the type
information and then lets the database apply any conversions.
The bind method default is database dependent, but can also be adjusted on a
per connection or cursor basis.
CHAR, VARCHAR, LONGVARCHAR, BINARY, VARBINARY, LONGVARBINARY,
TINYINT, SMALLINT, INTEGER, BIGINT, DECIMAL, NUMERIC, BIT,
REAL, FLOAT, DOUBLE, DATE, TIME, TIMESTAMP [, CLOB, BLOB,
TYPE_DATE, TYPE_TIME, TYPE_TIMESTAMP, UNICODE,
UNICODE_LONGVARCHAR, UNICODE_VARCHAR, WCHAR, WVARCHAR,
WLONGVARCHAR]
ODBC 2.0 type code integers for the various natively supported SQL types.
These map to integers as returned in the type field of
cursor.description.
They are also available through the SQL singleton, e.g.
SQL.CHAR. The
dictionary
sqltype provides the inverse mapping.
The codes mentioned in square brackets are optional and only available if the
ODBC driver/manager supports a later ODBC version than 2.5.
Note that mxODBC has support for unknown SQL types: it returns these types
converted to strings. The conversion is done by the ODBC driver and may be
driver dependent.
DATETIME_DATETIMEFORMAT, PYDATETIME_DATETIMEFORMAT,
TIMEVALUE_DATETIMEFORMAT, TUPLE_DATETIMEFORMAT,
STRING_DATETIMEFORMAT
Integer values which are used by connection.datetimeformat and
cursor.datetimeformat.
mxODBC can handle different output formats for date/time values on a per
connection and per cursor basis. See the documentation of the two attributes
for more information.
168
Vedere la pagina 189
1 2 ... 185 186 187 188 189 190 191 192 193 194 195 ... 224 225

Commenti su questo manuale

Nessun commento