summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/firebird
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-07-28 15:50:05 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-07-28 15:50:05 -0400
commit27913554a85c308d81e6c018669d0246ceecc639 (patch)
tree191305298ce66000c95c9c8fec1e27350f0d206e /lib/sqlalchemy/dialects/firebird
parent90571b3a3a4eca329ec14e9bd142ad2b96526d99 (diff)
downloadsqlalchemy-27913554a85c308d81e6c018669d0246ceecc639.tar.gz
trailing whitespace bonanza
Diffstat (limited to 'lib/sqlalchemy/dialects/firebird')
-rw-r--r--lib/sqlalchemy/dialects/firebird/base.py18
-rw-r--r--lib/sqlalchemy/dialects/firebird/kinterbasdb.py24
2 files changed, 21 insertions, 21 deletions
diff --git a/lib/sqlalchemy/dialects/firebird/base.py b/lib/sqlalchemy/dialects/firebird/base.py
index a0e48da2c..f3ab73467 100644
--- a/lib/sqlalchemy/dialects/firebird/base.py
+++ b/lib/sqlalchemy/dialects/firebird/base.py
@@ -135,7 +135,7 @@ class VARCHAR(_StringType, sqltypes.VARCHAR):
__visit_name__ = 'VARCHAR'
def __init__(self, length = None, **kwargs):
- super(VARCHAR, self).__init__(length=length, **kwargs)
+ super(VARCHAR, self).__init__(length=length, **kwargs)
class CHAR(_StringType, sqltypes.CHAR):
"""Firebird CHAR type"""
@@ -164,7 +164,7 @@ ischema_names = {
}
-# TODO: date conversion types (should be implemented as _FBDateTime,
+# TODO: date conversion types (should be implemented as _FBDateTime,
# _FBDate, etc. as bind/result functionality is required)
class FBTypeCompiler(compiler.GenericTypeCompiler):
@@ -339,7 +339,7 @@ class FBExecutionContext(default.DefaultExecutionContext):
"""Get the next value from the sequence using ``gen_id()``."""
return self._execute_scalar(
- "SELECT gen_id(%s, 1) FROM rdb$database" %
+ "SELECT gen_id(%s, 1) FROM rdb$database" %
self.dialect.identifier_preparer.format_sequence(seq),
type_
)
@@ -418,7 +418,7 @@ class FBDialect(default.DefaultDialect):
return name
def has_table(self, connection, table_name, schema=None):
- """Return ``True`` if the given table exists, ignoring
+ """Return ``True`` if the given table exists, ignoring
the `schema`."""
tblqry = """
@@ -489,8 +489,8 @@ class FBDialect(default.DefaultDialect):
return {'constrained_columns':pkfields, 'name':None}
@reflection.cache
- def get_column_sequence(self, connection,
- table_name, column_name,
+ def get_column_sequence(self, connection,
+ table_name, column_name,
schema=None, **kw):
tablename = self.denormalize_name(table_name)
colname = self.denormalize_name(column_name)
@@ -528,7 +528,7 @@ class FBDialect(default.DefaultDialect):
COALESCE(cs.rdb$bytes_per_character,1) AS flen,
f.rdb$field_precision AS fprec,
f.rdb$field_scale AS fscale,
- COALESCE(r.rdb$default_source,
+ COALESCE(r.rdb$default_source,
f.rdb$default_source) AS fdefault
FROM rdb$relation_fields r
JOIN rdb$fields f ON r.rdb$field_source=f.rdb$field_name
@@ -564,7 +564,7 @@ class FBDialect(default.DefaultDialect):
coltype = sqltypes.NULLTYPE
elif colspec == 'INT64':
coltype = coltype(
- precision=row['fprec'],
+ precision=row['fprec'],
scale=row['fscale'] * -1)
elif colspec in ('VARYING', 'CSTRING'):
coltype = coltype(row['flen'])
@@ -583,7 +583,7 @@ class FBDialect(default.DefaultDialect):
if row['fdefault'] is not None:
# the value comes down as "DEFAULT 'value'": there may be
# more than one whitespace around the "DEFAULT" keyword
- # and it may also be lower case
+ # and it may also be lower case
# (see also http://tracker.firebirdsql.org/browse/CORE-356)
defexpr = row['fdefault'].lstrip()
assert defexpr[:8].rstrip().upper() == \
diff --git a/lib/sqlalchemy/dialects/firebird/kinterbasdb.py b/lib/sqlalchemy/dialects/firebird/kinterbasdb.py
index d9d749b3c..a5dc821be 100644
--- a/lib/sqlalchemy/dialects/firebird/kinterbasdb.py
+++ b/lib/sqlalchemy/dialects/firebird/kinterbasdb.py
@@ -17,20 +17,20 @@ Kinterbasedb backend specific keyword arguments are:
SQLAlchemy uses 200 with Unicode, datetime and decimal support (see
details__).
-* concurrency_level - set the backend policy with regards to threading
+* concurrency_level - set the backend policy with regards to threading
issues: by default SQLAlchemy uses policy 1 (see details__).
-* enable_rowcount - True by default, setting this to False disables
- the usage of "cursor.rowcount" with the
+* enable_rowcount - True by default, setting this to False disables
+ the usage of "cursor.rowcount" with the
Kinterbasdb dialect, which SQLAlchemy ordinarily calls upon automatically
- after any UPDATE or DELETE statement. When disabled, SQLAlchemy's
- ResultProxy will return -1 for result.rowcount. The rationale here is
- that Kinterbasdb requires a second round trip to the database when
- .rowcount is called - since SQLA's resultproxy automatically closes
- the cursor after a non-result-returning statement, rowcount must be
+ after any UPDATE or DELETE statement. When disabled, SQLAlchemy's
+ ResultProxy will return -1 for result.rowcount. The rationale here is
+ that Kinterbasdb requires a second round trip to the database when
+ .rowcount is called - since SQLA's resultproxy automatically closes
+ the cursor after a non-result-returning statement, rowcount must be
called, if at all, before the result object is returned. Additionally,
cursor.rowcount may not return correct results with older versions
- of Firebird, and setting this flag to False will also cause the
+ of Firebird, and setting this flag to False will also cause the
SQLAlchemy ORM to ignore its usage. The behavior can also be controlled on a
per-execution basis using the `enable_rowcount` option with
:meth:`execution_options()`::
@@ -64,7 +64,7 @@ class _FBNumeric_kinterbasdb(sqltypes.Numeric):
class FBExecutionContext_kinterbasdb(FBExecutionContext):
@property
def rowcount(self):
- if self.execution_options.get('enable_rowcount',
+ if self.execution_options.get('enable_rowcount',
self.dialect.enable_rowcount):
return self.cursor.rowcount
else:
@@ -135,7 +135,7 @@ class FBDialect_kinterbasdb(FBDialect):
# that for backward compatibility reasons returns a string like
# LI-V6.3.3.12981 Firebird 2.0
# where the first version is a fake one resembling the old
- # Interbase signature.
+ # Interbase signature.
fbconn = connection.connection
version = fbconn.server_version
@@ -159,7 +159,7 @@ class FBDialect_kinterbasdb(FBDialect):
msg = str(e)
return ('Unable to complete network request to host' in msg or
'Invalid connection state' in msg or
- 'Invalid cursor state' in msg or
+ 'Invalid cursor state' in msg or
'connection shutdown' in msg)
else:
return False