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

« back to all changes in this revision

Viewing changes to doc/dialects/oracle.html

  • Committer: Package Import Robot
  • Author(s): Piotr Ożarowski
  • Date: 2012-06-17 23:25:01 UTC
  • mfrom: (1.4.21)
  • Revision ID: package-import@ubuntu.com-20120617232501-1ey18snu5pv5ivfv
Tags: 0.7.8-1
* New upstream release
* Add hardening flags (via /usr/share/dpkg/buildflags.mk)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    <script type="text/javascript">
21
21
      var DOCUMENTATION_OPTIONS = {
22
22
          URL_ROOT:    '../',
23
 
          VERSION:     '0.7.7',
 
23
          VERSION:     '0.7.8',
24
24
          COLLAPSE_MODINDEX: false,
25
25
          FILE_SUFFIX: '.html'
26
26
      };
67
67
    </div>
68
68
 
69
69
    <div id="docs-version-header">
70
 
        Release: <span class="version-num">0.7.7</span> | Release Date: May 5, 2012
 
70
        Release: <span class="version-num">0.7.8</span> | Release Date: June 16, 2012
71
71
 
72
72
 
73
73
    </div>
216
216
</div>
217
217
<div class="section" id="unicode">
218
218
<h2>Unicode<a class="headerlink" href="#unicode" title="Permalink to this headline">¶</a></h2>
219
 
<p>SQLAlchemy 0.6 uses the &#8220;native unicode&#8221; mode provided as of cx_oracle 5.  cx_oracle 5.0.2
220
 
or greater is recommended for support of NCLOB.   If not using cx_oracle 5, the NLS_LANG
221
 
environment variable needs to be set in order for the oracle client library to use 
222
 
proper encoding, such as &#8220;AMERICAN_AMERICA.UTF8&#8221;.</p>
 
219
<p class="versionchanged">
 
220
<span class="versionmodified">Changed in version 0.6: </span>SQLAlchemy uses the &#8220;native unicode&#8221; mode provided as of cx_oracle 5.
 
221
cx_oracle 5.0.2 or greater is recommended for support of NCLOB.
 
222
If not using cx_oracle 5, the NLS_LANG environment variable needs
 
223
to be set in order for the oracle client library to use proper encoding,
 
224
such as &#8220;AMERICAN_AMERICA.UTF8&#8221;.</p>
223
225
<p>Also note that Oracle supports unicode data through the NVARCHAR and NCLOB data types.
224
226
When using the SQLAlchemy Unicode and UnicodeText types, these DDL types will be used
225
227
within CREATE TABLE statements.   Usage of VARCHAR2 and CLOB with unicode text still 
589
591
<div class="highlight-python"><div class="highlight"><pre><span class="n">engine</span> <span class="o">=</span> <span class="n">create_engine</span><span class="p">(</span><span class="s">&quot;oracle+cx_oracle://dsn&quot;</span><span class="p">,</span> 
590
592
                    <span class="n">coerce_to_decimal</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span></pre></div>
591
593
</div>
592
 
<p>The <tt class="docutils literal"><span class="pre">coerce_to_decimal</span></tt> flag is new in 0.7.6.</p>
 
594
<p class="versionadded">
 
595
<span class="versionmodified">New in version 0.7.6: </span>Add the <tt class="docutils literal"><span class="pre">coerce_to_decimal</span></tt> flag.</p>
593
596
<p>Another alternative to performance is to use the 
594
597
<a class="reference external" href="http://pypi.python.org/pypi/cdecimal/">cdecimal</a> library; 
595
598
see <a class="reference internal" href="../core/types.html#sqlalchemy.types.Numeric" title="sqlalchemy.types.Numeric"><tt class="xref py py-class docutils literal"><span class="pre">Numeric</span></tt></a> for additional notes.</p>
616
619
test to determine the current &#8220;decimal&#8221; character, which can be
617
620
a comma &#8221;,&#8221; for european locales. From that point forward the
618
621
outputtypehandler uses that character to represent a decimal
619
 
point (this behavior is new in version 0.6.6). Note that
620
 
cx_oracle 5.0.3 or greater is required when dealing with
621
 
numerics with locale settings that don&#8217;t use a period &#8221;.&#8221; as the
622
 
decimal character.</p>
 
622
point. Note that cx_oracle 5.0.3 or greater is required
 
623
when dealing with numerics with locale settings that don&#8217;t use
 
624
a period &#8221;.&#8221; as the decimal character.</p>
 
625
<p class="versionchanged">
 
626
<span class="versionmodified">Changed in version 0.6.6: </span>The outputtypehandler uses a comma &#8221;,&#8221; character to represent
 
627
a decimal point.</p>
623
628
</div>
624
629
</div>
625
630
<div class="section" id="module-sqlalchemy.dialects.oracle.zxjdbc">
645
650
 
646
651
    <div id="docs-copyright">
647
652
        &copy; <a href="../copyright.html">Copyright</a> 2007-2012, the SQLAlchemy authors and contributors.
648
 
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
 
653
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
649
654
    </div>
650
655
</div>
651
656