Compare commits
10 Commits
75f3edf5b5
...
24663b9958
Author | SHA1 | Date |
---|---|---|
|
24663b9958 | |
|
4c49a00480 | |
|
f130c7d877 | |
|
ba7f78fc74 | |
|
0f43ed21ed | |
|
709f46b222 | |
|
5b8bbd8bc0 | |
|
c83a39e4f8 | |
|
2144b18561 | |
|
417749da78 |
|
@ -203,7 +203,7 @@
|
|||
turned on for individual table, schema, and column identifiers when
|
||||
used in all queries/creates/drops. Enabled via "quote=True" in
|
||||
Table or Column, as well as "quote_schema=True" in Table. Thanks to
|
||||
Aaron Spike for his excellent efforts.
|
||||
Aaron Spike for the excellent efforts.
|
||||
|
||||
.. change::
|
||||
:tags:
|
||||
|
|
|
@ -128,6 +128,27 @@
|
|||
:version: 0.7.10
|
||||
:released: Thu Feb 7 2013
|
||||
|
||||
.. change::
|
||||
:tags: engine, bug
|
||||
:tickets: 2604
|
||||
:versions: 0.8.0b2
|
||||
|
||||
Fixed :meth:`.MetaData.reflect` to correctly use
|
||||
the given :class:`.Connection`, if given, without
|
||||
opening a second connection from that connection's
|
||||
:class:`.Engine`.
|
||||
|
||||
.. change::
|
||||
:tags: mssql, bug
|
||||
:tickets:2607
|
||||
:versions: 0.8.0b2
|
||||
|
||||
Fixed bug whereby using "key" with Column
|
||||
in conjunction with "schema" for the owning
|
||||
Table would fail to locate result rows due
|
||||
to the MSSQL dialect's "schema rendering"
|
||||
logic's failure to take .key into account.
|
||||
|
||||
.. change::
|
||||
:tags: sql, mysql, gae
|
||||
:tickets: 2649
|
||||
|
|
|
@ -88,7 +88,7 @@ release = "0.7.10"
|
|||
|
||||
release_date = "February 7, 2013"
|
||||
|
||||
site_base = "http://www.sqlalchemy.org"
|
||||
site_base = os.environ.get("RTD_SITE_BASE", "http://www.sqlalchemy.org")
|
||||
|
||||
# arbitrary number recognized by builders.py, incrementing this
|
||||
# will force a rebuild
|
||||
|
@ -198,9 +198,11 @@ html_domain_indices = False
|
|||
|
||||
# If true, the reST sources are included in the HTML build as _sources/<name>.
|
||||
#html_copy_source = True
|
||||
html_copy_source = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
html_show_sourcelink = False
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
|
|
@ -112,7 +112,7 @@ python-sybase_ ``sybase+pysyba
|
|||
.. _pg8000: http://pybrary.net/pg8000/
|
||||
.. _pypostgresql: http://python.projects.postgresql.org/
|
||||
.. _mysql-python: http://sourceforge.net/projects/mysql-python
|
||||
.. _MySQL Connector/Python: https://launchpad.net/myconnpy
|
||||
.. _MySQL Connector/Python: http://dev.mysql.com/downloads/connector/python/
|
||||
.. _OurSQL: http://packages.python.org/oursql/
|
||||
.. _pymysql: http://code.google.com/p/pymysql/
|
||||
.. _rdbms: https://developers.google.com/cloud-sql/docs/developers_guide_python
|
||||
|
|
|
@ -9,7 +9,7 @@ Getting Started
|
|||
|
||||
A high level view and getting set up.
|
||||
|
||||
:ref:`Overview <overview>` |
|
||||
:ref:`Overview <intro>` |
|
||||
:ref:`Installation Guide <installation>` |
|
||||
:doc:`Migration from 0.6 <changelog/migration_07>` |
|
||||
:doc:`Changelog catalog <changelog/index>`
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
.. _overview_toplevel:
|
||||
|
||||
========
|
||||
Overview
|
||||
========
|
||||
|
||||
.. _overview:
|
||||
|
||||
========
|
||||
Overview
|
||||
========
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ Session Frequently Asked Questions
|
|||
and **session scope**.
|
||||
|
||||
The implication here is that the SQLAlchemy ORM is encouraging the
|
||||
developer to establish these two scopes in his or her application,
|
||||
developer to establish these two scopes in their application,
|
||||
including not only when the scopes begin and end, but also the
|
||||
expanse of those scopes, for example should a single
|
||||
:class:`.Session` instance be local to the execution flow within a
|
||||
|
|
|
@ -424,7 +424,7 @@ We can add more ``User`` objects at once using
|
|||
... User('mary', 'Mary Contrary', 'xxg527'),
|
||||
... User('fred', 'Fred Flinstone', 'blah')])
|
||||
|
||||
Also, Ed has already decided his password isn't too secure, so lets change it:
|
||||
Also, we've decided the password for Ed isn't too secure, so lets change it:
|
||||
|
||||
.. sourcecode:: python+sql
|
||||
|
||||
|
@ -1243,9 +1243,10 @@ using any SQL:
|
|||
>>> jack.addresses[1].user
|
||||
<User('jack','Jack Bean', 'gjffdd')>
|
||||
|
||||
Let's add and commit ``Jack Bean`` to the database. ``jack`` as well as the
|
||||
two ``Address`` members in his ``addresses`` collection are both added to the
|
||||
session at once, using a process known as **cascading**:
|
||||
Let's add and commit ``Jack Bean`` to the database. ``jack`` as well
|
||||
as the two ``Address`` members in the corresponding ``addresses``
|
||||
collection are both added to the session at once, using a process
|
||||
known as **cascading**:
|
||||
|
||||
.. sourcecode:: python+sql
|
||||
|
||||
|
@ -1837,8 +1838,8 @@ including the cascade configuration (we'll leave the constructor out too)::
|
|||
... def __repr__(self):
|
||||
... return "<User('%s','%s', '%s')>" % (self.name, self.fullname, self.password)
|
||||
|
||||
Then we recreate ``Address``, noting that in this case we've created the ``Address.user`` relationship
|
||||
via the ``User`` class already::
|
||||
Then we recreate ``Address``, noting that in this case we've created
|
||||
the ``Address.user`` relationship via the ``User`` class already::
|
||||
|
||||
>>> class Address(Base):
|
||||
... __tablename__ = 'addresses'
|
||||
|
@ -1849,9 +1850,10 @@ via the ``User`` class already::
|
|||
... def __repr__(self):
|
||||
... return "<Address('%s')>" % self.email_address
|
||||
|
||||
Now when we load Jack (below using :meth:`~.Query.get`, which loads by primary key),
|
||||
removing an address from his ``addresses`` collection will result in that
|
||||
``Address`` being deleted:
|
||||
Now when we load the user ``jack`` (below using :meth:`~.Query.get`,
|
||||
which loads by primary key), removing an address from the
|
||||
corresponding ``addresses`` collection will result in that ``Address``
|
||||
being deleted:
|
||||
|
||||
.. sourcecode:: python+sql
|
||||
|
||||
|
@ -1892,7 +1894,8 @@ removing an address from his ``addresses`` collection will result in that
|
|||
('jack@google.com', 'j25@yahoo.com')
|
||||
{stop}1
|
||||
|
||||
Deleting Jack will delete both Jack and his remaining ``Address``:
|
||||
Deleting Jack will delete both Jack and the remaining ``Address`` associated
|
||||
with the user:
|
||||
|
||||
.. sourcecode:: python+sql
|
||||
|
||||
|
@ -2111,8 +2114,8 @@ keyword string 'firstpost'":
|
|||
('firstpost',)
|
||||
{stop}[BlogPost("Wendy's Blog Post", 'This is a test', <User('wendy','Wendy Williams', 'foobar')>)]
|
||||
|
||||
If we want to look up just Wendy's posts, we can tell the query to narrow down
|
||||
to her as a parent:
|
||||
If we want to look up posts owned by the user ``wendy``, we can tell
|
||||
the query to narrow down to that ``User`` object as a parent:
|
||||
|
||||
.. sourcecode:: python+sql
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* jQuery.browser.mobile (http://detectmobilebrowser.com/)
|
||||
*
|
||||
* jQuery.browser.mobile will be true if the browser is a mobile device
|
||||
*
|
||||
**/
|
||||
(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera);
|
|
@ -1,8 +1,12 @@
|
|||
/* global */
|
||||
|
||||
.body-background {
|
||||
background-color: #FDFBFC;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #FDFBFC;
|
||||
margin:38px;
|
||||
margin:0 38px;
|
||||
color:#333333;
|
||||
}
|
||||
|
||||
|
@ -61,6 +65,8 @@ a.headerlink:hover {
|
|||
|
||||
#docs-container {
|
||||
max-width:1000px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,21 +83,41 @@ a.headerlink:hover {
|
|||
font-family:Verdana,sans-serif;
|
||||
|
||||
font-size:.9em;
|
||||
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#docs-top-navigation,
|
||||
#docs-bottom-navigation {
|
||||
#docs-sidebar-popout,
|
||||
#docs-bottom-navigation,
|
||||
#index-nav {
|
||||
font-family: Verdana, sans-serif;
|
||||
background-color: #FBFBEE;
|
||||
border: solid 1px #CCC;
|
||||
padding:10px;
|
||||
font-size:.8em;
|
||||
}
|
||||
|
||||
#docs-top-navigation {
|
||||
margin:10px 0px 10px 0px;
|
||||
line-height:1.2em;
|
||||
#docs-bottom-navigation,
|
||||
#index-nav {
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
#docs-sidebar-popout {
|
||||
font-size:.75em;
|
||||
}
|
||||
|
||||
#docs-sidebar-popout p,
|
||||
#docs-sidebar-popout form {
|
||||
margin:5px 0 5px 0px;
|
||||
}
|
||||
|
||||
#docs-sidebar-popout h3 {
|
||||
margin:0 0 10px 0;
|
||||
}
|
||||
|
||||
|
||||
#docs-version-header {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.docs-navigation-links {
|
||||
|
@ -120,13 +146,10 @@ a.headerlink:hover {
|
|||
font-size:1.6em;
|
||||
}
|
||||
|
||||
#docs-search {
|
||||
float:right;
|
||||
}
|
||||
|
||||
#docs-top-page-control {
|
||||
float:right;
|
||||
width:350px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
bottom: 14px;
|
||||
}
|
||||
|
||||
#docs-top-page-control ul {
|
||||
|
@ -149,13 +172,11 @@ a.headerlink:hover {
|
|||
/* content container, sidebar */
|
||||
|
||||
#docs-body-container {
|
||||
background-color:#EFEFEF;
|
||||
border: solid 1px #CCC;
|
||||
|
||||
}
|
||||
|
||||
#docs-body,
|
||||
#docs-sidebar
|
||||
#docs-sidebar,
|
||||
#index-nav
|
||||
{
|
||||
/*font-family: helvetica, arial, sans-serif;
|
||||
font-size:.9em;*/
|
||||
|
@ -170,11 +191,97 @@ a.headerlink:hover {
|
|||
font-size:.85em;
|
||||
}
|
||||
|
||||
#fixed-sidebar {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#fixed-sidebar.withsidebar {
|
||||
float: left;
|
||||
width:224px;
|
||||
}
|
||||
|
||||
#fixed-sidebar.preautomated {
|
||||
position: fixed;
|
||||
float: none;
|
||||
top:0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#fixed-sidebar.automated {
|
||||
position: fixed;
|
||||
float: none;
|
||||
top: 120px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
|
||||
#docs-sidebar {
|
||||
float:left;
|
||||
width:212px;
|
||||
padding: 10px 0 0 15px;
|
||||
font-size:.85em;
|
||||
|
||||
border: solid 1px #CCC;
|
||||
|
||||
z-index: 3;
|
||||
background-color: #EFEFEF;
|
||||
}
|
||||
|
||||
#index-nav {
|
||||
position: relative;
|
||||
margin-top:10px;
|
||||
padding:0 10px;
|
||||
}
|
||||
|
||||
#index-nav form {
|
||||
padding-top:10px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
#sidebar-paginate {
|
||||
position: absolute;
|
||||
bottom: 4.5em;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
#sidebar-topnav {
|
||||
position: absolute;
|
||||
bottom: 3em;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
#sidebar-search {
|
||||
position: absolute;
|
||||
bottom: 1em;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
#docs-sidebar {
|
||||
top: 132px;
|
||||
bottom: 0;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
margin-top:5px;
|
||||
width:212px;
|
||||
padding-left:10px;
|
||||
}
|
||||
|
||||
#docs-sidebar-popout {
|
||||
height:120px;
|
||||
max-height: 120px;
|
||||
width:212px;
|
||||
padding-left:10px;
|
||||
padding-top:10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
#fixed-sidebar.preautomated #docs-sidebar,
|
||||
#fixed-sidebar.preautomated #docs-sidebar-popout {
|
||||
position:absolute;
|
||||
}
|
||||
|
||||
#fixed-sidebar.preautomated #docs-sidebar:after {
|
||||
content: " ";
|
||||
display:block;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
#docs-sidebar h3, #docs-sidebar h4 {
|
||||
|
@ -184,9 +291,13 @@ a.headerlink:hover {
|
|||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
margin: 10px 0 0 -15px;
|
||||
padding: 5px 10px 5px 10px;
|
||||
padding: 5px 10px 5px 15px;
|
||||
text-shadow: 1px 1px 0 white;
|
||||
width:210px;
|
||||
/*width:210px;*/
|
||||
}
|
||||
|
||||
#docs-sidebar h3:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
#docs-sidebar h3 a, #docs-sidebar h4 a {
|
||||
|
@ -206,16 +317,22 @@ a.headerlink:hover {
|
|||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#docs-body {
|
||||
background-color:#FFFFFF;
|
||||
padding:1px 10px 10px 10px;
|
||||
|
||||
border: solid 1px #CCC;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
#docs-body.withsidebar {
|
||||
margin: 0 0 0 230px;
|
||||
border-left:3px solid #DFDFDF;
|
||||
margin-left: 230px;
|
||||
}
|
||||
|
||||
|
||||
#docs-body h1,
|
||||
#docs-body h2,
|
||||
#docs-body h3,
|
||||
|
@ -223,12 +340,13 @@ a.headerlink:hover {
|
|||
font-family:Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#docs-body h1 {
|
||||
#docs-body #sqlalchemy-documentation h1 {
|
||||
/* hide the <h1> for each content section. */
|
||||
display:none;
|
||||
font-size:2.0em;
|
||||
}
|
||||
|
||||
|
||||
#docs-body h2 {
|
||||
font-size:1.8em;
|
||||
border-top:1px solid;
|
||||
|
@ -332,6 +450,34 @@ div.admonition, div.topic, p.deprecated, p.versionadded, p.versionchanged {
|
|||
box-shadow: 2px 2px 3px #DFDFDF;
|
||||
}
|
||||
|
||||
div.sidebar {
|
||||
background-color: #FFFFEE;
|
||||
border: 1px solid #DDDDBB;
|
||||
float: right;
|
||||
margin: 10px 0 10px 1em;
|
||||
padding: 7px 7px 0;
|
||||
width: 40%;
|
||||
font-size:.9em;
|
||||
}
|
||||
|
||||
p.sidebar-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* grrr sphinx changing your document structures, removing classes.... */
|
||||
|
||||
.versionadded .versionmodified,
|
||||
.versionchanged .versionmodified,
|
||||
.deprecated .versionmodified,
|
||||
.versionadded > p:first-child > span:first-child,
|
||||
.versionchanged > p:first-child > span:first-child,
|
||||
.deprecated > p:first-child > span:first-child
|
||||
{
|
||||
background-color: #ECF0F3;
|
||||
color: #990000;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.inherited-member {
|
||||
border:1px solid #CCCCCC;
|
||||
padding:5px 5px;
|
||||
|
@ -366,11 +512,12 @@ dl.method > dt,
|
|||
dl.class > dt,
|
||||
dl.exception > dt
|
||||
{
|
||||
background-color:#F0F0F0;
|
||||
background-color: #EFEFEF;
|
||||
margin:25px -10px 10px 10px;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
|
||||
dl.glossary > dt {
|
||||
font-weight:bold;
|
||||
font-size:1.1em;
|
||||
|
|
|
@ -4,10 +4,69 @@ function initSQLPopups() {
|
|||
$('a.sql_link').click(function() {
|
||||
$(this).nextAll('div.popup_sql:first').toggle();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function initFloatyThings() {
|
||||
|
||||
// we use a "fixed" positioning for the sidebar regardless
|
||||
// of whether or not we are moving with the page or not because
|
||||
// we want it to have an independently-moving scrollbar at all
|
||||
// times.
|
||||
// this unfortunately means we either have to keep it steady across
|
||||
// page scrolls or deal with the fact that the text is flowing
|
||||
// under it in some resize/side-scroll scenarios.
|
||||
|
||||
var automatedBreakpoint = $("#docs-container").position().top +
|
||||
$("#docs-top-navigation-container").height();
|
||||
|
||||
var docsBodyOffset = $("#docs-body").offset().top;
|
||||
|
||||
// this turns on the whole thing, without this
|
||||
// we are in graceful degradation assuming no JS
|
||||
$("#fixed-sidebar.withsidebar").addClass("preautomated");
|
||||
|
||||
function setScroll() {
|
||||
var scrolltop = $(window).scrollTop();
|
||||
var fix = scrolltop >= automatedBreakpoint;
|
||||
|
||||
// when page is scrolled down past the top headers,
|
||||
// sidebar stays fixed vertically
|
||||
if (fix) {
|
||||
$("#fixed-sidebar.withsidebar").css("top", 5);
|
||||
}
|
||||
else if (scrolltop < 0) {
|
||||
// special trickery to deal with safari vs. chrome
|
||||
// acting differently in this case, while avoiding using jquery's
|
||||
// weird / slow? offset() setter
|
||||
if ($("#fixed-sidebar.withsidebar").offset().top != docsBodyOffset) {
|
||||
$("#fixed-sidebar.withsidebar").css(
|
||||
"top", docsBodyOffset - scrolltop);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$("#fixed-sidebar.withsidebar").css(
|
||||
"top", docsBodyOffset - scrolltop);
|
||||
}
|
||||
|
||||
// adjusting left scroll is also an option,
|
||||
// but doesn't seem to be worth it, safari is the only browser
|
||||
// that shows much of a change, and overall the adjustment here
|
||||
// is jerky and error-prone esp. on lesser browsers like safari ipad.
|
||||
// looking at our "mentor" documentation, they don't do this;
|
||||
// they just have the whole layout such that you don't really notice
|
||||
// the horizontal squeezing as much (nav is on the right, they don't
|
||||
// have a border around the text making it obvious).
|
||||
}
|
||||
$(window).scroll(setScroll);
|
||||
setScroll();
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
initSQLPopups();
|
||||
if (!$.browser.mobile) {
|
||||
initFloatyThings();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
main site.
|
||||
|
||||
docs-container ->
|
||||
docs-header ->
|
||||
docs-search
|
||||
docs-version-header
|
||||
docs-top-navigation
|
||||
docs-top-page-control
|
||||
docs-navigation-banner
|
||||
docs-top-navigation-container ->
|
||||
docs-header ->
|
||||
docs-version-header
|
||||
docs-top-navigation
|
||||
docs-top-page-control
|
||||
docs-navigation-banner
|
||||
docs-body-container ->
|
||||
docs-sidebar
|
||||
docs-body
|
||||
|
@ -42,6 +42,7 @@ withsidebar = bool(toc) and current_page_name != 'index'
|
|||
${docstitle|h}
|
||||
</%block>
|
||||
|
||||
|
||||
<div id="docs-container">
|
||||
|
||||
|
||||
|
@ -66,6 +67,7 @@ withsidebar = bool(toc) and current_page_name != 'index'
|
|||
% endfor
|
||||
<!-- end iterate through sphinx environment script_files -->
|
||||
|
||||
<script type="text/javascript" src="${pathto('_static/detectmobile.js', 1)}"></script>
|
||||
<script type="text/javascript" src="${pathto('_static/init.js', 1)}"></script>
|
||||
% if hasdoc('about'):
|
||||
<link rel="author" title="${_('About these documents')}" href="${pathto('about')}" />
|
||||
|
@ -89,54 +91,101 @@ withsidebar = bool(toc) and current_page_name != 'index'
|
|||
|
||||
</%block>
|
||||
|
||||
|
||||
<div id="docs-top-navigation-container" class="body-background">
|
||||
<div id="docs-header">
|
||||
<h1>${docstitle|h}</h1>
|
||||
|
||||
<div id="docs-search">
|
||||
Search:
|
||||
<form class="search" action="${pathto('search')}" method="get">
|
||||
<input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="docs-version-header">
|
||||
Release: <span class="version-num">${release}</span> | Release Date: ${release_date}
|
||||
|
||||
% if pdf_url:
|
||||
| <a href="${pdf_url}">Download PDF</a>
|
||||
% endif
|
||||
|
||||
</div>
|
||||
|
||||
<h1>${docstitle|h}</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="docs-top-navigation">
|
||||
<div id="docs-top-page-control" class="docs-navigation-links">
|
||||
<ul>
|
||||
% if prevtopic:
|
||||
<li>Prev:
|
||||
<a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
|
||||
</li>
|
||||
% endif
|
||||
% if nexttopic:
|
||||
<li>Next:
|
||||
<a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
|
||||
</li>
|
||||
% endif
|
||||
<div id="docs-body-container">
|
||||
|
||||
<li>
|
||||
<a href="${pathto('contents')}">Table of Contents</a> |
|
||||
<div id="fixed-sidebar" class="${'withsidebar' if withsidebar else ''}">
|
||||
|
||||
% if not withsidebar:
|
||||
<div id="index-nav">
|
||||
<form class="search" action="${pathto('search')}" method="get">
|
||||
<input type="text" name="q" size="12" /> <input type="submit" value="${_('Search')}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
||||
<p>
|
||||
<a href="${pathto('index')}">Contents</a> |
|
||||
<a href="${pathto('genindex')}">Index</a>
|
||||
% if sourcename:
|
||||
| <a href="${pathto('_sources/' + sourcename, True)|h}">${_('view source')}
|
||||
% if pdf_url:
|
||||
| <a href="${pdf_url}">Download as PDF</a>
|
||||
% endif
|
||||
</li>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
% endif
|
||||
|
||||
% if withsidebar:
|
||||
<div id="docs-sidebar-popout">
|
||||
<h3><a href="${pathto('index')}">${docstitle|h}</a></h3>
|
||||
|
||||
<p id="sidebar-paginate">
|
||||
% if parents:
|
||||
<a href="${parents[-1]['link']|h}" title="${parents[-1]['title']}">Up</a> |
|
||||
% else:
|
||||
<a href="${pathto('index')}" title="${docstitle|h}">Up</a> |
|
||||
% endif
|
||||
|
||||
% if prevtopic:
|
||||
<a href="${prevtopic['link']|h}" title="${prevtopic['title']}">Prev</a> |
|
||||
% endif
|
||||
% if nexttopic:
|
||||
<a href="${nexttopic['link']|h}" title="${nexttopic['title']}">Next</a>
|
||||
% endif
|
||||
</p>
|
||||
|
||||
<p id="sidebar-topnav">
|
||||
<a href="${pathto('index')}">Contents</a> |
|
||||
<a href="${pathto('genindex')}">Index</a>
|
||||
% if pdf_url:
|
||||
| <a href="${pdf_url}">PDF</a>
|
||||
% endif
|
||||
</p>
|
||||
|
||||
<div id="sidebar-search">
|
||||
<form class="search" action="${pathto('search')}" method="get">
|
||||
<input type="text" name="q" size="12" /> <input type="submit" value="${_('Search')}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="docs-sidebar">
|
||||
|
||||
<h3><a href="#">\
|
||||
<%block name="show_title">
|
||||
${title}
|
||||
</%block>
|
||||
</a></h3>
|
||||
${toc}
|
||||
|
||||
% if rtd:
|
||||
<h4>Project Versions</h4>
|
||||
<ul class="version-listing">
|
||||
</ul>
|
||||
% endif
|
||||
|
||||
|
||||
</div>
|
||||
% endif
|
||||
|
||||
</div>
|
||||
|
||||
<div id="docs-navigation-banner">
|
||||
<%doc>
|
||||
<div id="docs-top-navigation">
|
||||
<a href="${pathto('index')}">${docstitle|h}</a>
|
||||
% if parents:
|
||||
% for parent in parents:
|
||||
|
@ -152,47 +201,9 @@ withsidebar = bool(toc) and current_page_name != 'index'
|
|||
${title}
|
||||
</%block>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="docs-body-container">
|
||||
|
||||
% if withsidebar:
|
||||
<div id="docs-sidebar">
|
||||
<h3><a href="${pathto('index')}">Table of Contents</a></h3>
|
||||
${toc}
|
||||
|
||||
% if prevtopic:
|
||||
<h4>Previous Topic</h4>
|
||||
<p>
|
||||
<a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
|
||||
</p>
|
||||
% endif
|
||||
% if nexttopic:
|
||||
<h4>Next Topic</h4>
|
||||
<p>
|
||||
<a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
|
||||
</p>
|
||||
% endif
|
||||
|
||||
% if rtd:
|
||||
<h4>Project Versions</h4>
|
||||
<ul class="version-listing">
|
||||
</ul>
|
||||
% endif
|
||||
|
||||
<h4>Quick Search</h4>
|
||||
<p>
|
||||
<form class="search" action="${pathto('search')}" method="get">
|
||||
<input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
% endif
|
||||
</%doc>
|
||||
|
||||
<div id="docs-body" class="${'withsidebar' if withsidebar else ''}" >
|
||||
${next.body()}
|
||||
|
|
|
@ -14,15 +14,6 @@
|
|||
</script>
|
||||
</%block>
|
||||
|
||||
<div id="searchform">
|
||||
<h3>Enter Search Terms:</h3>
|
||||
<form class="search" action="${pathto('search')}" method="get">
|
||||
<input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="search-results"></div>
|
||||
|
||||
<%block name="footer">
|
||||
|
|
|
@ -23,7 +23,7 @@ def load_name_range(start, end, invalidate=False):
|
|||
The `Person.addresses` collections are also cached. Its basically
|
||||
another level of tuning here, as that particular cache option
|
||||
can be transparently replaced with joinedload(Person.addresses).
|
||||
The effect is that each Person and his/her Address collection
|
||||
The effect is that each Person and their Address collection
|
||||
is cached either together or separately, affecting the kind of
|
||||
SQL that emits for unloaded Person objects as well as the distribution
|
||||
of data within the cache.
|
||||
|
|
|
@ -83,14 +83,15 @@ session.commit()
|
|||
|
||||
print session.query(Employee).all()
|
||||
|
||||
# 1. Find an employee and all his/her supervisors, no matter how deep the tree.
|
||||
# 1. Find an employee and all their supervisors, no matter how deep the tree.
|
||||
ealias = aliased(Employee)
|
||||
print session.query(Employee).\
|
||||
filter(ealias.left.between(Employee.left, Employee.right)).\
|
||||
filter(ealias.emp=='Eddie').all()
|
||||
|
||||
#2. Find the employee and all his/her subordinates. (This query has a nice symmetry with the first query.)
|
||||
print session.query(Employee).\
|
||||
#2. Find the employee and all their subordinates.
|
||||
# (This query has a nice symmetry with the first query.)
|
||||
print(session.query(Employee).\
|
||||
filter(Employee.left.between(ealias.left, ealias.right)).\
|
||||
filter(ealias.emp=='Chuck').all()
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ CREATE TABLE statement for this column will yield::
|
|||
LIMIT/OFFSET Support
|
||||
--------------------
|
||||
|
||||
MSSQL has no support for the LIMIT or OFFSET keysowrds. LIMIT is
|
||||
MSSQL has no support for the LIMIT or OFFSET keywords. LIMIT is
|
||||
supported directly through the ``TOP`` Transact SQL keyword::
|
||||
|
||||
select.limit
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
MySQL Connector/Python is available at:
|
||||
|
||||
https://launchpad.net/myconnpy
|
||||
http://dev.mysql.com/downloads/connector/python/
|
||||
|
||||
|
||||
Connecting
|
||||
-----------
|
||||
|
|
|
@ -120,8 +120,8 @@ class EagerTest(fixtures.MappedTest):
|
|||
self.tables.categories)
|
||||
|
||||
# I want to display a list of tests owned by owner 1
|
||||
# if someoption is false or he hasn't specified it yet (null)
|
||||
# but not if he set it to true (example someoption is for hiding)
|
||||
# if someoption is false or they haven't specified it yet (null)
|
||||
# but not if they set it to true (example someoption is for hiding)
|
||||
|
||||
# desired output for owner 1
|
||||
# test_id, cat_name
|
||||
|
|
Loading…
Reference in New Issue