~ubuntu-branches/debian/jessie/sqlalchemy/jessie

« back to all changes in this revision

Viewing changes to doc/_sources/core/engines.txt

  • Committer: Package Import Robot
  • Author(s): Piotr Ożarowski, Jakub Wilk, Piotr Ożarowski
  • Date: 2013-07-06 20:53:52 UTC
  • mfrom: (1.4.23) (16.1.17 experimental)
  • Revision ID: package-import@ubuntu.com-20130706205352-ryppl1eto3illd79
Tags: 0.8.2-1
[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.

[ Piotr Ożarowski ]
* New upstream release
* Upload to unstable
* Build depend on python3-all instead of -dev, extensions are not built for
  Python 3.X 

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
Engine Configuration
5
5
====================
6
6
 
7
 
The **Engine** is the starting point for any SQLAlchemy application. It's
8
 
"home base" for the actual database and its DBAPI, delivered to the SQLAlchemy
9
 
application through a connection pool and a **Dialect**, which describes how
 
7
The :class:`.Engine` is the starting point for any SQLAlchemy application. It's
 
8
"home base" for the actual database and its :term:`DBAPI`, delivered to the SQLAlchemy
 
9
application through a connection pool and a :class:`.Dialect`, which describes how
10
10
to talk to a specific kind of database/DBAPI combination.
11
11
 
12
12
The general structure can be illustrated as follows:
13
13
 
14
14
.. image:: sqla_engine_arch.png
15
15
 
16
 
Where above, an :class:`~sqlalchemy.engine.base.Engine` references both a
17
 
:class:`~sqlalchemy.engine.base.Dialect` and a :class:`~sqlalchemy.pool.Pool`,
 
16
Where above, an :class:`.Engine` references both a
 
17
:class:`.Dialect` and a :class:`.Pool`,
18
18
which together interpret the DBAPI's module functions as well as the behavior
19
19
of the database.
20
20
 
45
45
Supported Databases
46
46
====================
47
47
 
48
 
SQLAlchemy includes many :class:`~sqlalchemy.engine.base.Dialect` implementations for various
49
 
backends; each is described as its own package in the :ref:`sqlalchemy.dialects_toplevel` package.  A
50
 
SQLAlchemy dialect always requires that an appropriate DBAPI driver is installed.
51
 
 
52
 
The table below summarizes the state of DBAPI support in SQLAlchemy 0.7.  The values
53
 
translate as:
54
 
 
55
 
* yes / Python platform - The SQLAlchemy dialect is mostly or fully operational on the target platform.
56
 
* yes / OS platform - The DBAPI supports that platform.
57
 
* no / Python platform - The DBAPI does not support that platform, or there is no SQLAlchemy dialect support.
58
 
* no / OS platform - The DBAPI does not support that platform.
59
 
* partial - the DBAPI is partially usable on the target platform but has major unresolved issues.
60
 
* development - a development version of the dialect exists, but is not yet usable.
61
 
* thirdparty - the dialect itself is maintained by a third party, who should be consulted for
62
 
  information on current support.
63
 
* \* - indicates the given DBAPI is the "default" for SQLAlchemy, i.e. when just the database name is specified
64
 
 
65
 
===============================================================  ===========================  ===========  ===========   ===========  =================  ============
66
 
Driver                                                           Connect string               Py2K         Py3K          Jython       Unix               Windows
67
 
===============================================================  ===========================  ===========  ===========   ===========  =================  ============
68
 
**DB2/Informix IDS**
69
 
ibm-db_                                                          thirdparty                   thirdparty   thirdparty    thirdparty   thirdparty         thirdparty
70
 
**Drizzle** :ref:`(docs) <drizzle_toplevel>`
71
 
mysql-python_                                                    ``drizzle+mysqldb``\*        yes          development   no           yes                yes
72
 
**Firebird / Interbase** :ref:`(docs) <firebird_toplevel>`
73
 
kinterbasdb_                                                     ``firebird+kinterbasdb``\*   yes          development   no           yes                yes
74
 
**Informix** :ref:`(docs) <informix_toplevel>`
75
 
informixdb_                                                      ``informix+informixdb``\*    yes          development   no           unknown            unknown
76
 
**MaxDB** :ref:`(docs) <maxdb_toplevel>`
77
 
sapdb_                                                           ``maxdb+sapdb``\*            development  development   no           yes                unknown
78
 
**Microsoft Access** :ref:`(docs) <access_toplevel>`
79
 
pyodbc_                                                          ``access+pyodbc``\*          development  development   no           unknown            yes
80
 
**Microsoft SQL Server** :ref:`(docs) <mssql_toplevel>`
81
 
adodbapi_                                                        ``mssql+adodbapi``           development  development   no           no                 yes
82
 
`jTDS JDBC Driver`_                                              ``mssql+zxjdbc``             no           no            development  yes                yes
83
 
mxodbc_                                                          ``mssql+mxodbc``             yes          development   no           yes with FreeTDS_  yes
84
 
pyodbc_                                                          ``mssql+pyodbc``\*           yes          development   no           yes with FreeTDS_  yes
85
 
pymssql_                                                         ``mssql+pymssql``            yes          development   no           yes                yes
86
 
**MySQL** :ref:`(docs) <mysql_toplevel>`
87
 
`MySQL Connector/J`_                                             ``mysql+zxjdbc``             no           no            yes          yes                yes
88
 
`MySQL Connector/Python`_                                        ``mysql+mysqlconnector``     yes          development   no           yes                yes
89
 
mysql-python_                                                    ``mysql+mysqldb``\*          yes          development   no           yes                yes
90
 
OurSQL_                                                          ``mysql+oursql``             yes          yes           no           yes                yes
91
 
pymysql_                                                         ``mysql+pymysql``            yes          development   no           yes                yes
92
 
rdbms_ (Google Appengine)                                        ``mysql+gaerdbms``           yes          development   no           no                 no
93
 
**Oracle** :ref:`(docs) <oracle_toplevel>`
94
 
cx_oracle_                                                       ``oracle+cx_oracle``\*       yes          development   no           yes                yes
95
 
`Oracle JDBC Driver`_                                            ``oracle+zxjdbc``            no           no            yes          yes                yes
96
 
**Postgresql** :ref:`(docs) <postgresql_toplevel>`
97
 
pg8000_                                                          ``postgresql+pg8000``        yes          yes           no           yes                yes
98
 
`PostgreSQL JDBC Driver`_                                        ``postgresql+zxjdbc``        no           no            yes          yes                yes
99
 
psycopg2_                                                        ``postgresql+psycopg2``\*    yes          yes           no           yes                yes
100
 
pypostgresql_                                                    ``postgresql+pypostgresql``  no           yes           no           yes                yes
101
 
**SQLite** :ref:`(docs) <sqlite_toplevel>`
102
 
pysqlite_                                                        ``sqlite+pysqlite``\*        yes          yes           no           yes                yes
103
 
sqlite3_                                                         ``sqlite+pysqlite``\*        yes          yes           no           yes                yes
104
 
**Sybase ASE** :ref:`(docs) <sybase_toplevel>`
105
 
mxodbc_                                                          ``sybase+mxodbc``            development  development   no           yes                yes
106
 
pyodbc_                                                          ``sybase+pyodbc``\*          partial      development   no           unknown            unknown
107
 
python-sybase_                                                   ``sybase+pysybase``          yes [1]_     development   no           yes                yes
108
 
===============================================================  ===========================  ===========  ===========   ===========  =================  ============
109
 
 
110
 
.. [1] The Sybase dialect currently lacks the ability to reflect tables.
111
 
.. _psycopg2: http://www.initd.org/
112
 
.. _pg8000: http://pybrary.net/pg8000/
113
 
.. _pypostgresql: http://python.projects.postgresql.org/
114
 
.. _mysql-python: http://sourceforge.net/projects/mysql-python
115
 
.. _MySQL Connector/Python: https://launchpad.net/myconnpy
116
 
.. _OurSQL: http://packages.python.org/oursql/
117
 
.. _pymysql: http://code.google.com/p/pymysql/
118
 
.. _rdbms: https://developers.google.com/cloud-sql/docs/developers_guide_python
119
 
.. _PostgreSQL JDBC Driver: http://jdbc.postgresql.org/
120
 
.. _sqlite3: http://docs.python.org/library/sqlite3.html
121
 
.. _pysqlite: http://pypi.python.org/pypi/pysqlite/
122
 
.. _MySQL Connector/J: http://dev.mysql.com/downloads/connector/j/
123
 
.. _cx_Oracle: http://cx-oracle.sourceforge.net/
124
 
.. _Oracle JDBC Driver: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
125
 
.. _kinterbasdb:  http://firebirdsql.org/index.php?op=devel&sub=python
126
 
.. _pyodbc: http://code.google.com/p/pyodbc/
127
 
.. _mxodbc: http://www.egenix.com/products/python/mxODBC/
128
 
.. _FreeTDS: http://www.freetds.org/
129
 
.. _adodbapi: http://adodbapi.sourceforge.net/
130
 
.. _pymssql: http://code.google.com/p/pymssql/
131
 
.. _jTDS JDBC Driver: http://jtds.sourceforge.net/
132
 
.. _ibm-db: http://code.google.com/p/ibm-db/
133
 
.. _informixdb: http://informixdb.sourceforge.net/
134
 
.. _sapdb: http://www.sapdb.org/sapdbapi.html
135
 
.. _python-sybase: http://python-sybase.sourceforge.net/
136
 
 
137
 
Further detail on dialects is available at :ref:`dialect_toplevel`.
 
48
SQLAlchemy includes many :class:`.Dialect` implementations for various
 
49
backends.   Dialects for the most common databases are included with SQLAlchemy; a handful
 
50
of others require an additional install of a separate dialect.
 
51
 
 
52
See the section :ref:`dialect_toplevel` for information on the various backends available.
 
53
 
138
54
 
139
55
 
140
56
.. _create_engine_args:
352
268
 
353
269
The ``echo`` flags present as keyword arguments to
354
270
:func:`~sqlalchemy.create_engine` and others as well as the ``echo`` property
355
 
on :class:`~sqlalchemy.engine.base.Engine`, when set to ``True``, will first
 
271
on :class:`~sqlalchemy.engine.Engine`, when set to ``True``, will first
356
272
attempt to ensure that logging is enabled. Unfortunately, the ``logging``
357
273
module provides no way of determining if output has already been configured
358
274
(note we are referring to if a logging configuration has been set up, not just
364
280
**when using Python logging, ensure all echo flags are set to False at all
365
281
times**, to avoid getting duplicate log lines.
366
282
 
367
 
The logger name of instance such as an :class:`~sqlalchemy.engine.base.Engine`
 
283
The logger name of instance such as an :class:`~sqlalchemy.engine.Engine`
368
284
or :class:`~sqlalchemy.pool.Pool` defaults to using a truncated hex identifier
369
285
string. To set this to a specific name, use the "logging_name" and
370
286
"pool_logging_name" keyword arguments with :func:`sqlalchemy.create_engine`.