Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > f1af5ac4c8d0f3f6ef0bca84cf516f3e > files > 643

python3-sqlobject-3.7.0-1.mga7.noarch.rpm



<!doctype html>

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>News &#8212; SQLObject 3.7.0 documentation</title>
    <link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/bizstyle.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <!--[if lt IE 9]>
    <script type="text/javascript" src="_static/css3-mediaqueries.js"></script>
    <![endif]-->
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">SQLObject 3.7.0 documentation</a> &#187;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">News</a><ul>
<li><a class="reference internal" href="#sqlobject-0-6-1">SQLObject 0.6.1</a><ul>
<li><a class="reference internal" href="#interface-changes">Interface Changes</a></li>
<li><a class="reference internal" href="#features">Features</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-6">SQLObject 0.6</a><ul>
<li><a class="reference internal" href="#id2">Interface Changes</a></li>
<li><a class="reference internal" href="#bugs">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-5-3">SQLObject 0.5.3</a><ul>
<li><a class="reference internal" href="#id3">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-5-2">SQLObject 0.5.2</a><ul>
<li><a class="reference internal" href="#id4">Interface Changes</a></li>
<li><a class="reference internal" href="#id5">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-5-1">SQLObject 0.5.1</a><ul>
<li><a class="reference internal" href="#id6">Interface Changes</a></li>
<li><a class="reference internal" href="#id7">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-5">SQLObject 0.5</a><ul>
<li><a class="reference internal" href="#id8">Features</a></li>
<li><a class="reference internal" href="#id9">Interface Changes</a></li>
<li><a class="reference internal" href="#id10">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-4">SQLObject 0.4</a><ul>
<li><a class="reference internal" href="#id11">Features</a><ul>
<li><a class="reference internal" href="#col-and-join">Col and Join</a></li>
</ul>
</li>
<li><a class="reference internal" href="#id12">Bugs</a></li>
<li><a class="reference internal" href="#internal">Internal</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-3">SQLObject 0.3</a><ul>
<li><a class="reference internal" href="#id13">Features</a></li>
<li><a class="reference internal" href="#id14">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-2-1">SQLObject 0.2.1</a><ul>
<li><a class="reference internal" href="#id15">Bugs</a></li>
<li><a class="reference internal" href="#id16">Features</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/News1.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="news">
<h1>News<a class="headerlink" href="#news" title="Permalink to this headline">¶</a></h1>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents:</p>
<ul class="simple">
<li><a class="reference internal" href="#news" id="id17">News</a><ul>
<li><a class="reference internal" href="#sqlobject-0-6-1" id="id18">SQLObject 0.6.1</a><ul>
<li><a class="reference internal" href="#interface-changes" id="id19">Interface Changes</a></li>
<li><a class="reference internal" href="#features" id="id20">Features</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-6" id="id21">SQLObject 0.6</a><ul>
<li><a class="reference internal" href="#id2" id="id22">Interface Changes</a></li>
<li><a class="reference internal" href="#bugs" id="id23">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-5-3" id="id24">SQLObject 0.5.3</a><ul>
<li><a class="reference internal" href="#id3" id="id25">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-5-2" id="id26">SQLObject 0.5.2</a><ul>
<li><a class="reference internal" href="#id4" id="id27">Interface Changes</a></li>
<li><a class="reference internal" href="#id5" id="id28">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-5-1" id="id29">SQLObject 0.5.1</a><ul>
<li><a class="reference internal" href="#id6" id="id30">Interface Changes</a></li>
<li><a class="reference internal" href="#id7" id="id31">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-5" id="id32">SQLObject 0.5</a><ul>
<li><a class="reference internal" href="#id8" id="id33">Features</a></li>
<li><a class="reference internal" href="#id9" id="id34">Interface Changes</a></li>
<li><a class="reference internal" href="#id10" id="id35">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-4" id="id36">SQLObject 0.4</a><ul>
<li><a class="reference internal" href="#id11" id="id37">Features</a><ul>
<li><a class="reference internal" href="#col-and-join" id="id38">Col and Join</a></li>
</ul>
</li>
<li><a class="reference internal" href="#id12" id="id39">Bugs</a></li>
<li><a class="reference internal" href="#internal" id="id40">Internal</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-3" id="id41">SQLObject 0.3</a><ul>
<li><a class="reference internal" href="#id13" id="id42">Features</a></li>
<li><a class="reference internal" href="#id14" id="id43">Bugs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sqlobject-0-2-1" id="id44">SQLObject 0.2.1</a><ul>
<li><a class="reference internal" href="#id15" id="id45">Bugs</a></li>
<li><a class="reference internal" href="#id16" id="id46">Features</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="sqlobject-0-6-1">
<h2>SQLObject 0.6.1<a class="headerlink" href="#sqlobject-0-6-1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="interface-changes">
<h3>Interface Changes<a class="headerlink" href="#interface-changes" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>The long broken and unused <code class="docutils literal notranslate"><span class="pre">DBMConnection</span></code> has been removed.</li>
<li>Added a connection parameter to all class methods (patch 974755)</li>
<li>Connection objects have a <code class="docutils literal notranslate"><span class="pre">.module</span></code> attribute, which points to
the DB-API module.  This is useful for getting access to the
exception objects.</li>
</ul>
</div>
<div class="section" id="features">
<h3>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>New <code class="docutils literal notranslate"><span class="pre">UnicodeCol()</span></code> that converts to and from Unicode
in the database.  See <a class="reference external" href="SQLObject.html#subclasses-of-col">docs</a>.</li>
</ul>
<ul class="simple">
<li>Added indexing (from Jeremy Fitzhardinge).  See <a class="reference external" href="SQLObject.html#indexes">the
documentation</a> for more.</li>
</ul>
<ul class="simple">
<li>All connections are explicitly closed, not just garbage collected.
Many database drivers don’t close database connections properly when
the connection object is garbage collected.</li>
<li>New <code class="docutils literal notranslate"><span class="pre">distinct</span></code> option to selects, like <code class="docutils literal notranslate"><span class="pre">MyClass.select(...,</span>
<span class="pre">distinct=True)</span></code></li>
<li>You can now do
<code class="docutils literal notranslate"><span class="pre">MyClass.selectBy(joinedTable=joinedTableInstance)</span></code>, where before
you had to do
<code class="docutils literal notranslate"><span class="pre">MyClass.selectBy(joinedTableID=joinedTableInstance.id)</span></code>.  (From
Dave Cook)</li>
</ul>
</div>
</div>
<div class="section" id="sqlobject-0-6">
<h2>SQLObject 0.6<a class="headerlink" href="#sqlobject-0-6" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id2">
<h3>Interface Changes<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Lazy updates.  Add <code class="docutils literal notranslate"><span class="pre">_lazyUpdate=True</span></code> to your class, and updates
will only be written when you call <code class="docutils literal notranslate"><span class="pre">obj.syncUpdate()</span></code> or
<code class="docutils literal notranslate"><span class="pre">obj.sync()</span></code> (<code class="docutils literal notranslate"><span class="pre">sync</span></code> also refetches the data from the database,
which <code class="docutils literal notranslate"><span class="pre">syncUpdate</span></code> does not do).  When enabled, instances have a
property <code class="docutils literal notranslate"><span class="pre">dirty</span></code>, which indicates if they have pending updates.
Inserts are still done immediately.</li>
<li>Separated database drivers (PostgresConnection, MySQLConnection,
etc.) into separate packages.  You can access the driver through
URIs, like <code class="docutils literal notranslate"><span class="pre">mysql://user:pass&#64;host/dbname</span></code> – to set drivers after
class creation you should use <cite>sqlobject.connectionForURI()</cite>.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">SQLObject</span></code> package has been renamed to <code class="docutils literal notranslate"><span class="pre">sqlobject</span></code>.  This
makes it similar to several other packages, and emphasizes the
distinction between the <code class="docutils literal notranslate"><span class="pre">sqlobject</span></code> package and the <code class="docutils literal notranslate"><span class="pre">SQLObject</span></code>
class.</li>
<li>Class instantiation now creates new rows (like <cite>.new()</cite> used to
do), and the <cite>.get()</cite> method now retrieves objects that already have
rows (like class instantiation used to do).</li>
<li>We’re now using a Subversion repository instead of CVS.  It is
located at <a class="reference external" href="http://svn.colorstudy.com/trunk/SQLObject">http://svn.colorstudy.com/trunk/SQLObject</a></li>
<li>If you pass <code class="docutils literal notranslate"><span class="pre">forceDBName=True</span></code> to the <code class="docutils literal notranslate"><span class="pre">*Col</span></code> constructors, then
your column name doesn’t have to be restricted to a-z, 0-9, and _.</li>
<li><code class="docutils literal notranslate"><span class="pre">*Col</span></code> constructors now support cascade: <code class="docutils literal notranslate"><span class="pre">cascade=None</span></code>
(default) means no constraint; <code class="docutils literal notranslate"><span class="pre">cascade=True</span></code> means that if the
foreign key is deleted, the object will be deleted;
<code class="docutils literal notranslate"><span class="pre">cascade=False</span></code> means that the delete will fail;
<code class="docutils literal notranslate"><span class="pre">cascade=&quot;null&quot;</span></code> means that the column will be set to NULL.  The
constraints are only implemented in the DBMS, not in SQLObject
(i.e., they will not work in databases like MySQL and SQLite).</li>
<li>New <code class="docutils literal notranslate"><span class="pre">_create(id,</span> <span class="pre">**kw)</span></code> method that can be overridden to intercept
and modify attempts to insert rows in the database.</li>
<li>You can specify <code class="docutils literal notranslate"><span class="pre">_idType</span></code> in your class, like <code class="docutils literal notranslate"><span class="pre">_idType</span> <span class="pre">=</span> <span class="pre">str</span></code>.
The default type is <code class="docutils literal notranslate"><span class="pre">int</span></code>; i.e., IDs are coerced to integers.
This is a temporary interface; a more general specifier for primary
keys will be added later.</li>
<li>New classmethod <code class="docutils literal notranslate"><span class="pre">createTableSQL()</span></code> method for SQLObject classes,
which returns the SQL that can be used to create the table.  Analog
to <code class="docutils literal notranslate"><span class="pre">createTable()</span></code>.</li>
</ul>
</div>
<div class="section" id="bugs">
<h3>Bugs<a class="headerlink" href="#bugs" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>SQLite booleans fixed.</li>
<li>You can now use <code class="docutils literal notranslate"><span class="pre">sqlite:/:memory:</span></code> to store the database in
memory.</li>
<li>Some bugs resolved when caching is turned off (SF 956847)</li>
</ul>
</div>
</div>
<div class="section" id="sqlobject-0-5-3">
<h2>SQLObject 0.5.3<a class="headerlink" href="#sqlobject-0-5-3" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id3">
<h3>Bugs<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Python 2.2 booleans fixed (SF: 903488)</li>
<li>Longs (e.g., <code class="docutils literal notranslate"><span class="pre">1L</span></code>) get converted properly (SF: 939965)</li>
</ul>
</div>
</div>
<div class="section" id="sqlobject-0-5-2">
<h2>SQLObject 0.5.2<a class="headerlink" href="#sqlobject-0-5-2" title="Permalink to this headline">¶</a></h2>
<p>We’re now using Subversion instead of CVS.  The repository is located
at svn://colorstudy.com/trunk/SQLObject</p>
<div class="section" id="id4">
<h3>Interface Changes<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>If you commit or rollback a transaction, you must call
<code class="docutils literal notranslate"><span class="pre">trans.begin()</span></code> to restart the transaction.  Any database access on
the transaction inbetween commit/rollback and being will result in an
AssertionError.  (It’s also acceptable to create a new transaction
object instead of reusing the old one, but objects in that
transaction will be invalid)</li>
</ul>
</div>
<div class="section" id="id5">
<h3>Bugs<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Using .select() would hold on to a connection, and also release it
back to the connection pool.  Very un-threadsafe and all-around
bad.</li>
<li>Fixed bug which did not release connections after database (query)
error.</li>
<li>When setting columns that use validators, the Pythonic
(vs. database) representation wasn’t being stored in the column.
Now we roundtrip (through toPython and fromPython) the values when
they get set.</li>
<li>PostgreConnection is back to using sequences for ID generation,
instead of oids.  Long explanation – oids can be unindexed in some
versions of Postgres, or not even exist.</li>
<li>When turning caching off and using transactions, got an attribute
error on rollback.</li>
<li>Rollback or commit didn’t find objects that were expired from the
cache but still in memory.</li>
<li>Rollback or commit didn’t free the connection object, so as you
created more transactions it stole connections and didn’t put them
back in the pool.</li>
</ul>
</div>
</div>
<div class="section" id="sqlobject-0-5-1">
<h2>SQLObject 0.5.1<a class="headerlink" href="#sqlobject-0-5-1" title="Permalink to this headline">¶</a></h2>
<p>Released: 12-Nov-2003</p>
<div class="section" id="id6">
<h3>Interface Changes<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Select results no longer have a __len__ method (i.e., you can’t do
<code class="docutils literal notranslate"><span class="pre">len(Person.select(Person.q.firstName=='Bob'))</span></code>).  There is now a
<code class="docutils literal notranslate"><span class="pre">.count()</span></code> method instead.  <code class="docutils literal notranslate"><span class="pre">__len__</span></code> gets called implicitly in
several circumstances, like <code class="docutils literal notranslate"><span class="pre">list()</span></code>, which causes potentially
expensive queries to <code class="docutils literal notranslate"><span class="pre">COUNT(*)</span></code>.</li>
</ul>
</div>
<div class="section" id="id7">
<h3>Bugs<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Objects retrieved from a join now respect the transaction context of
the original instance.</li>
<li><code class="docutils literal notranslate"><span class="pre">.select().reversed()</span></code> works.</li>
</ul>
</div>
</div>
<div class="section" id="sqlobject-0-5">
<h2>SQLObject 0.5<a class="headerlink" href="#sqlobject-0-5" title="Permalink to this headline">¶</a></h2>
<p>Released: 1-Nov-2003</p>
<div class="section" id="id8">
<h3>Features<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference external" href="http://firebird.sourceforge.net/">Firebird</a> support.</li>
<li>Database-specific literal quoting (motivation: MySQL and Postgres
use backslashes, Firebird and SQLite do not).</li>
<li>Generic conversion/validation can be added to columns.</li>
<li>BoolCol for portable boolean columns (BOOL on Postgres, INT on
MySQL, etc.)</li>
<li>Non-integer IDs.  (Automatic table creation is not supported for
non-integer IDs)</li>
<li>Explicit IDs for new instances/rows (required for non-integer IDs).</li>
<li>Instances can be synced with the database (in case there have been
updates to the object since it was first fetched).</li>
<li>Instances can be expired, so that they will be synced when they are
next accessed.</li>
</ul>
</div>
<div class="section" id="id9">
<h3>Interface Changes<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><cite>SQLBuilder.sqlRepr</cite> renamed to <cite>SQLBuilder.sqlrepr</cite>, signature
changed to <code class="docutils literal notranslate"><span class="pre">sqlrepr(value,</span> <span class="pre">databaseName)</span></code> to quote <code class="docutils literal notranslate"><span class="pre">value</span></code>,
where <code class="docutils literal notranslate"><span class="pre">databaseName</span></code> is one of <code class="docutils literal notranslate"><span class="pre">&quot;mysql&quot;</span></code>, <code class="docutils literal notranslate"><span class="pre">&quot;postgres&quot;</span></code>,
<code class="docutils literal notranslate"><span class="pre">&quot;sqlite&quot;</span></code>, <code class="docutils literal notranslate"><span class="pre">&quot;firebird&quot;</span></code>.</li>
<li><code class="docutils literal notranslate"><span class="pre">sqlRepr</span></code> magic method renamed to <code class="docutils literal notranslate"><span class="pre">__sqlrepr__</span></code>, and takes new
<code class="docutils literal notranslate"><span class="pre">databaseName</span></code> argument.</li>
<li>When using explicit booleans, use <code class="docutils literal notranslate"><span class="pre">Col.TRUE</span></code> and <code class="docutils literal notranslate"><span class="pre">Col.FALSE</span></code> for
backward compatibility with Python 2.2.  This is not required for
<code class="docutils literal notranslate"><span class="pre">BoolCol</span></code>, however (which converts all true values to TRUE and
false values to FALSE)</li>
<li>SQLObject has a <code class="docutils literal notranslate"><span class="pre">sqlrepr</span></code> method, so you can construct queries
with something like <code class="docutils literal notranslate"><span class="pre">&quot;WHERE</span> <span class="pre">last_name</span> <span class="pre">=</span> <span class="pre">%s&quot;</span> <span class="pre">%</span>
<span class="pre">Person.sqlrepr('Bob')</span></code></li>
</ul>
</div>
<div class="section" id="id10">
<h3>Bugs<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Released all locks with <code class="docutils literal notranslate"><span class="pre">finally:</span></code>, so that bugs won’t cause
frozen locks.</li>
<li>Tons of transaction fixes.  Transactions pretty much work.</li>
<li>A class can have multiple foreign keys pointing to the same table
(e.g., <code class="docutils literal notranslate"><span class="pre">spouse</span> <span class="pre">=</span> <span class="pre">ForeignKey(&quot;Person&quot;);</span> <span class="pre">supervisor</span> <span class="pre">=</span>
<span class="pre">ForeignKey(&quot;Person&quot;)</span></code>)</li>
</ul>
</div>
</div>
<div class="section" id="sqlobject-0-4">
<h2>SQLObject 0.4<a class="headerlink" href="#sqlobject-0-4" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id11">
<h3>Features<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p class="first">You can specify columns in a new, preferred manner:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">SomeObject</span><span class="p">(</span><span class="n">SQLObject</span><span class="p">):</span>
    <span class="n">someColumn</span> <span class="o">=</span> <span class="n">Col</span><span class="p">()</span>
</pre></div>
</div>
<p>Equivalent to:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">SomeObject</span><span class="p">(</span><span class="n">SQLObject</span><span class="p">):</span>
    <span class="n">_columns</span> <span class="o">=</span> <span class="p">[</span><span class="n">Col</span><span class="p">(</span><span class="s1">&#39;someColumn&#39;</span><span class="p">)]</span>
</pre></div>
</div>
<p>Ditto joins.</p>
</li>
<li><p class="first">Cache objects have a clear method, which empties all objects.
However, weak references to objects <em>are</em> maintained, so the
integrity of the cache can be ensured.</p>
</li>
<li><p class="first">SQLObject subclasses can be further subclassed, adding or removing
column definitions (as well as changing settings like connection,
style, etc).  Each class still refers to a single concrete table in
the database – the class hierarchy is not represented in the
database.</p>
</li>
<li><p class="first">Each SQLObject subclass can have an associated style, as given in
the <cite>_style</cite> attribute.  This object is used to map between Python
and database names (e.g., the column name for a Python attribute).
Some samples are available in the <cite>Style</cite> module.</p>
</li>
<li><p class="first">Postgres support for <cite>_fromDatabase</cite> (reading a table definition from
the database, and creating a class from that).</p>
</li>
<li><p class="first">Postgres id columns more permissive, you don’t have to create a
specially named sequence (or implicitly create that sequence through
<code class="docutils literal notranslate"><span class="pre">SERIAL</span></code>).  lastoid is used instead.</p>
</li>
<li><p class="first">MySQL uses <code class="docutils literal notranslate"><span class="pre">localhost</span></code> as the default host, and the empty string
as the default password.</p>
</li>
<li><p class="first">Added functions for use with queries: <cite>ISNULL</cite>, <cite>ISNOTNULL</cite>.  <code class="docutils literal notranslate"><span class="pre">==</span></code>
and <code class="docutils literal notranslate"><span class="pre">!=</span></code> can be used with None, and is translated into <cite>ISNULL</cite>,
<cite>ISNOTNULL</cite>.</p>
</li>
<li><p class="first">Classes can be part of a specific registry.  Since classes are
referred to by name in several places, the names have to be unique.
This can be problematic, so you can add a class variable <cite>_registry</cite>,
the value of which should be a string.  Classes references are
assumed to be inside that registry, and class names need only be
unique among classes in that registry.</p>
</li>
<li><p class="first"><code class="docutils literal notranslate"><span class="pre">SomeClass.select()</span></code> selects all, instead of using
<code class="docutils literal notranslate"><span class="pre">SomeClass.select('all')</span></code>.  You can also use None instead of
<code class="docutils literal notranslate"><span class="pre">'all'</span></code>.</p>
</li>
<li><p class="first">Trying to fetch non-existent objects raises <cite>SQLObjectNotFound</cite>,
which is a subclass of the builtin exception <cite>LookupError</cite>.
This may not be raised if <cite>_cacheValues</cite> is False and you use
the ID to fetch an object (but alternateID fetches will raise
the exception in either case).</p>
</li>
<li><p class="first">Can order by descending order, with the <cite>reversed</cite> option to
the <cite>select</cite> method, or by prefixing the column with a <code class="docutils literal notranslate"><span class="pre">&quot;-&quot;</span></code>.</p>
</li>
<li><p class="first">Ordering with joins works better – you can order with multiple
columns, as well as descending ordering.</p>
</li>
</ul>
<div class="section" id="col-and-join">
<h4>Col and Join<a class="headerlink" href="#col-and-join" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><cite>Join</cite> constructors have an argument <cite>orderBy</cite>, which is the name
of a Python attribute to sort results by.  If not given, the
appropriate class’s <cite>_defaultOrder</cite> will be used.  None implies
no sorting (and <code class="docutils literal notranslate"><span class="pre">orderBy=None</span></code> will override <cite>_defaultOrder</cite>).</li>
<li><cite>ForeignKey</cite> class (subclass of <cite>Col</cite>), for somewhat easier/clearer
declaration of foreign keys.</li>
<li><cite>Col</cite> (and subclasses) can take a <cite>sqlType</cite> argument, which is used
in table definitions.  E.g., <code class="docutils literal notranslate"><span class="pre">Col(sqlType=&quot;BOOLEAN&quot;)</span></code> can be used
to create a <code class="docutils literal notranslate"><span class="pre">BOOLEAN</span></code> column, even though no <cite>BooleanCol</cite> exists.</li>
<li><cite>alternateID</cite> (a specifier for columns) implies <code class="docutils literal notranslate"><span class="pre">NOT</span> <span class="pre">NULL</span></code>.  Also
implies <code class="docutils literal notranslate"><span class="pre">UNIQUE</span></code>.</li>
<li><cite>unique</cite> (a specifier for columns) added.</li>
<li><cite>DecimalCol</cite> and <cite>CurrencyCol</cite> added.</li>
<li><cite>EnumCol</cite> uses constraints on Postgres (if you use <cite>createTable</cite>).</li>
</ul>
</div>
</div>
<div class="section" id="id12">
<h3>Bugs<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><cite>DateTimeCol</cite> uses <code class="docutils literal notranslate"><span class="pre">TIMESTAMP</span></code> for Postgres.  Note that the
Python type name is used for column names, not necessarily the
SQL standard name.</li>
<li>Foreign key column names are slightly more permissive.  They still
need to end in <code class="docutils literal notranslate"><span class="pre">id</span></code>, but it’s case insensitive.</li>
<li>_defaultOrder should be the python attribute’s name, not the database
name.</li>
<li>SomeClass.q.colName uses proper Python attributes for colName, and
proper database names when executed in the database.</li>
<li>SQLite select results back to being proper iterator.</li>
<li>SomeClass.q.colName now does proper translation to database names,
using dbName, etc., instead of being entirely algorithm-driven.</li>
<li>Raise <cite>TypeError</cite> if you pass an unknown argument to the <cite>new</cite>
method.</li>
<li>You can override the _get_* or _set_* version of a property without
overriding the other.</li>
<li>Python 2.3 compatible.</li>
<li>Trying to use <code class="docutils literal notranslate"><span class="pre">Col('id')</span></code> or <code class="docutils literal notranslate"><span class="pre">id</span> <span class="pre">=</span> <span class="pre">Col()</span></code> will raise an
exception, instead of just acting funky.</li>
<li><code class="docutils literal notranslate"><span class="pre">ForeignKey</span></code> columns return None if the associated column is
NULL in the database (used to just act weird).</li>
<li>Instantiating an object with an id of None will give an error,
instead of just acting weird.</li>
</ul>
</div>
<div class="section" id="internal">
<h3>Internal<a class="headerlink" href="#internal" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><cite>Col</cite> class separated into <cite>Col</cite> and <cite>SOCol</cite> (and same for all other
<cite>*Col</cite> classes).  <cite>Col</cite> defines a column, <cite>SOCol</cite> is that definition
bound to a particular SQLObject class.</li>
<li>Instance variable <code class="docutils literal notranslate"><span class="pre">_SO_columns</span></code> holds the <cite>SOCol</cite> instances.</li>
</ul>
</div>
</div>
<div class="section" id="sqlobject-0-3">
<h2>SQLObject 0.3<a class="headerlink" href="#sqlobject-0-3" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id13">
<h3>Features<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Table creation (SQL schema generation) via new class method
<cite>createTable</cite>.  And of course a <cite>dropTable</cite> method to go with.</li>
<li>Add and remove columns at runtime, optionally modifying the
schema in the database (via <code class="docutils literal notranslate"><span class="pre">ALTER</span></code>).  (Does not work in
SQLite)</li>
<li>New column classes (see <cite>Col</cite> module), indicates type</li>
<li>Classes can be created by parsing an already existant table
(MySQL only).</li>
<li>Objects are not cached indefinitely.  Cached objects are expired
into a weak dictionary (it allows objects to be garbage collected if
nowhere else in the program is using the object, but until it is
collected it’s still available to the cache).  Some cache control,
pass <code class="docutils literal notranslate"><span class="pre">nocache=True</span></code> to your connection object to eliminate as much
caching as possible.  See <cite>Cache</cite> module for a bit more.</li>
<li>New DBMConnection, implements a database-like backend without any
database to speak of, including queries (so long as you use
<cite>SQLBuilder</cite> and don’t generate your where clauses manually).
Actual SQL generation is done entirely by the database connection,
allowing portability across very different backends.</li>
<li>Postgres table IDs should be created with type <code class="docutils literal notranslate"><span class="pre">SERIAL</span></code> (which
implicitly creates a sequence).</li>
<li>New <cite>_defaultOrder</cite> class variable gives a default for the
<cite>orderBy</cite> parameter to <cite>select</cite> queries.</li>
</ul>
</div>
<div class="section" id="id14">
<h3>Bugs<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>LIMIT/OFFSET (select result slicing) works in Postgres and SQLite.</li>
<li><code class="docutils literal notranslate"><span class="pre">tableExists</span></code> method from DBConnection works in same.</li>
<li>mxDateTime not required (never should have been, always just an
option).</li>
</ul>
</div>
</div>
<div class="section" id="sqlobject-0-2-1">
<h2>SQLObject 0.2.1<a class="headerlink" href="#sqlobject-0-2-1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id15">
<h3>Bugs<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Fixed caching of new objects</li>
</ul>
</div>
<div class="section" id="id16">
<h3>Features<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference external" href="http://sqlite.org/">SQLite</a> support</li>
<li>Select statements are lazily generated, retrieve full rows for
speed, and are slicable (<a class="reference external" href="SQLObject.html#selecting-multiple-objects">select docs</a>).</li>
<li><cite>alternateID</cite> option for <cite>Col</cite> objects – select individual objects
via UNIQUE columns, e.g., a username (<a class="reference external" href="SQLObject.html#col-class-specifying-columns">Col docs</a>).</li>
</ul>
<a class="reference external image-reference" href="https://sourceforge.net/projects/sqlobject"><img alt="Get SQLObject at SourceForge.net. Fast, secure and Free Open Source software downloads" class="noborder align-center" src="https://sourceforge.net/sflogo.php?group_id=74338&amp;type=10" style="width: 80px; height: 15px;" /></a>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">SQLObject 3.7.0 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2004-2018, Ian Bicking and contributors.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.4.
    </div>
  </body>
</html>