properties={
"children": relationship(
_Node, lazy=None
- ), # doesnt load; used only for the save relationship
+ ), # doesn't load; used only for the save relationship
"attributes": relationship(
_Attribute, lazy="joined", cascade="all, delete-orphan"
), # eagerly load attributes
row is inserted with the new data, keeping the old row intact.
This example adds a numerical version_id to the Versioned class as well
-as the ability to see which row is the most "current" vesion.
+as the ability to see which row is the most "current" version.
"""
from sqlalchemy import Boolean
}
if (!PyDict_CheckExact(arg_dict)) {
- // if we didnt get a dict, and got lists of tuples or
+ // if we didn't get a dict, and got lists of tuples or
// keyword args, make a dict
arg_dict = PyObject_Call((PyObject *) &PyDict_Type, args, kw);
if (arg_dict == NULL) {
// support negative indexes. We can also call PySequence_GetItem,
// but here we can stay with the simpler tuple protocol
- // rather than the seqeunce protocol which has to check for
+ // rather than the sequence protocol which has to check for
// __getitem__ methods etc.
if (index < 0)
index += (long)BaseRow_length(self);
// support negative indexes. We can also call PySequence_GetItem,
// but here we can stay with the simpler tuple protocol
- // rather than the seqeunce protocol which has to check for
+ // rather than the sequence protocol which has to check for
// __getitem__ methods etc.
if (index < 0)
index += (long)BaseRow_length(self);
.. versionchanged:: 1.2 the SQL Server dialect now treats brackets as
- identifier delimeters splitting the schema into separate database
+ identifier delimiters splitting the schema into separate database
and owner tokens, to allow dots within either name itself.
.. _legacy_schema_rendering:
)
Note that the default value for ``encoding`` and ``nencoding`` was changed to
-"UTF-8" in cx_Oracle 8.0 so these parameters can be ommitted when using that
+"UTF-8" in cx_Oracle 8.0 so these parameters can be omitted when using that
version, or later.
Options consumed by the SQLAlchemy cx_Oracle dialect outside of the driver
"connection not open",
"could not receive data from server",
"could not send data to server",
- # psycopg2 client errors, psycopg2/conenction.h,
+ # psycopg2 client errors, psycopg2/connection.h,
# psycopg2/cursor.h
"connection already closed",
"cursor already closed",
:class:`_orm.declared_attr` is typically applied as a decorator to a class
level method, turning the attribute into a scalar-like property that can be
invoked from the uninstantiated class. The Declarative mapping process
- looks for these :class:`_orm.declared_attr` callables as it scans classe,
+ looks for these :class:`_orm.declared_attr` callables as it scans classes,
and assumes any attribute marked with :class:`_orm.declared_attr` will be a
callable that will produce an object specific to the Declarative mapping or
table configuration.
)
# it seems to make sense that since these paths get mixed up
# with statements that are cached or not, we should make
- # sure the natural path is cachable across different occurrences
+ # sure the natural path is cacheable across different occurrences
# of equivalent AliasedClass objects. however, so far this
# does not seem to be needed for whatever reason.
# elif not parent.path and self.is_aliased_class:
and pr.key not in self.prop._overlaps
and self.prop.key not in pr._overlaps
# note: the "__*" symbol is used internally by
- # SQLAlchemy as a general means of supressing the
+ # SQLAlchemy as a general means of suppressing the
# overlaps warning for some extension cases, however
# this is not currently
# a publicly supported symbol and may change at
"""
_loose_column_name_matching = False
- """tell the result object that the SQL staement is textual, wants to match
+ """tell the result object that the SQL statement is textual, wants to match
up to Column objects, and may be using the ._tq_label in the SELECT rather
than the base name.
util.raise_(
exc.InvalidRequestError(
"Closure variable named '%s' inside of lambda callable %s "
- "does not refer to a cachable SQL element, and also does not "
+ "does not refer to a cacheable SQL element, and also does not "
"appear to be serving as a SQL literal bound value based on "
"the default "
"SQL expression returned by the function. This variable "
objects maintained by this :class:`_expression.FromClause`.
The :attr:`_sql.FromClause.c` attribute is an alias for the
- :attr:`_sql.FromClause.columns` atttribute.
+ :attr:`_sql.FromClause.columns` attribute.
:return: a :class:`.ColumnCollection`
def foreign_key_constraint_name_reflection(self):
"""Target supports refleciton of FOREIGN KEY constraints and
will return the name of the constraint that was used in the
- "CONSTRANT <name> FOREIGN KEY" DDL.
+ "CONSTRAINT <name> FOREIGN KEY" DDL.
MySQL prior to version 8 and MariaDB prior to version 10.5
don't support this.
assert isinstance(insp.get_columns("ts_t")[1]["type"], TIMESTAMP)
def test_class_hierarchy(self):
- """TIMESTAMP and ROWVERSION aren't datetime types, theyre binary."""
+ """TIMESTAMP and ROWVERSION aren't datetime types, they're binary."""
assert issubclass(TIMESTAMP, sqltypes._Binary)
assert issubclass(ROWVERSION, sqltypes._Binary)
)
def test_string_text_explicit_literal_binds(self):
- # the literal experssion here coerces the right side to
+ # the literal expression here coerces the right side to
# Unicode on Python 3 for plain string, test with unicode
# string just to confirm literal is doing this
self.assert_compile(
"SELECT EXTRACT(%s FROM t.col1) AS anon_1 FROM t" % field,
)
- # millsecondS to millisecond
+ # milliseconds to millisecond
self.assert_compile(
select(extract("milliseconds", t.c.col1)),
"SELECT EXTRACT(millisecond FROM t.col1) AS anon_1 FROM t",
)
def test_index_reflection_partial(self, metadata, connection):
- """Reflect the filter defintion on partial indexes"""
+ """Reflect the filter definition on partial indexes"""
metadata = metadata
def test_symmetric_o2o_inheritance(self):
"""Test that backref 'initiator' catching goes against
a token that is global to all InstrumentedAttribute objects
- within a particular class, not just the indvidual IA object
+ within a particular class, not just the individual IA object
since we use distinct objects in an inheritance scenario.
"""
subq = q.subquery()
- # note this is a bit cutting edge; two differnet entities against
+ # note this is a bit cutting edge; two different entities against
# the same subquery.
uentity = aliased(User, subq)
aentity = aliased(Address, subq)
if expire_jane_age:
asserter.assert_(
# it has to unexpire jane.name, because jane is not fully
- # expired and the critiera needs to look at this particular
+ # expired and the critieria needs to look at this particular
# key
CompiledSQL(
"SELECT users.age_int AS users_age_int, "
else:
asserter.assert_(
# it has to unexpire jane.name, because jane is not fully
- # expired and the critiera needs to look at this particular
+ # expired and the critieria needs to look at this particular
# key
CompiledSQL(
"SELECT users.name AS users_name FROM users "
subq = select(l).subquery()
# this creates a ColumnClause as a proxy to the Label() that has
- # an anoymous name, so the column has one too.
+ # an anonymous name, so the column has one too.
anon_col = subq.c[0]
# then when BindParameter is created, it checks the label
subq = select(l).subquery()
# this creates a ColumnClause as a proxy to the Label() that has
- # an anoymous name, so the column has one too.
+ # an anonymous name, so the column has one too.
anon_col = subq.c[0]
# then when BindParameter is created, it checks the label
subq = select(l).subquery()
# this creates a ColumnClause as a proxy to the Label() that has
- # an anoymous name, so the column has one too.
+ # an anonymous name, so the column has one too.
anon_col = subq.c[0]
assert isinstance(anon_col.name, elements._anonymous_label)
# it's anonymous so unique=True
is_true(original_bind.unique)
- # cache key against hte original param
+ # cache key against the original param
cache_key = stmt._generate_cache_key()
# now adapt the statement
# it's anonymous so unique=True
is_true(original_bind.unique)
- # cache key against hte original param
+ # cache key against the original param
cache_key = stmt._generate_cache_key()
# now adapt the statement and separately adapt the inner
for kw in ("onupdate", "ondelete", "initially"):
for phrase in (
"NOT SQL",
- "INITALLY NOT SQL",
+ "INITIALLY NOT SQL",
"FOO RESTRICT",
"CASCADE WRONG",
"SET NULL",
def _fixture(self):
class MyString(String):
- # supercedes any processing that might be on
+ # supersedes any processing that might be on
# String
def bind_expression(self, bindvalue):
return func.lower(bindvalue)
MyType = self.MyType
# test coerce from nulltype - e.g. use an object that
- # does't match to a known type
+ # doesn't match to a known type
class MyObj(object):
def __str__(self):
return "THISISMYOBJ"
flake8-builtins
flake8-docstrings>=1.3.1
flake8-rst-docstrings
- # flake8-rst-docstrings depdendency, leaving it here
+ # flake8-rst-docstrings dependency, leaving it here
# in case it requires a version pin
pydocstyle
pygments