| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
| |
labelnames that match a column name in the table,
i.e. generates "tablename_id" for "id", instead of
"tablename_id_1" in an attempt to avoid naming
conflicts, when the table has a column actually
named "tablename_id" - this is because
the labeling logic is always applied to all columns
so a naming conflict will never occur.
|
|
|
|
|
|
|
| |
"dbo.master", are now rendered in select() labels
with underscores for dots, i.e. "dbo_master_table_column".
This is a "friendly" label that behaves better
in result sets. [ticket:1428]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lazy load will fallback to the possibly cached query.get()
value, now works across join conditions where the two compared
types are not exactly the same class, but share the same
"affinity" - i.e. Integer and SmallInteger. Also allows
combinations of reflected and non-reflected types to work
with 0.5 style type reflection, such as PGText/Text (note 0.6
reflects types as their generic versions). [ticket:1556]
- types now support an "affinity comparison" operation, i.e.
that an Integer/SmallInteger are "compatible", or
a Text/String, PickleType/Binary, etc. Part of
[ticket:1556].
|
|
|
|
| |
on each execution.
|
|
|
|
|
|
| |
- removed "key" accessor of Function, Grouping - this doesn't seem to be used for anything
- various formatting
- documented the four "Element" classes in the compiler extension as per [ticket:1590]
|
|
|
|
| |
implement #809 directly
|
|
|
|
| |
- added native_enum=False flag to do the same on MySQL, PG, if desired
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
construct and extends the generic Enum type. Automatically
associates itself with tables and their parent metadata
to issue the appropriate CREATE TYPE/DROP TYPE
commands as needed, supports unicode labels, supports
reflection. [ticket:1511]
- MySQL ENUM now subclasses the new generic Enum type, and also handles
unicode values implicitly, if the given labelnames are unicode
objects.
- Added a new Enum generic type, currently supported on
Postgresql and MySQL. Enum is a schema-aware object
to support databases which require specific DDL in
order to use enum or equivalent; in the case of PG
it handles the details of `CREATE TYPE`, and on
other databases without native enum support can
support generation of CHECK constraints.
[ticket:1109] [ticket:1511]
- types documentation updates
- some cleanup on schema/expression docs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- deprecated PassiveDefault - use DefaultClause.
- the BINARY and MSBinary types now generate "BINARY" in all
cases. Omitting the "length" parameter will generate
"BINARY" with no length. Use BLOB to generate an unlengthed
binary column.
- the "quoting='quoted'" argument to MSEnum/ENUM is deprecated.
It's best to rely upon the automatic quoting.
- "shortname" attribute on bindparam() is removed.
- fold_equivalents flag on join is deprecated (will remain
until [ticket:1131] is implemented)
- "scalar" flag on select() is removed, use
select.as_scalar().
- 'transactional' flag on sessionmaker() and others is
removed. Use 'autocommit=True' to indicate 'transactional=False'.
- 'polymorphic_fetch' argument on mapper() is removed.
Loading can be controlled using the 'with_polymorphic'
option.
- 'select_table' argument on mapper() is removed. Use
'with_polymorphic=("*", <some selectable>)' for this
functionality.
- 'proxy' argument on synonym() is removed. This flag
did nothing throughout 0.5, as the "proxy generation"
behavior is now automatic.
- Passing a single list of elements to eagerload(),
eagerload_all(), contains_eager(), lazyload(),
defer(), and undefer() instead of multiple positional
-args is deprecated.
- Passing a single list of elements to query.order_by(),
query.group_by(), query.join(), or query.outerjoin()
instead of multiple positional *args is deprecated.
- query.iterate_instances() is removed. Use query.instances().
- Query.query_from_parent() is removed. Use the
sqlalchemy.orm.with_parent() function to produce a
"parent" clause, or alternatively query.with_parent().
- query._from_self() is removed, use query.from_self()
instead.
- the "comparator" argument to composite() is removed.
Use "comparator_factory".
- RelationProperty._get_join() is removed.
- the 'echo_uow' flag on Session is removed. Use
logging on the "sqlalchemy.orm.unitofwork" name.
- session.clear() is removed. use session.expunge_all().
- session.save(), session.update(), session.save_or_update()
are removed. Use session.add() and session.add_all().
- the "objects" flag on session.flush() remains deprecated.
- the "dont_load=True" flag on session.merge() is deprecated
in favor of "load=False".
- passing an InstanceState (internal SQLAlchemy state object) to
attributes.init_collection() or attributes.get_history() is
deprecated. These functions are public API and normally
expect a regular mapped object instance.
- the 'engine' parameter to declarative_base() is removed.
Use the 'bind' keyword argument.
|
|
|
|
|
|
|
|
|
|
|
|
| |
sets require that all keys are present which are
present in the first bound parameter set. The structure
and behavior of an insert/update statement is very much
determined by the first parameter set, including which
defaults are going to fire off, and a minimum of
guesswork is performed with all the rest so that performance
is not impacted. For this reason defaults would otherwise
silently "fail" for missing parameters, so this is now guarded
against. [ticket:1566]
|
|
|
|
|
|
| |
adds a __nonzero__ to _BinaryExpression to avoid faulty comparisons during hash
collisions (which only occur on Jython)
fixes #1547
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"use_get" operation
- many-to-one relation to a joined-table subclass now uses get()
for a simple load (known as the "use_get" condition),
i.e. Related->Sub(Base), without the need
to redefine the primaryjoin condition in terms of the base
table. [ticket:1186]
- specifying a foreign key with a declarative column,
i.e. ForeignKey(MyRelatedClass.id) doesn't break the "use_get"
condition from taking place [ticket:1492]
|
| |
|
| |
|
| |
|
|
|
|
|
| |
type handling to result sets, allowing conversions like
unicode and such to take place. [ticket:1420]
|
|
|
|
|
|
| |
the string "field" argument was getting treated as a
ClauseElement, causing various errors within more
complex SQL transformations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removed an obscure feature of execute() (including connection,
engine, Session) whereby a bindparam() construct can be sent as
a key to the params dictionary. This usage is undocumented
and is at the core of an issue whereby the bindparam() object
created implicitly by a text() construct may have the same
hash value as a string placed in the params dictionary and
may result in an inappropriate match when computing the final
bind parameters. Internal checks for this condition would
add significant latency to the critical task of parameter
rendering, so the behavior is removed. This is a backwards
incompatible change for any application that may have been
using this feature, however the feature has never been
documented.
|
|
|
|
|
| |
primary key, and it will be populated with the correct
discriminator value. [ticket:1300]
|
|
|
|
|
|
|
| |
Explicit imports make it easier for users to understand the examples.
Additionally a lot of the examples were fixed to work with the changes in the
0.5.x code base. One small correction to the Case expression. Thanks a bunch
to Adam Lowry! Fixes #717.
|
| |
|
|
|
|
|
|
|
|
|
| |
SQL clause matches the clause used by get(), but
contains some parameters hardcoded. Previously
the lazy strategy would fail with the get(). Ideally
get() would be used with the hardcoded parameters
but this would require further development.
[ticket:1357]
|
|
|
|
|
|
| |
when used in an unambiguously scalar context, i.e. it's used
in a comparison operation. This applies to
the ORM when using query.subquery() as well.
|
|
|
|
| |
by an EXISTS or other embedded FROM construct.
|
|
|
|
|
| |
when used in a select() with use_labels (such as when used
in an ORM column_property()). [ticket:1302]
|
| |
|
|
|
|
|
|
|
|
| |
- Function rolls the various standalone execution functionality of CC into itself,
accesses its internal state more directly
- collate just uses _BinaryExpression, don't know why it didn't do this already
- added new _Case construct, compiles directly
- the world is a happier place
|
|
|
|
|
|
|
|
|
|
| |
its selectable, which means a Query instance can be accepted
in many SQL expressions, including col.in_(query),
union(query1, query2), select([foo]).select_from(query),
etc.
- the __selectable__() interface has been replaced entirely
by __clause_element__().
|
|
|
|
|
|
|
|
| |
names" functionality. [ticket:1284]
- Still doesn't work for PG/MySQL, which unfortunately would require
post_process_text() calls all over the place. Perhaps % escaping
can be assembled into IdentifierPreparer.quote() since that's where
identifier names are received.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the rendering of eager joins inside the subquery produced.
The "disable all eager joins" feature is available publically
via a new query.enable_eagerloads() generative. [ticket:1276]
- Added a rudimental series of set operations to Query that
receive Query objects as arguments, including union(),
union_all(), intersect(), except_(), insertsect_all(),
except_all(). See the API documentation for
Query.union() for examples.
- Fixed bug that prevented Query.join() and eagerloads from
attaching to a query that selected from a union or aliased union.
|
|
|
|
|
|
| |
names from [ticket:1256]. Added more tests. MySQL and
Postgres dialects still do not issue correct CREATE TABLE
statements for identifiers with percent signs in them.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
impact a Query made against a selectable containing
multiple versions of the same table, as well as
unions and similar which contained the same table columns
in different column positions at different levels.
[ticket:1268]
|
|
|
|
|
|
|
| |
class. It can be subclassed to provide user-defined
SQL functions in an imperative style, including
with pre-established behaviors. The postgis.py
example illustrates one usage of this.
|
|
|
|
|
|
|
|
|
| |
to query.update({}). [ticket:1262]
- Mapped attributes passed to the values() of an
expression level insert() or update() will use the
keys of the mapped columns, not that of the mapped
attribute.
|
|
|
|
|
|
| |
__setslice__ related warnings
I don't really know how to get rid of
|
|
|
|
|
|
|
|
| |
testing issues,
and also addresses a significant chunk of py3k deprecations. It's mainly
expicit __hash__ methods. Additionally, most usage of sets/dicts to store columns uses
util-based placeholder names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as a column expression and it will be expanded.
Somewhat related to [ticket:1253].
- Query() is a little more robust when passed
various column expressions such as strings,
clauselists, text() constructs (which may mean
it just raises an error more nicely).
- select() can accept a ClauseList as a column
in the same way as a Table or other selectable
and the interior expressions will be used as
column elements. [ticket:1253]
- removed erroneous FooTest from test/orm/query
-This line, and those below, will be ignored--
M test/orm/query.py
M test/orm/mapper.py
M test/sql/select.py
M lib/sqlalchemy/orm/query.py
M lib/sqlalchemy/sql/expression.py
M CHANGES
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a private method. Subclassing Connection
is not needed now that ConnectionProxy
is available.
- tightened the interface for the various _execute_XXX()
methods to reduce ambiguity
- __distill_params() no longer creates artificial [{}] entry,
blank dict is no longer passed through to do_execute()
in any case unless explicitly sent from the outside
as in connection.execute("somestring"), {})
- fixed a few old sql.query tests which were doing that
- removed needless do_execute() from mysql dialect
- fixed charset param not properly being sent to
_compat_fetchone() in mysql
|
|
|
|
| |
[ticket:1244]
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- insert/update/delete are documented generatively
- values({}) is no longer deprecated, thus enabling
unicode/Columns as keys
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Documentation has been converted to Sphinx.
In particular, the generated API documentation
has been constructed into a full blown
"API Reference" section which organizes
editorial documentation combined with
generated docstrings. Cross linking between
sections and API docs are vastly improved,
a javascript-powered search feature is
provided, and a full index of all
classes, functions and members is provided.
|
|
|
|
|
|
|
|
| |
any order_by() that has been applied to the
select()s inside. If you union() a
select() with order_by() (presumably to support
LIMIT/OFFSET), you should also call self_group()
on it to apply parenthesis.
|