summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-07-17 20:04:22 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-07-17 20:04:22 -0400
commitde115ae40695d8e9fa6d85c629222bec2ea01ff6 (patch)
tree61cb3580b0b0d98d2740c169034e17863ea3499d /doc
parent6051636d89d65ea33f7bf52103110ea274bf062a (diff)
downloadsqlalchemy-de115ae40695d8e9fa6d85c629222bec2ea01ff6.tar.gz
- a big renaming of all the _Underscore classes to have
plain names. The old names are still defined for backwards compatibility. - _BindParamClause renamed to BindParameter
Diffstat (limited to 'doc')
-rw-r--r--doc/build/core/expression_api.rst6
-rw-r--r--doc/build/core/tutorial.rst34
-rw-r--r--doc/build/orm/tutorial.rst2
3 files changed, 21 insertions, 21 deletions
diff --git a/doc/build/core/expression_api.rst b/doc/build/core/expression_api.rst
index fefc8eb59..a49fa38fb 100644
--- a/doc/build/core/expression_api.rst
+++ b/doc/build/core/expression_api.rst
@@ -106,7 +106,7 @@ Classes
:members:
:show-inheritance:
-.. autoclass:: _BindParamClause
+.. autoclass:: BindParameter
:members:
:show-inheritance:
@@ -130,7 +130,7 @@ Classes
:members:
:show-inheritance:
-.. autoclass:: _CompareMixin
+.. autoclass:: CompareMixin
:members:
:show-inheritance:
@@ -211,7 +211,7 @@ Classes
:members:
:show-inheritance:
-.. autoclass:: _SelectBase
+.. autoclass:: SelectBase
:members:
:show-inheritance:
diff --git a/doc/build/core/tutorial.rst b/doc/build/core/tutorial.rst
index 652a2b2db..abb9ea520 100644
--- a/doc/build/core/tutorial.rst
+++ b/doc/build/core/tutorial.rst
@@ -150,7 +150,7 @@ each table first before creating, so it's safe to call multiple times:
()
COMMIT
-.. note::
+.. note::
Users familiar with the syntax of CREATE TABLE may notice that the
VARCHAR columns were generated without a length; on SQLite and Postgresql,
@@ -555,7 +555,7 @@ a WHERE clause. So lets see exactly what that expression is doing:
.. sourcecode:: pycon+sql
>>> users.c.id==addresses.c.user_id #doctest: +ELLIPSIS
- <sqlalchemy.sql.expression._BinaryExpression object at 0x...>
+ <sqlalchemy.sql.expression.BinaryExpression object at 0x...>
Wow, surprise ! This is neither a ``True`` nor a ``False``. Well what is it ?
@@ -836,12 +836,12 @@ once for each address. We create two :class:`.Alias` constructs against
('jack@msn.com', 'jack@yahoo.com')
{stop}[(1, u'jack', u'Jack Jones')]
-Note that the :class:`.Alias` construct generated the names ``addresses_1`` and
+Note that the :class:`.Alias` construct generated the names ``addresses_1`` and
``addresses_2`` in the final SQL result. The generation of these names is determined
by the position of the construct within the statement. If we created a query using
-only the second ``a2`` alias, the name would come out as ``addresses_1``. The
-generation of the names is also *deterministic*, meaning the same SQLAlchemy
-statement construct will produce the identical SQL string each time it is
+only the second ``a2`` alias, the name would come out as ``addresses_1``. The
+generation of the names is also *deterministic*, meaning the same SQLAlchemy
+statement construct will produce the identical SQL string each time it is
rendered for a particular dialect.
Since on the outside, we refer to the alias using the :class:`.Alias` construct
@@ -1027,7 +1027,7 @@ to arrive with a full statement.
Transforming a Statement
------------------------
-We've seen how methods like :meth:`.Select.where` and :meth:`._SelectBase.order_by` are
+We've seen how methods like :meth:`.Select.where` and :meth:`.SelectBase.order_by` are
part of the so-called *Generative* family of methods on the :func:`.select` construct,
where one :func:`.select` copies itself to return a new one with modifications.
SQL constructs also support another form of generative behavior which is
@@ -1232,7 +1232,7 @@ OVER clause, using the :meth:`~.FunctionElement.over` method:
>>> s = select([users.c.id, func.row_number().over(order_by=users.c.name)])
>>> print s # doctest: +NORMALIZE_WHITESPACE
- SELECT users.id, row_number() OVER (ORDER BY users.name) AS anon_1
+ SELECT users.id, row_number() OVER (ORDER BY users.name) AS anon_1
FROM users
Unions and Other Set Operations
@@ -1313,7 +1313,7 @@ Scalar Selects
--------------
To embed a SELECT in a column expression, use
-:func:`~sqlalchemy.sql.expression._SelectBaseMixin.as_scalar`:
+:func:`~sqlalchemy.sql.expression.SelectBase.as_scalar`:
.. sourcecode:: pycon+sql
@@ -1473,7 +1473,7 @@ that can be specified:
{stop}<sqlalchemy.engine.base.ResultProxy object at 0x...>
>>> # with binds, you can also update many rows at once
- {sql}>>> conn.execute(u,
+ {sql}>>> conn.execute(u,
... {'oldname':'jack', 'newname':'ed'},
... {'oldname':'wendy', 'newname':'mary'},
... {'oldname':'jim', 'newname':'jake'},
@@ -1520,7 +1520,7 @@ that refer to multiple tables. For PG and MSSQL, this is the "UPDATE FROM" syn
which updates one table at a time, but can reference additional tables in an additional
"FROM" clause that can then be referenced in the WHERE clause directly. On MySQL,
multiple tables can be embedded into a single UPDATE statement separated by a comma.
-The SQLAlchemy :func:`.update` construct supports both of these modes
+The SQLAlchemy :func:`.update` construct supports both of these modes
implicitly, by specifying multiple tables in the WHERE clause::
stmt = users.update().\
@@ -1531,8 +1531,8 @@ implicitly, by specifying multiple tables in the WHERE clause::
The resulting SQL from the above statement would render as::
- UPDATE users SET name=:name FROM addresses
- WHERE users.id = addresses.id AND
+ UPDATE users SET name=:name FROM addresses
+ WHERE users.id = addresses.id AND
addresses.email_address LIKE :email_address_1 || '%%'
When using MySQL, columns from each table can be assigned to in the
@@ -1540,7 +1540,7 @@ SET clause directly, using the dictionary form passed to :meth:`.Update.values`:
stmt = users.update().\
values({
- users.c.name:'ed wood',
+ users.c.name:'ed wood',
addresses.c.email_address:'ed.wood@foo.com'
}).\
where(users.c.id==addresses.c.id).\
@@ -1548,11 +1548,11 @@ SET clause directly, using the dictionary form passed to :meth:`.Update.values`:
The tables are referenced explicitly in the SET clause::
- UPDATE users, addresses SET addresses.email_address=%s,
- users.name=%s WHERE users.id = addresses.id
+ UPDATE users, addresses SET addresses.email_address=%s,
+ users.name=%s WHERE users.id = addresses.id
AND addresses.email_address LIKE concat(%s, '%%')
-SQLAlchemy doesn't do anything special when these constructs are used on
+SQLAlchemy doesn't do anything special when these constructs are used on
a non-supporting database. The ``UPDATE FROM`` syntax generates by default
when multiple tables are present, and the statement will be rejected
by the database if this syntax is not supported.
diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst
index eb22635e1..f63caffe1 100644
--- a/doc/build/orm/tutorial.rst
+++ b/doc/build/orm/tutorial.rst
@@ -643,7 +643,7 @@ class:
<User('fred','Fred Flinstone', 'blah')> fred
You can control the names of individual column expressions using the
-:meth:`~._CompareMixin.label` construct, which is available from
+:meth:`~.CompareMixin.label` construct, which is available from
any :class:`.ColumnElement`-derived object, as well as any class attribute which
is mapped to one (such as ``User.name``):