two levels deep, in conjunction with modification to primary key values,
where those primary key columns are also linked together in a foreign key
relationship as is typical for joined table inheritance. The intermediary
- table in a three-level inheritance hierachy will now get its UPDATE if
+ table in a three-level inheritance hierarchy will now get its UPDATE if
only the primary key value has changed and passive_updates=False (e.g.
foreign key constraints not being enforced), whereas before it would be
skipped; similarly, with passive_updates=True (e.g. ON UPDATE CASCADE in
hybrid attributes when they made use of the ``@hybrid_property.expression``
decorator to return an alternate SQL expression, or when the hybrid
returned an arbitrary :class:`.PropComparator`, at the expression level.
- This involved futher generalization of the heuristics used to detect the
+ This involved further generalization of the heuristics used to detect the
type of object being proxied at the level of :class:`.QueryableAttribute`,
to better detect if the descriptor ultimately serves mapped classes or
column expressions.
:tickets: 4446
Fixed issue in association proxy due to :ticket:`3423` which caused the use
- of custom :class:`.PropComparator` objects with hybrid attribites, such as
+ of custom :class:`.PropComparator` objects with hybrid attributes, such as
the one demonstrated in the ``dictlike-polymorphic`` example to not
function within an association proxy. The strictness that was added in
- :ticket:`3423` has been relaxed, and additional logic to accomodate for
+ :ticket:`3423` has been relaxed, and additional logic to accommodate for
an association proxy that links to a custom hybrid have been added.
.. change::
Reworked :class:`.AssociationProxy` to store state that's specific to a
parent class in a separate object, so that a single
- :class:`.AssocationProxy` can serve for multiple parent classes, as is
+ :class:`.AssociationProxy` can serve for multiple parent classes, as is
intrinsic to inheritance, without any ambiguity in the state returned by it.
A new method :meth:`.AssociationProxy.for_class` is added to allow
inspection of class-specific state.
Fixed bug where declarative would not update the state of the
:class:`.Mapper` as far as what attributes were present, when additional
attributes were added or removed after the mapper attribute collections had
- already been called and memoized. Addtionally, a ``NotImplementedError``
+ already been called and memoized. Additionally, a ``NotImplementedError``
is now raised if a fully mapped attribute (e.g. column, relationship, etc.)
is deleted from a class that is currently mapped, since the mapper will not
function correctly if the attribute has been removed.
Type System Changes
===================
-New Archicture
+New Architecture
--------------
The type system has been completely reworked behind the
a_id = Column(Integer, ForeignKey(A.id), primary_key=True)
b_id = Column(Integer, ForeignKey(B.id), primary_key=True)
-An assigment to ``A.b`` will generate an ``AB`` object::
+An assignment to ``A.b`` will generate an ``AB`` object::
a.b = B()
Enhanced MySQL/MariaDB version string parsing to accommodate for exotic
MariaDB version strings where the "MariaDB" word is embedded among other
alphanumeric characters such as "MariaDBV1". This detection is critical in
- order to correctly accomodate for API features that have split between MySQL
+ order to correctly accommodate for API features that have split between MySQL
and MariaDB such as the "transaction_isolation" system variable.
:func:`.cast`, in that it sets up a Python expression as having a specific SQL
database type, but does not render the ``CAST`` keyword or datatype on the
database side. :func:`.type_coerce` is particularly important when dealing
-with the :class:`.types.JSON` datatype, which typicaly has an intricate
+with the :class:`.types.JSON` datatype, which typically has an intricate
relationship with string-oriented datatypes on different platforms and
may not even be an explicit datatype, such as on SQLite and MariaDB.
Below, we use :func:`.type_coerce` to deliver a Python structure as a JSON
a_id = Column(Integer, ForeignKey(A.id), primary_key=True)
b_id = Column(Integer, ForeignKey(B.id), primary_key=True)
-An assigment to ``A.b`` will generate an ``AB`` object::
+An assignment to ``A.b`` will generate an ``AB`` object::
a.b = B()
'polymorphic_identity': 'manager',
'concrete': True}
-Alternatvely, the same :class:`.Table` objects can be used in
+Alternatively, the same :class:`.Table` objects can be used in
fully "classical" style, without using Declarative at all.
A constructor similar to that supplied by Declarative is illustrated::
The loader strategy for a particular relationship can be configured
at mapping time to take place in all cases where an object of the mapped
-type is loaded, in the absense of any query-level options that modify it.
+type is loaded, in the absence of any query-level options that modify it.
This is configured using the :paramref:`.relationship.lazy` parameter to
:func:`.relationship`; common values for this parameter
include ``select``, ``joined``, ``subquery`` and ``selectin``.
)
missile.blank(window)
if glyph or missile.top_bound:
- # missle is done
+ # missile is done
session.delete(missile)
state["missile"] = None
if glyph:
# score!
score(session, window, state, glyph)
else:
- # move missle up one character.
+ # move missile up one character.
missile.y -= 1
__table_args__ = {"sqlite_autoincrement": True}
"""Use sqlite_autoincrement, to ensure unique integer values
- are used for new rows even for rows taht have been deleted."""
+ are used for new rows even for rows that have been deleted."""
def versioned_objects(iter_):
def _set_empty(self, user_data):
assert (
not self.empty
- ), "This collection adapter is alreay in the 'empty' state"
+ ), "This collection adapter is already in the 'empty' state"
self.empty = True
self.owner_state._empty_collections[self._key] = user_data
# have changed the primary key of the row; propagate this event to
# other columns that expect to have been modified. this normally
# occurs after the UPDATE is emitted however we invoke it here
- # explicitly in the absense of our invoking an UPDATE
+ # explicitly in the absence of our invoking an UPDATE
for m, equated_pairs in mapper._table_to_equated[table]:
sync.populate(
state,
# for a full merge, pre-load the destination collection,
# so that individual _merge of each item pulls from identity
# map for those already present.
- # also assumes CollectionAttrbiuteImpl behavior of loading
+ # also assumes CollectionAttributeImpl behavior of loading
# "old" list in any case
dest_state.get_impl(self.key).get(dest_state, dest_dict)
if not query_info.load_with_join:
# the Bundle we have in the "omit_join" case is against raw, non
# annotated columns, so to ensure the Query knows its primary
- # entity, we add it explictly. If we made the Bundle against
+ # entity, we add it explicitly. If we made the Bundle against
# annotated columns, we hit a performance issue in this specific
# case, which is detailed in issue #4347.
q.add_criteria(lambda q: q.select_from(effective_entity))
elif _is_mapped_class(attr):
# TODO: this does not appear to be a valid codepath. "attr"
# would never be a mapper. This block is present in 1.2
- # as well howver does not seem to be accessed in any tests.
+ # as well however does not seem to be accessed in any tests.
if not orm_util._entity_corresponds_to_use_path_impl(
attr.parent, path[-1]
):
"""keyword sequence filter.
a filter for elements that are intended to represent keyword sequences,
- such as "INITIALLY", "INTIALLY DEFERRED", etc. no special characters
+ such as "INITIALLY", "INITIALLY DEFERRED", etc. no special characters
should be present.
.. versionadded:: 1.3
.. note::
- As refered above, the :paramref:`.MetaData.schema` parameter
+ As referred above, the :paramref:`.MetaData.schema` parameter
only refers to the **default value** that will be applied to
the :paramref:`.Table.schema` parameter of an incoming
:class:`.Table` object. It does not refer to how the
For a :class:`.CompoundSelect`, the
:attr:`.CompoundSelect.selected_columns` attribute returns the selected
- columns of the first SELECT statement contined within the series of
+ columns of the first SELECT statement contained within the series of
statements within the set operation.
.. versionadded:: 1.4
"""Mixin expression adaptations based on lookup tables.
- These rules are currenly used by the numeric, integer and date types
+ These rules are currently used by the numeric, integer and date types
which have detailed cross-expression coercion rules.
"""
go()
- # fails on newer versions of pysqlite due to unusual memory behvior
+ # fails on newer versions of pysqlite due to unusual memory behavior
# in pysqlite itself. background at:
# http://thread.gmane.org/gmane.comp.python.db.pysqlite.user/2290
"1234.58965E-2",
"1.521E+15",
# previously, these were at -1E-25, which were inserted
- # cleanly howver we only got back 20 digits of accuracy.
+ # cleanly however we only got back 20 digits of accuracy.
# pyodbc as of 4.0.22 now disallows the silent truncation.
"-1E-20",
"1E-20",
"WHERE addresses.email_address > :email_address_1",
)
- # second, 'email_address' matches up to the aggreagte, and we get a
+ # second, 'email_address' matches up to the aggregate, and we get a
# smooth JOIN from users->subquery and that's it
self.assert_compile(
sess.query(User, ag2.email_address)
bsub2.a = a2
session.commit()
- assert bsub1.a is a2 # beacuse bsub1.a_member is not a relationship
+ assert bsub1.a is a2 # because bsub1.a_member is not a relationship
assert bsub2.a is a1 # because bsub2.a is viewonly=True
# everyone has a B.a relationship
eq_(h3.hoho, althohoval)
def go():
- # test deferred load of attribues, one select per instance
+ # test deferred load of attributes, one select per instance
self.assert_(h2.hoho == h4.hoho == h5.hoho == hohoval)
self.sql_count_(3, go)
eq_(r.inserted_primary_key, [0])
@testing.fails_on(
- "sqlite", "sqlite autoincremnt doesn't work with composite pks"
+ "sqlite", "sqlite autoincrement doesn't work with composite pks"
)
@testing.provide_metadata
def test_misordered_lastrow(self):
s = select([t, expr])
- # anon_label, e.g. a truncated_label, is used here becuase
+ # anon_label, e.g. a truncated_label, is used here because
# the expr has no name, no key, and myop() can't create a
# string, so this is the last resort
eq_(s.selected_columns.keys(), ["x", "y", expr.anon_label])
# TODO: this case is crazy, sending SELECT or FROMCLAUSE has to
# be figured out - is it a scalar row query? what kinds of
- # statements go into functions in PG. seems likely select statment,
+ # statements go into functions in PG. seems likely select statement,
# but not alias, subquery or other FROM object
self.assert_compile(
select([func.foo(a)]),