Mike Bayer [Sun, 23 Sep 2012 16:42:38 +0000 (12:42 -0400)]
- [feature] An explicit error is raised when
a ForeignKeyConstraint() that was
constructed to refer to multiple remote tables
is first used. [ticket:2455]
Mike Bayer [Sun, 23 Sep 2012 15:30:07 +0000 (11:30 -0400)]
- [bug] Adjusted column default reflection code to
convert non-string values to string, to accommodate
old SQLite versions that don't deliver
default info as a string. [ticket:2265]
- factor sqlite column reflection to be like we did for postgresql,
in a separate method.
Mike Bayer [Sat, 22 Sep 2012 20:48:49 +0000 (16:48 -0400)]
- [bug] A tweak to column precedence which moves the
"concat" and "match" operators to be the same as
that of "is", "like", and others; this helps with
parenthesization rendering when used in conjunction
with "IS". [ticket:2564]
Mike Bayer [Sat, 22 Sep 2012 20:14:58 +0000 (16:14 -0400)]
- [bug] Added missing operators is_(), isnot()
to the ColumnOperators base, so that these long-available
operators are present as methods like all
the other operators. [ticket:2544]
Mike Bayer [Sat, 22 Sep 2012 20:03:57 +0000 (16:03 -0400)]
- [bug] Extra logic has been added to the "flush"
that occurs within Session.commit(), such that the
extra state added by an after_flush() or
after_flush_postexec() hook is also flushed in a
subsequent flush, before the "commit" completes.
Subsequent calls to flush() will continue until
the after_flush hooks stop adding new state.
An "overflow" counter of 100 is also in place,
in the event of a broken after_flush() hook
adding new content each time. [ticket:2566]
Mike Bayer [Thu, 20 Sep 2012 22:39:27 +0000 (18:39 -0400)]
- [feature] New session events after_transaction_create
and after_transaction_end
allows tracking of new SessionTransaction objects.
If the object is inspected, can be used to determine
when a session first becomes active and when
it deactivates.
Mike Bayer [Wed, 19 Sep 2012 04:34:30 +0000 (00:34 -0400)]
- [bug] Adjusted a very old bugfix which attempted
to work around a SQLite issue that itself was
"fixed" as of sqlite 3.6.14, regarding quotes
surrounding a table name when using
the "foreign_key_list" pragma. The fix has been
adjusted to not interfere with quotes that
are *actually in the name* of a column or table,
to as much a degree as possible; sqlite still
doesn't return the correct result for foreign_key_list()
if the target table actually has quotes surrounding
its name, as *part* of its name (i.e. """mytable""").
[ticket:2568]
Mike Bayer [Mon, 17 Sep 2012 01:15:55 +0000 (21:15 -0400)]
- [bug] Fixed bug where incorrect type information
would be passed when the ORM would bind the
"version" column, when using the "version" feature.
Tests courtesy Daniel Miller. [ticket:2539]
Mike Bayer [Sun, 16 Sep 2012 21:43:21 +0000 (17:43 -0400)]
- genericize the test for ischema_names
- some fixes to the patch to handle empty args, whitespace
- changelog clarifies where this API fits at the moment
Mike Bayer [Sat, 15 Sep 2012 01:58:19 +0000 (21:58 -0400)]
- [bug] Fixed a disconnect that slowly evolved
between a @declared_attr Column and a
directly-defined Column on a mixin. In both
cases, the Column will be applied to the
declared class' table, but not to that of a
joined inheritance subclass. Previously,
the directly-defined Column would be placed
on both the base and the sub table, which isn't
typically what's desired. [ticket:2565]
Mike Bayer [Mon, 10 Sep 2012 16:58:11 +0000 (12:58 -0400)]
- [feature] The cast() and extract() constructs
will now be produced via the func.* accessor
as well, as users naturally try to access these
names from func.* they might as well do
what's expected, even though the returned
object is not a FunctionElement.
[ticket:2562]
Mike Bayer [Sun, 9 Sep 2012 18:39:25 +0000 (14:39 -0400)]
- [feature] Added a hook to the system of rendering
CREATE TABLE that provides access to the render for each
Column individually, by constructing a @compiles
function against the new schema.CreateColumn
construct. [ticket:2463]
Mike Bayer [Sun, 9 Sep 2012 06:02:01 +0000 (02:02 -0400)]
almost obliterate the concept of "implicit execution" from the docs, move it only
to the "engines and connections" chapter nobody reads, put big green "note:"
boxes with the word "discouraged" in them for "bound metadata", "implicit execution",
"threadlocal strategy"
Mike Bayer [Wed, 5 Sep 2012 22:11:33 +0000 (18:11 -0400)]
- [feature] The types of columns excluded from the
setinputsizes() set can be customized by sending
a list of string DBAPI type names to exclude.
This list was previously fixed. The list also
now defaults to STRING, UNICODE, removing
CLOB, NCLOB from the list. [ticket:2469]
Mike Bayer [Mon, 3 Sep 2012 14:28:26 +0000 (10:28 -0400)]
- type expressions invoke in SQL, but are only for the benefit of columns
delivered to a result set. therefore these expressions should only be rendered
for those columns that are being delivered to the result, thereby preventing
the expression from stacking onto itself within nesting scenarios.
Mike Bayer [Sun, 2 Sep 2012 19:14:09 +0000 (15:14 -0400)]
- fixes for mxODBC, some pyodbc
- enhancements to test suite including ability to set up a testing engine
for a whole test class, fixes to how noseplugin sets up/tears
down per-class context
Mike Bayer [Sat, 1 Sep 2012 00:04:04 +0000 (20:04 -0400)]
- [bug] Fixed a regression since 0.6 regarding
result-row targeting. It should be possible
to use a select() statement with string
based columns in it, that is
select(['id', 'name']).select_from('mytable'),
and have this statement be targetable by
Column objects with those names; this is the
mechanism by which
query(MyClass).from_statement(some_statement)
works. At some point the specific case of
using select(['id']), which is equivalent to
select([literal_column('id')]), stopped working
here, so this has been re-instated and of
course tested. [ticket:2558]
Mike Bayer [Mon, 27 Aug 2012 23:40:12 +0000 (19:40 -0400)]
- [feature] Reworked the startswith(), endswith(),
contains() operators to do a better job with
negation (NOT LIKE), and also to assemble them
at compilation time so that their rendered SQL
can be altered, such as in the case for Firebird
STARTING WITH [ticket:2470]
- [feature] firebird - The "startswith()" operator renders
as "STARTING WITH", "~startswith()" renders
as "NOT STARTING WITH", using FB's more efficient
operator. [ticket:2470]
Mike Bayer [Mon, 27 Aug 2012 20:44:34 +0000 (16:44 -0400)]
- [feature] declared_attr can now be used with
attributes that are not Column or MapperProperty;
including any user-defined value as well
as association proxy objects. [ticket:2517]
Mike Bayer [Mon, 27 Aug 2012 20:04:16 +0000 (16:04 -0400)]
- [feature] Conflicts between columns on
single-inheritance declarative subclasses,
with or without using a mixin, can be resolved
using a new @declared_attr usage described
in the documentation. [ticket:2472]
Mike Bayer [Mon, 27 Aug 2012 19:11:53 +0000 (15:11 -0400)]
- [feature] The "required" flag is set to
True by default, if not passed explicitly,
on bindparam() if the "value" or "callable"
parameters are not passed.
This will cause statement execution to check
for the parameter being present in the final
collection of bound parameters, rather than
implicitly assigning None. [ticket:2556]
Mike Bayer [Sun, 26 Aug 2012 15:30:42 +0000 (11:30 -0400)]
- tweak the GenericFunction constructor more so that it's action in parsing the
arguments is easier to understand
- add a test to ensure generic function can have a custom name
Mike Bayer [Fri, 24 Aug 2012 22:48:42 +0000 (18:48 -0400)]
- [feature] Added support for .info dictionary argument to
column_property(), relationship(), composite().
All MapperProperty classes have an auto-creating .info
dict available overall.
Mike Bayer [Thu, 23 Aug 2012 19:40:09 +0000 (15:40 -0400)]
- [feature] The before_cursor_execute event
fires off for so-called "_cursor_execute"
events, which are usually special-case
executions of primary-key bound sequences
and default-generation SQL
phrases that invoke separately when RETURNING
is not used with INSERT. [ticket:2459]
Mike Bayer [Wed, 22 Aug 2012 22:55:59 +0000 (18:55 -0400)]
- [bug] Fixed bug whereby usage of a UNION
or similar inside of an embedded subquery
would interfere with result-column targeting,
in the case that a result-column had the same
ultimate name as a name inside the embedded
UNION. [ticket:2552]
Mike Bayer [Wed, 22 Aug 2012 22:41:46 +0000 (18:41 -0400)]
- [bug] Fixed cextension bug whereby the
"ambiguous column error" would fail to
function properly if the given index were
a Column object and not a string.
Note there are still some column-targeting
issues here which are fixed in 0.8.
[ticket:2553]
- find more cases where column targeting is being inaccurate, add
more information to result_map to better differentiate "ambiguous"
results from "present" or "not present". In particular, result_map
is sensitive to dupes, even though no error is raised; the conflicting
columns are added to the "obj" member of the tuple so that the two
are both directly accessible in the result proxy
- handwringing over the damn "name fallback" thing in results. can't
really make it perfect yet
- fix up oracle returning clause. not sure why its guarding against
labels, remove that for now and see what the bot says.
Mike Bayer [Wed, 22 Aug 2012 17:54:13 +0000 (13:54 -0400)]
- [feature] Enhanced GenericFunction and func.*
to allow for user-defined GenericFunction
subclasses to be available via the func.*
namespace automatically by classname,
optionally using a package name as well.
Mike Bayer [Mon, 20 Aug 2012 22:18:17 +0000 (18:18 -0400)]
- [feature] The Query.update() method is now
more lenient as to the table
being updated. Plain Table objects are better
supported now, and additional a joined-inheritance
subclass may be used with update(); the subclass
table will be the target of the update,
and if the parent table is referenced in the
WHERE clause, the compiler will call upon
UPDATE..FROM syntax as allowed by the dialect
to satisfy the WHERE clause. Target columns
must still be in the target table i.e.
does not support MySQL's multi-table update
feature (even though this is in Core).
PG's DELETE..USING is also not available
in Core yet.
Mike Bayer [Mon, 20 Aug 2012 21:04:25 +0000 (17:04 -0400)]
- [feature] The Core oeprator system now includes
the `getitem` operator, i.e. the bracket
operator in Python. This is used at first
to provide index and slice behavior to the
Postgresql ARRAY type, and also provides a hook
for end-user definition of custom __getitem__
schemes which can be applied at the type
level as well as within ORM-level custom
operator schemes.
Note that this change has the effect that
descriptor-based __getitem__ schemes used by
the ORM in conjunction with synonym() or other
"descriptor-wrapped" schemes will need
to start using a custom comparator in order
to maintain this behavior.
- [feature] postgresql.ARRAY now supports
indexing and slicing. The Python [] operator
is available on all SQL expressions that are
of type ARRAY; integer or simple slices can be
passed. The slices can also be used on the
assignment side in the SET clause of an UPDATE
statement by passing them into Update.values();
see the docs for examples.
- [feature] Added new "array literal" construct
postgresql.array(). Basically a "tuple" that
renders as ARRAY[1,2,3].