Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer a83378b640 - A new construct :class:.Bundle is added, which allows for specification
of groups of column expressions to a :class:`.Query` construct.
The group of columns are returned as a single tuple by default.  The
behavior of :class:`.Bundle` can be overridden however to provide
any sort of result processing to the returned row.  One example included
is :attr:`.Composite.Comparator.bundle`, which applies a bundled form
of a "composite" mapped attribute.
[ticket:2824]
- The :func:`.composite` construct now maintains the return object
when used in a column-oriented :class:`.Query`, rather than expanding
out into individual columns.  This makes use of the new :class:`.Bundle`
feature internally.  This behavior is backwards incompatible; to
select from a composite column which will expand out, use
``MyClass.some_composite.clauses``.
2013-10-03 17:06:55 -04:00
Mike Bayer 78c5249bf7 - add monetdb
- break out into "production" and "experimental"
2013-10-01 13:44:53 -04:00
Mike Bayer fc8c40e8c5 changelog 2013-09-29 17:21:35 -04:00
Mike Bayer 4cace9d3d5 its a feature 2013-09-29 17:16:57 -04:00
Mike Bayer 23fa1b951b changelog 2013-09-29 17:09:25 -04:00
Mike Bayer c3c4b2d23d fix typo [ticket:2827] 2013-09-17 17:48:48 -05:00
Mike Bayer 9910256a51 render "backports"/ "forward ports" automatically, only write out
changelog once
2013-09-17 15:03:15 -05:00
Mike Bayer 5a6895471f - modify what we did in [ticket:2793] so that we can also set the
version id programmatically outside of the generator.   using this system,
we can also leave the version id alone.
2013-09-06 21:39:36 -04:00
Vladimir Magamedov e816754842 Fixed Query.exists() method for the case, when query doesn't have any filters applied. 2013-09-04 11:45:14 -04:00
Mike Bayer fe66951f5d Fixed bug where using the `column_reflect event to change the .key`
of the incoming :class:`.Column` would prevent primary key constraints,
indexes, and foreign key constraints from being correctly reflected.
Also in 0.8.3. [ticket:2811]
2013-08-28 17:25:44 -04:00
Mike Bayer 031ef08078 - A rework to the way that "quoted" identifiers are handled, in that
instead of relying upon various ``quote=True`` flags being passed around,
these flags are converted into rich string objects with quoting information
included at the point at which they are passed to common schema constructs
like :class:`.Table`, :class:`.Column`, etc.   This solves the issue
of various methods that don't correctly honor the "quote" flag such
as :meth:`.Engine.has_table` and related methods.  The :class:`.quoted_name`
object is a string subclass that can also be used explicitly if needed;
the object will hold onto the quoting preferences passed and will
also bypass the "name normalization" performed by dialects that
standardize on uppercase symbols, such as Oracle, Firebird and DB2.
The upshot is that the "uppercase" backends can now work with force-quoted
names, such as lowercase-quoted names and new reserved words.
[ticket:2812]
2013-08-27 20:43:22 -04:00
Mike Bayer df1113ac19 - fix server-side non-returning example
- mention eager_defaults
2013-08-25 15:00:54 -04:00
Mike Bayer b1d8d74b52 migration for version id feature, eager_defaults 2013-08-25 14:37:35 -04:00
Mike Bayer d6ce68727f - The `version_id_generator parameter of Mapper` can now be specified
to rely upon server generated version identifiers, using triggers
or other database-provided versioning features, by passing the value
``False``.  The ORM will use RETURNING when available to immediately
load the new version identifier, else it will emit a second SELECT.
[ticket:2793]
- The ``eager_defaults`` flag of :class:`.Mapper` will now allow the
newly generated default values to be fetched using an inline
RETURNING clause, rather than a second SELECT statement, for backends
that support RETURNING.
- Added a new variant to :meth:`.ValuesBase.returning` called
:meth:`.ValuesBase.return_defaults`; this allows arbitrary columns
to be added to the RETURNING clause of the statement without interfering
with the compilers usual "implicit returning" feature, which is used to
efficiently fetch newly generated primary key values.  For supporting
backends, a dictionary of all fetched values is present at
:attr:`.ResultProxy.returned_defaults`.
- add a glossary entry for RETURNING
- add documentation for version id generation, [ticket:867]
2013-08-25 14:03:54 -04:00
Mike Bayer 2452c49cc4 added "system=True" to Column, so that we generally don't have to bother
with CreateColumn rules
2013-08-25 12:29:22 -04:00
Mike Bayer e9b2e33f15 - The :class:.CreateColumn construct can be appled to a custom
compilation rule which allows skipping of columns, by producing
a rule that returns ``None``.  Also in 0.8.3.
2013-08-24 13:56:01 -04:00
Mike Bayer 41f24ba134 formatting 2013-08-23 18:58:09 -04:00
Mike Bayer 1281b50d6d - update the test times, include pypy, clean up the script 2013-08-21 19:18:18 -04:00
Mike Bayer 9059df8762 add FAQ entry on large inserts 2013-08-21 19:09:01 -04:00
Mike Bayer 0c00892556 fix link 2013-08-21 18:57:00 -04:00
Mike Bayer 4268ea06b3 move FAQ to the docs, [ticket:2133] 2013-08-21 18:48:34 -04:00
Mike Bayer ce6c1557a3 yikes return the modname if no lookup found... 2013-08-21 17:14:19 -04:00
Mike Bayer b13a434f6f Fixed bug where list instrumentation would fail to represent a
setslice of ``[0:0]`` correctly, which in particular could occur
when using ``insert(0, item)`` with the association proxy.  Due
to some quirk in Python collections, the issue was much more likely
with Python 3 rather than 2.  Also in 0.8.3, 0.7.11.
[ticket:2807]
2013-08-20 13:27:27 -04:00
Mike Bayer 5b8e8598ab too small! 2013-08-18 21:29:49 -04:00
Mike Bayer baf6d9214e add some height 2013-08-18 20:49:07 -04:00
Mike Bayer 9302be39a5 additoinal 2013-08-18 18:16:40 -04:00
Mike Bayer 0c19c1c66f - reorganize docs so expression, schema are broken out into subfiles, they're too big
- fix the targeting of module names moved around by using custom handlers for "Bases", etc.
2013-08-18 18:01:27 -04:00
Mike Bayer 806a9b7785 0.9 needs 0.8's changelog also..... 2013-08-18 16:11:15 -04:00
Mike Bayer 676876f466 Fixed a potential issue in an ordered sequence implementation used
by the ORM to iterate mapper hierarchies; under the Jython interpreter
this implementation wasn't ordered, even though cPython and Pypy
maintained ordering.  Also in 0.8.3.
[ticket:2794]
2013-08-18 15:34:23 -04:00
Mike Bayer 902e013ec1 - add better notes to query.update(), most notably how to deal with a joined table
update, [ticket:2798]
2013-08-18 15:01:59 -04:00
Mike Bayer 236db85f96 Fixed regression dating back to 0.7.9 whereby the name of a CTE might
not be properly quoted if it was referred to in multiple FROM clauses.
Also in 0.8.3, 0.7.11. [ticket:2801]
2013-08-18 14:46:04 -04:00
Mike Bayer b83a1564f1 Improved support for the cymysql driver, supporting version 0.6.5,
courtesy Hajime Nakagami.
2013-08-17 00:31:57 -04:00
Mike Bayer ade6b233d7 0.8 changelog 2013-08-17 00:23:37 -04:00
Mike Bayer d102864609 - changelog
- clean up these tests to not use globals so much, close out the session
2013-08-17 00:20:46 -04:00
Mike Bayer efb71bd4f3 Merged in bacher09/sqlalchemy (pull request #5)
Fix typo in comparator_factory example
2013-08-17 00:05:19 -04:00
Mike Bayer 59141d360e - apply an import refactoring to the ORM as well
- rework the event system so that event modules load after their
targets, dependencies are reversed
- create an improved strategy lookup system for the ORM
- rework the ORM to have very few import cycles
- move out "importlater" to just util.dependency
- other tricks to cross-populate modules in as clear a way as possible
2013-08-14 19:58:34 -04:00
Mike Bayer f6198d9abf - A large refactoring of the `sqlalchemy.sql` package has reorganized
the import structure of many core modules.
``sqlalchemy.schema`` and ``sqlalchemy.types``
remain in the top-level package, but are now just lists of names
that pull from within ``sqlalchemy.sql``.  Their implementations
are now broken out among ``sqlalchemy.sql.type_api``, ``sqlalchemy.sql.sqltypes``,
``sqlalchemy.sql.schema`` and ``sqlalchemy.sql.ddl``, the last of which was
moved from ``sqlalchemy.engine``.  ``sqlalchemy.sql.expression`` is also
a namespace now which pulls implementations mostly from ``sqlalchemy.sql.elements``,
``sqlalchemy.sql.selectable``, and ``sqlalchemy.sql.dml``.
Most of the "factory" functions
used to create SQL expression objects have been moved to classmethods
or constructors, which are exposed in ``sqlalchemy.sql.expression``
using a programmatic system.  Care has been taken such that all the
original import namespaces remain intact and there should be no impact
on any existing applications.   The rationale here was to break out these
very large modules into smaller ones, provide more manageable lists
of function names, to greatly reduce "import cycles" and clarify the
up-front importing of names, and to remove the need for redundant
functions and documentation throughout the expression package.
2013-08-12 17:50:37 -04:00
Mike Bayer e8c2a2738b add some more detail about concurrency 2013-08-12 14:20:01 -04:00
Mike Bayer f080b87a61 - more "when do i create the session" docs, get specific
- more glossary terms
- turn the session FAQ into rst sections at last
2013-08-12 11:33:17 -04:00
Slava Bacherikov a34dc8488b Fix typo in comparator_factory example 2013-08-09 17:16:59 +03:00
Severin Orth 0f68eceff4 Typo 2013-08-08 10:09:42 +10:00
Mike Bayer 34ef21909b - The :meth:.Operators.notin_ operator added in 0.8 now properly
produces the negation of the expression "IN" returns
when used against an empty collection.  Also in 0.8.3.
2013-08-07 13:28:45 -05:00
Mike Bayer 4d132c38af Added a new attribute :attr:.Session.info to :class:.Session;
this is a dictionary where applications can store arbitrary
data local to a :class:`.Session`.
The contents of :attr:`.Session.info` can be also be initialized
using the ``info`` argument of :class:`.Session` or
:class:`.sessionmaker`.
2013-08-02 12:39:29 -04:00
Mike Bayer 25839c064d Updates to MySQL reserved words for versions 5.5, 5.6, courtesy
Hanno Schlichting.  Also in 0.8.3, 0.7.11.
[ticket:2791]
2013-07-31 21:05:33 -04:00
Mike Bayer b27ee74f18 fix changelog 2013-07-31 18:50:16 -04:00
Mike Bayer 8b0f4d2a92 - Fixed bug in common table expression system where if the CTE were
used only as an ``alias()`` construct, it would not render using the
WITH keyword.  Also in 0.8.3, 0.7.11.
[ticket:2783]
2013-07-31 18:42:58 -04:00
Mike Bayer 20b7c03729 last updated 2013-07-27 18:38:40 -04:00
Mike Bayer a6adc0a53e - The C extensions are ported to Python 3 and will build under
any supported CPython 2 or 3 environment. [ticket:2161]
2013-07-26 20:50:18 -04:00
Mike Bayer c903f071a8 - add event.contains() function to the event package, returns True
if the given target/event/fn is set up to listen.
- repair mutable package which is doing some conditional event listening
2013-07-26 19:11:33 -04:00
Mike Bayer 4505425a38 - Removal of event listeners is now implemented. The feature is
provided via the :func:`.event.remove` function.
[ticket:2268]
- reorganization of event.py module into a package; with the addition of the
docstring work as well as the new registry for removal, there's a lot more code now.
the package separates concerns and provides a top-level doc for each subsection
of functionality
- the remove feature works by providing the EventKey object which associates
the user-provided arguments to listen() with a global, weak-referencing registry.
This registry stores a collection of _ListenerCollection and _DispatchDescriptor
objects associated with each set of arguments, as well as the wrapped function
which was applied to that collection.  The EventKey can then be recreated for
a removal, all the _ListenerCollection and _DispatchDescriptor objects are located,
and the correct wrapped function is removed from each one.
2013-07-26 14:21:58 -04:00