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

« back to all changes in this revision

Viewing changes to doc/dialects/maxdb.html

  • 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:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
 
 
4
 
<html xmlns="http://www.w3.org/1999/xhtml">
5
 
    <head>
6
 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
 
        
8
 
        <title>
9
 
            
10
 
    
11
 
                MaxDB
12
 
             &mdash; 
13
 
    SQLAlchemy 0.7 Documentation
14
 
 
15
 
        </title>
16
 
        
17
 
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
18
 
    <link rel="stylesheet" href="../_static/docs.css" type="text/css" />
19
 
 
20
 
    <script type="text/javascript">
21
 
      var DOCUMENTATION_OPTIONS = {
22
 
          URL_ROOT:    '../',
23
 
          VERSION:     '0.7.9',
24
 
          COLLAPSE_MODINDEX: false,
25
 
          FILE_SUFFIX: '.html'
26
 
      };
27
 
    </script>
28
 
        <script type="text/javascript" src="../_static/jquery.js"></script>
29
 
        <script type="text/javascript" src="../_static/underscore.js"></script>
30
 
        <script type="text/javascript" src="../_static/doctools.js"></script>
31
 
    <script type="text/javascript" src="../_static/init.js"></script>
32
 
    <link rel="index" title="Index" href="../genindex.html" />
33
 
    <link rel="search" title="Search" href="../search.html" />
34
 
        <link rel="copyright" title="Copyright" href="../copyright.html" />
35
 
    <link rel="top" title="SQLAlchemy 0.7 Documentation" href="../index.html" />
36
 
        <link rel="up" title="Dialects" href="index.html" />
37
 
        <link rel="next" title="Microsoft Access" href="access.html" />
38
 
        <link rel="prev" title="Informix" href="informix.html" />
39
 
 
40
 
    </head>
41
 
    <body>
42
 
        
43
 
 
44
 
 
45
 
 
46
 
 
47
 
 
48
 
 
49
 
 
50
 
 
51
 
 
52
 
 
53
 
<div id="docs-container">
54
 
 
55
 
 
56
 
 
57
 
<div id="docs-header">
58
 
    <h1>SQLAlchemy 0.7 Documentation</h1>
59
 
 
60
 
    <div id="docs-search">
61
 
    Search:
62
 
    <form class="search" action="../search.html" method="get">
63
 
      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
64
 
      <input type="hidden" name="check_keywords" value="yes" />
65
 
      <input type="hidden" name="area" value="default" />
66
 
    </form>
67
 
    </div>
68
 
 
69
 
    <div id="docs-version-header">
70
 
        Release: <span class="version-num">0.7.9</span> | Release Date: October 1, 2012
71
 
 
72
 
 
73
 
    </div>
74
 
 
75
 
</div>
76
 
 
77
 
<div id="docs-top-navigation">
78
 
    <div id="docs-top-page-control" class="docs-navigation-links">
79
 
        <ul>
80
 
            <li>Prev:
81
 
            <a href="informix.html" title="previous chapter">Informix</a>
82
 
            </li>
83
 
            <li>Next:
84
 
            <a href="access.html" title="next chapter">Microsoft Access</a>
85
 
            </li>
86
 
 
87
 
        <li>
88
 
            <a href="../contents.html">Table of Contents</a> |
89
 
            <a href="../genindex.html">Index</a>
90
 
            | <a href="../_sources/dialects/maxdb.txt">view source
91
 
        </li>
92
 
        </ul>
93
 
    </div>
94
 
 
95
 
    <div id="docs-navigation-banner">
96
 
        <a href="../index.html">SQLAlchemy 0.7 Documentation</a>
97
 
                » <a href="index.html" title="Dialects">Dialects</a>
98
 
        » 
99
 
                MaxDB
100
 
             
101
 
 
102
 
        <h2>
103
 
            
104
 
                MaxDB
105
 
            
106
 
        </h2>
107
 
    </div>
108
 
 
109
 
</div>
110
 
 
111
 
<div id="docs-body-container">
112
 
 
113
 
    <div id="docs-sidebar">
114
 
    <h3><a href="../index.html">Table of Contents</a></h3>
115
 
    <ul>
116
 
<li><a class="reference internal" href="#">MaxDB</a><ul>
117
 
<li><a class="reference internal" href="#overview">Overview</a></li>
118
 
<li><a class="reference internal" href="#connecting">Connecting</a></li>
119
 
<li><a class="reference internal" href="#implementation-notes">Implementation Notes</a><ul>
120
 
<li><a class="reference internal" href="#sapdb-dbapi">sapdb.dbapi</a></li>
121
 
</ul>
122
 
</li>
123
 
</ul>
124
 
</li>
125
 
</ul>
126
 
 
127
 
 
128
 
    <h4>Previous Topic</h4>
129
 
    <p>
130
 
    <a href="informix.html" title="previous chapter">Informix</a>
131
 
    </p>
132
 
    <h4>Next Topic</h4>
133
 
    <p>
134
 
    <a href="access.html" title="next chapter">Microsoft Access</a>
135
 
    </p>
136
 
 
137
 
 
138
 
    <h4>Quick Search</h4>
139
 
    <p>
140
 
    <form class="search" action="../search.html" method="get">
141
 
      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
142
 
      <input type="hidden" name="check_keywords" value="yes" />
143
 
      <input type="hidden" name="area" value="default" />
144
 
    </form>
145
 
    </p>
146
 
 
147
 
    </div>
148
 
 
149
 
    <div id="docs-body" class="withsidebar" >
150
 
        
151
 
<div class="section" id="module-sqlalchemy.dialects.maxdb.base">
152
 
<span id="maxdb"></span><span id="maxdb-toplevel"></span><h1>MaxDB<a class="headerlink" href="#module-sqlalchemy.dialects.maxdb.base" title="Permalink to this headline">¶</a></h1>
153
 
<p>Support for the MaxDB database.</p>
154
 
<div class="admonition note">
155
 
<p class="first admonition-title">Note</p>
156
 
<p class="last">The MaxDB dialect is <strong>non-functional as of SQLAlchemy 0.6</strong>,
157
 
pending development efforts to bring it up-to-date.</p>
158
 
</div>
159
 
<div class="section" id="overview">
160
 
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
161
 
<p>The <tt class="docutils literal"><span class="pre">maxdb</span></tt> dialect is <strong>experimental</strong> and has only been tested on 7.6.03.007
162
 
and 7.6.00.037.  Of these, <strong>only 7.6.03.007 will work</strong> with SQLAlchemy&#8217;s ORM.
163
 
The earlier version has severe <tt class="docutils literal"><span class="pre">LEFT</span> <span class="pre">JOIN</span></tt> limitations and will return
164
 
incorrect results from even very simple ORM queries.</p>
165
 
<p>Only the native Python DB-API is currently supported.  ODBC driver support
166
 
is a future enhancement.</p>
167
 
</div>
168
 
<div class="section" id="connecting">
169
 
<h2>Connecting<a class="headerlink" href="#connecting" title="Permalink to this headline">¶</a></h2>
170
 
<p>The username is case-sensitive.  If you usually connect to the
171
 
database with sqlcli and other tools in lower case, you likely need to
172
 
use upper case for DB-API.</p>
173
 
</div>
174
 
<div class="section" id="implementation-notes">
175
 
<h2>Implementation Notes<a class="headerlink" href="#implementation-notes" title="Permalink to this headline">¶</a></h2>
176
 
<p>With the 7.6.00.37 driver and Python 2.5, it seems that all DB-API
177
 
generated exceptions are broken and can cause Python to crash.</p>
178
 
<p>For &#8216;somecol.in_([])&#8217; to work, the IN operator&#8217;s generation must be changed
179
 
to cast &#8216;NULL&#8217; to a numeric, i.e. NUM(NULL).  The DB-API doesn&#8217;t accept a
180
 
bind parameter there, so that particular generation must inline the NULL value,
181
 
which depends on [ticket:807].</p>
182
 
<p>The DB-API is very picky about where bind params may be used in queries.</p>
183
 
<p>Bind params for some functions (e.g. MOD) need type information supplied.
184
 
The dialect does not yet do this automatically.</p>
185
 
<p>Max will occasionally throw up &#8216;bad sql, compile again&#8217; exceptions for
186
 
perfectly valid SQL.  The dialect does not currently handle these, more
187
 
research is needed.</p>
188
 
<p>MaxDB 7.5 and Sap DB &lt;= 7.4 reportedly do not support schemas.  A very
189
 
slightly different version of this dialect would be required to support
190
 
those versions, and can easily be added if there is demand.  Some other
191
 
required components such as an Max-aware &#8216;old oracle style&#8217; join compiler
192
 
(thetas with (+) outer indicators) are already done and available for
193
 
integration- email the devel list if you&#8217;re interested in working on
194
 
this.</p>
195
 
<p>Versions tested: 7.6.03.07 and 7.6.00.37, native Python DB-API</p>
196
 
<ul class="simple">
197
 
<li>MaxDB has severe limitations on OUTER JOINs, which are essential to ORM
198
 
eager loading. And rather than raise an error if a SELECT can&#8217;t be serviced,
199
 
the database simply returns incorrect results.</li>
200
 
<li>Version 7.6.03.07 seems to JOIN properly, however the docs do not show the
201
 
OUTER restrictions being lifted (as of this writing), and no changelog is
202
 
available to confirm either. If you are using a different server version and
203
 
your tasks require the ORM or any semi-advanced SQL through the SQL layer,
204
 
running the SQLAlchemy test suite against your database is HIGHLY
205
 
recommended before you begin.</li>
206
 
<li>Version 7.6.00.37 is LHS/RHS sensitive in <cite>FROM lhs LEFT OUTER JOIN rhs ON
207
 
lhs.col=rhs.col</cite> vs <cite>rhs.col=lhs.col</cite>!</li>
208
 
<li>Version 7.6.00.37 is confused by <cite>SELECT DISTINCT col as alias FROM t ORDER
209
 
BY col</cite> - these aliased, DISTINCT, ordered queries need to be re-written to
210
 
order by the alias name.</li>
211
 
<li>Version 7.6.x supports creating a SAVEPOINT but not its RELEASE.</li>
212
 
<li>MaxDB supports autoincrement-style columns (DEFAULT SERIAL) and independent
213
 
sequences. When including a DEFAULT SERIAL column in an insert, 0 needs to
214
 
be inserted rather than NULL to generate a value.</li>
215
 
<li>MaxDB supports ANSI and &#8220;old Oracle style&#8221; theta joins with (+) outer join
216
 
indicators.</li>
217
 
<li>The SQLAlchemy dialect is schema-aware and probably won&#8217;t function correctly
218
 
on server versions (pre-7.6?). Support for schema-less server versions could
219
 
be added if there&#8217;s call.</li>
220
 
<li>ORDER BY is not supported in subqueries. LIMIT is not supported in
221
 
subqueries. In 7.6.00.37, TOP does work in subqueries, but without limit not
222
 
so useful. OFFSET does not work in 7.6 despite being in the docs. Row number
223
 
tricks in WHERE via ROWNO may be possible but it only seems to allow
224
 
less-than comparison!</li>
225
 
<li>Version 7.6.03.07 can&#8217;t LIMIT if a derived table is in FROM: <cite>SELECT * FROM
226
 
(SELECT * FROM a) LIMIT 2</cite></li>
227
 
<li>MaxDB does not support sql&#8217;s CAST and can only usefullly cast two types.
228
 
There isn&#8217;t much implicit type conversion, so be precise when creating
229
 
<cite>PassiveDefaults</cite> in DDL generation: <cite>&#8216;3&#8217;</cite> and <cite>3</cite> aren&#8217;t the same.</li>
230
 
</ul>
231
 
<div class="section" id="sapdb-dbapi">
232
 
<h3>sapdb.dbapi<a class="headerlink" href="#sapdb-dbapi" title="Permalink to this headline">¶</a></h3>
233
 
<ul class="simple">
234
 
<li>As of 2007-10-22 the Python 2.4 and 2.5 compatible versions of the DB-API
235
 
are no longer available. A forum posting at SAP states that the Python
236
 
driver will be available again &#8220;in the future&#8221;. The last release from MySQL
237
 
AB works if you can find it.</li>
238
 
<li>sequence.NEXTVAL skips every other value!</li>
239
 
<li>No rowcount for executemany()</li>
240
 
<li>If an INSERT into a table with a DEFAULT SERIAL column inserts the results
241
 
of a function <cite>INSERT INTO t VALUES (LENGTH(&#8216;foo&#8217;))</cite>, the cursor won&#8217;t have
242
 
the serial id. It needs to be manually yanked from tablename.CURRVAL.</li>
243
 
<li>Super-duper picky about where bind params can be placed. Not smart about
244
 
converting Python types for some functions, such as <cite>MOD(5, ?)</cite>.</li>
245
 
<li>LONG (text, binary) values in result sets are read-once. The dialect uses a
246
 
caching RowProxy when these types are present.</li>
247
 
<li>Connection objects seem like they want to be either <a href="#id1"><span class="problematic" id="id2">`</span></a>close()`d or garbage
248
 
collected, but not both. There&#8217;s a warning issued but it seems harmless.</li>
249
 
</ul>
250
 
</div>
251
 
</div>
252
 
</div>
253
 
 
254
 
    </div>
255
 
 
256
 
</div>
257
 
 
258
 
<div id="docs-bottom-navigation" class="docs-navigation-links">
259
 
        Previous:
260
 
        <a href="informix.html" title="previous chapter">Informix</a>
261
 
        Next:
262
 
        <a href="access.html" title="next chapter">Microsoft Access</a>
263
 
 
264
 
    <div id="docs-copyright">
265
 
        &copy; <a href="../copyright.html">Copyright</a> 2007-2012, the SQLAlchemy authors and contributors.
266
 
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
267
 
    </div>
268
 
</div>
269
 
 
270
 
</div>
271
 
 
272
 
        
273
 
    </body>
274
 
</html>
275
 
 
276