%PDF- %PDF-
| Direktori : /usr/share/doc/alt-python27-sqlalchemy-1.3.6/doc/orm/ |
| Current File : //usr/share/doc/alt-python27-sqlalchemy-1.3.6/doc/orm/exceptions.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
ORM Exceptions
—
SQLAlchemy 1.3 Documentation
</title>
<!-- begin iterate through site-imported + sphinx environment css_files -->
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/docs.css" type="text/css" />
<link rel="stylesheet" href="../_static/changelog.css" type="text/css" />
<link rel="stylesheet" href="../_static/sphinx_paramlinks.css" type="text/css" />
<!-- end iterate through site-imported + sphinx environment css_files -->
<!-- begin layout.mako headers -->
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="copyright" title="Copyright" href="../copyright.html" />
<link rel="top" title="SQLAlchemy 1.3 Documentation" href="../index.html" />
<link rel="up" title="Events and Internals" href="extending.html" />
<link rel="next" title="Deprecated ORM Event Interfaces" href="deprecated.html" />
<link rel="prev" title="ORM Internals" href="internals.html" />
<!-- end layout.mako headers -->
</head>
<body>
<div id="docs-container">
<div id="docs-top-navigation-container" class="body-background">
<div id="docs-header">
<div id="docs-version-header">
Release: <span class="version-num">1.3.6</span>
| Release Date: July 21, 2019
</div>
<h1>SQLAlchemy 1.3 Documentation</h1>
</div>
</div>
<div id="docs-body-container">
<div id="fixed-sidebar" class="withsidebar">
<div id="docs-sidebar-popout">
<h3><a href="../index.html">SQLAlchemy 1.3 Documentation</a></h3>
<p id="sidebar-topnav">
<a href="../contents.html">Contents</a> |
<a href="../genindex.html">Index</a>
</p>
<div id="sidebar-search">
<form class="search" action="../search.html" method="get">
<label>
Search terms:
<input type="text" placeholder="search..." name="q" size="12" />
</label>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div id="docs-sidebar">
<div id="sidebar-banner">
</div>
<div id="docs-sidebar-inner">
<h3>
<a href="index.html" title="SQLAlchemy ORM">SQLAlchemy ORM</a>
</h3>
<ul>
<li><span class="link-container"><a class="reference external" href="tutorial.html">Object Relational Tutorial</a></span></li>
<li><span class="link-container"><a class="reference external" href="mapper_config.html">Mapper Configuration</a></span></li>
<li><span class="link-container"><a class="reference external" href="relationships.html">Relationship Configuration</a></span></li>
<li><span class="link-container"><a class="reference external" href="loading_objects.html">Loading Objects</a></span></li>
<li><span class="link-container"><a class="reference external" href="session.html">Using the Session</a></span></li>
<li><span class="link-container"><a class="reference external" href="extending.html">Events and Internals</a></span><ul>
<li><span class="link-container"><a class="reference external" href="events.html">ORM Events</a></span></li>
<li><span class="link-container"><a class="reference external" href="internals.html">ORM Internals</a></span></li>
<li class="selected"><span class="link-container"><strong>ORM Exceptions</strong><a class="paramlink headerlink reference internal" href="#">¶</a></span></li>
<li><span class="link-container"><a class="reference external" href="deprecated.html">Deprecated ORM Event Interfaces</a></span></li>
</ul>
</li>
<li><span class="link-container"><a class="reference external" href="extensions/index.html">ORM Extensions</a></span></li>
<li><span class="link-container"><a class="reference external" href="examples.html">ORM Examples</a></span></li>
</ul>
</div>
</div>
</div>
<div id="docs-body" class="withsidebar" >
<div class="section" id="module-sqlalchemy.orm.exc">
<span id="orm-exceptions"></span><span id="orm-exceptions-toplevel"></span><h1>ORM Exceptions<a class="headerlink" href="#module-sqlalchemy.orm.exc" title="Permalink to this headline">¶</a></h1>
<p>SQLAlchemy ORM exceptions.</p>
<dl class="attribute">
<dt id="sqlalchemy.orm.exc.ConcurrentModificationError">
<code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">ConcurrentModificationError</code><a class="headerlink" href="#sqlalchemy.orm.exc.ConcurrentModificationError" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#sqlalchemy.orm.exc.StaleDataError" title="sqlalchemy.orm.exc.StaleDataError"><code class="xref py py-class docutils literal notranslate"><span class="pre">sqlalchemy.orm.exc.StaleDataError</span></code></a></p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.DetachedInstanceError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">DetachedInstanceError</code><span class="sig-paren">(</span><em class="sig-param">*arg</em>, <em class="sig-param">**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.DetachedInstanceError" title="Permalink to this definition">¶</a></dt>
<dd><p>An attempt to access unloaded attributes on a
mapped instance that is detached.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.FlushError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">FlushError</code><span class="sig-paren">(</span><em class="sig-param">*arg</em>, <em class="sig-param">**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.FlushError" title="Permalink to this definition">¶</a></dt>
<dd><p>A invalid condition was detected during flush().</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.LoaderStrategyException">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">LoaderStrategyException</code><span class="sig-paren">(</span><em class="sig-param">applied_to_property_type</em>, <em class="sig-param">requesting_property</em>, <em class="sig-param">applies_to</em>, <em class="sig-param">actual_strategy_type</em>, <em class="sig-param">strategy_key</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.LoaderStrategyException" title="Permalink to this definition">¶</a></dt>
<dd><p>A loader strategy for an attribute does not exist.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.MultipleResultsFound">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">MultipleResultsFound</code><span class="sig-paren">(</span><em class="sig-param">*arg</em>, <em class="sig-param">**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.MultipleResultsFound" title="Permalink to this definition">¶</a></dt>
<dd><p>A single database result was required but more than one were found.</p>
</dd></dl>
<dl class="data">
<dt id="sqlalchemy.orm.exc.NO_STATE">
<code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">NO_STATE</code><em class="property"> = (<class 'AttributeError'>, <class 'KeyError'>)</em><a class="headerlink" href="#sqlalchemy.orm.exc.NO_STATE" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception types that may be raised by instrumentation implementations.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.NoResultFound">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">NoResultFound</code><span class="sig-paren">(</span><em class="sig-param">*arg</em>, <em class="sig-param">**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.NoResultFound" title="Permalink to this definition">¶</a></dt>
<dd><p>A database result was required but none was found.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.ObjectDeletedError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">ObjectDeletedError</code><span class="sig-paren">(</span><em class="sig-param">base</em>, <em class="sig-param">state</em>, <em class="sig-param">msg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.ObjectDeletedError" title="Permalink to this definition">¶</a></dt>
<dd><p>A refresh operation failed to retrieve the database
row corresponding to an object’s known primary key identity.</p>
<p>A refresh operation proceeds when an expired attribute is
accessed on an object, or when <a class="reference internal" href="query.html#sqlalchemy.orm.query.Query.get" title="sqlalchemy.orm.query.Query.get"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Query.get()</span></code></a> is
used to retrieve an object which is, upon retrieval, detected
as expired. A SELECT is emitted for the target row
based on primary key; if no row is returned, this
exception is raised.</p>
<p>The true meaning of this exception is simply that
no row exists for the primary key identifier associated
with a persistent object. The row may have been
deleted, or in some cases the primary key updated
to a new value, outside of the ORM’s management of the target
object.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.ObjectDereferencedError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">ObjectDereferencedError</code><span class="sig-paren">(</span><em class="sig-param">*arg</em>, <em class="sig-param">**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.ObjectDereferencedError" title="Permalink to this definition">¶</a></dt>
<dd><p>An operation cannot complete due to an object being garbage
collected.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.StaleDataError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">StaleDataError</code><span class="sig-paren">(</span><em class="sig-param">*arg</em>, <em class="sig-param">**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.StaleDataError" title="Permalink to this definition">¶</a></dt>
<dd><p>An operation encountered database state that is unaccounted for.</p>
<p>Conditions which cause this to happen include:</p>
<ul class="simple">
<li><p>A flush may have attempted to update or delete rows
and an unexpected number of rows were matched during
the UPDATE or DELETE statement. Note that when
version_id_col is used, rows in UPDATE or DELETE statements
are also matched against the current known version
identifier.</p></li>
<li><p>A mapped object with version_id_col was refreshed,
and the version number coming back from the database does
not match that of the object itself.</p></li>
<li><p>A object is detached from its parent object, however
the object was previously attached to a different parent
identity which was garbage collected, and a decision
cannot be made if the new parent was really the most
recent “parent”.</p></li>
</ul>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.UnmappedClassError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">UnmappedClassError</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">msg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.UnmappedClassError" title="Permalink to this definition">¶</a></dt>
<dd><p>An mapping operation was requested for an unknown class.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.UnmappedColumnError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">UnmappedColumnError</code><span class="sig-paren">(</span><em class="sig-param">*arg</em>, <em class="sig-param">**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.UnmappedColumnError" title="Permalink to this definition">¶</a></dt>
<dd><p>Mapping operation was requested on an unknown column.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.UnmappedError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">UnmappedError</code><span class="sig-paren">(</span><em class="sig-param">*arg</em>, <em class="sig-param">**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.UnmappedError" title="Permalink to this definition">¶</a></dt>
<dd><p>Base for exceptions that involve expected mappings not present.</p>
</dd></dl>
<dl class="exception">
<dt id="sqlalchemy.orm.exc.UnmappedInstanceError">
<em class="property">exception </em><code class="sig-prename descclassname">sqlalchemy.orm.exc.</code><code class="sig-name descname">UnmappedInstanceError</code><span class="sig-paren">(</span><em class="sig-param">base</em>, <em class="sig-param">obj</em>, <em class="sig-param">msg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#sqlalchemy.orm.exc.UnmappedInstanceError" title="Permalink to this definition">¶</a></dt>
<dd><p>An mapping operation was requested for an unknown instance.</p>
</dd></dl>
</div>
</div>
</div>
<div id="docs-bottom-navigation" class="docs-navigation-links, withsidebar">
Previous:
<a href="internals.html" title="previous chapter">ORM Internals</a>
Next:
<a href="deprecated.html" title="next chapter">Deprecated ORM Event Interfaces</a>
<div id="docs-copyright">
© <a href="../copyright.html">Copyright</a> 2007-2019, the SQLAlchemy authors and contributors.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.1.2.
</div>
</div>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.3.6',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<!-- begin iterate through sphinx environment script_files -->
<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/language_data.js"></script>
<!-- end iterate through sphinx environment script_files -->
<script type="text/javascript" src="../_static/detectmobile.js"></script>
<script type="text/javascript" src="../_static/init.js"></script>
</body>
</html>