Commit Graph

149 Commits

Author SHA1 Message Date
Mike Bayer 87bbba32bc - [feature] The behavior of column targeting
in result sets is now case sensitive by
default.   SQLAlchemy for many years would
run a case-insensitive conversion on these values,
probably to alleviate early case sensitivity
issues with dialects like Oracle and
Firebird.   These issues have been more cleanly
solved in more modern versions so the performance
hit of calling lower() on identifiers is removed.
The case insensitive comparisons can be re-enabled
by setting "case_insensitive=False" on
create_engine().  [ticket:2423]
2012-04-24 16:03:00 -04:00
Mike Bayer 1bab44c2ba callcount tweak here, this moved up due to r5b6237e3f068 2012-04-24 11:34:56 -04:00
Mike Bayer 841ea194bd - [removed] The legacy "mutable" system of the
ORM, including the MutableType class as well
as the mutable=True flag on PickleType
and postgresql.ARRAY has been removed.
In-place mutations are detected by the ORM
using the sqlalchemy.ext.mutable extension,
introduced in 0.7.   The removal of MutableType
and associated constructs removes a great
deal of complexity from SQLAlchemy's internals.
The approach performed poorly as it would incur
a scan of the full contents of the Session
when in use. [ticket:2442]
2012-04-23 18:59:17 -04:00
Mike Bayer 101da94e12 the callcounts are greater here since object_mapper() has a little more overhead to it now 2012-04-23 18:53:58 -04:00
Mike Bayer ee5dd855a7 - some adjustments to keep hybrid properties working
- callcount here seems to have gone up by five, reason not certain
2012-04-23 12:48:26 -04:00
Mike Bayer 713a4e19fa - merged #1401 branch from bitbucket
- resolved some serious speed hits I missed, we need to ensure
only deannotated columns are used in the local/remote collections and soforth
so that hash lookups against mapped columns don't dig into __eq__()
- fix some other parity mismatches regarding stuff from [ticket:2453],
including finding another case where _deep_annotate() was doing the wrong thing,
new tests.
- [feature] Major rewrite of relationship()
internals now allow join conditions which
include columns pointing to themselves
within composite foreign keys.   A new
API for very specialized primaryjoin conditions
is added, allowing conditions based on
SQL functions, CAST, etc. to be handled
by placing the annotation functions
remote() and foreign() inline within the
expression when necessary.  Previous recipes
using the semi-private _local_remote_pairs
approach can be upgraded to this new
approach. [ticket:1401]
2012-04-22 19:43:31 -04:00
Mike Bayer 768bd7ec0a callcounts for py3k 2012-03-14 17:19:15 -07:00
Mike Bayer c235b4a335 callcounts 2012-03-14 15:30:10 -07:00
Mike Bayer 5448f6129c - [bug] Fixed memory leak in core which would
occur when C extensions were used with
  particular types of result fetches,
  in particular when orm query.count()
  were called.  [ticket:2427]
2012-03-10 16:18:52 -08:00
Mike Bayer be71c73f61 callcount tweak 2012-03-05 15:20:07 -05:00
Mike Bayer d60bc21fc6 fix callcount 2012-02-26 19:42:16 -05:00
Mike Bayer 28a5529fbf callcounts 2012-02-15 11:50:01 -05:00
Mike Bayer 7feaad21e6 test failures 2012-02-15 10:13:47 -05:00
Mike Bayer 2876573482 callcount adjust 2012-02-05 15:48:15 -05:00
Mike Bayer a4e3bc61bc - [bug] A significant change to how labeling
is applied to columns in SELECT statements
allows "truncated" labels, that is label names
that are generated in Python which exceed
the maximum identifier length (note this is
configurable via label_length on create_engine()),
to be properly referenced when rendered inside
of a subquery, as well as to be present
in a result set row using their original
in-Python names.   [ticket:2396]

- apply pep8 to test_labels
2012-02-05 14:22:55 -05:00
Mike Bayer 34fd58c793 callcount 2011-12-07 15:14:46 -05:00
Mike Bayer 00b7f8be52 some call count reduction 2011-12-03 20:59:56 -05:00
Mike Bayer 699146086d - [bug] Fixed bug whereby column_property() created
against ORM-level column could be treated as
a distinct entity when producing certain
kinds of joined-inh joins.  [ticket:2316]

- [bug] related to [ticket:2316], made some
adjustments to the change from [ticket:2261]
regarding the "from" list on a select(). The
_froms collection is no longer memoized, as this
simplifies various use cases and removes the
need for a "warning" if a column is attached
to a table after it was already used in an
expression - the select() construct will now
always produce the correct expression.
There's probably no real-world
performance hit here; select() objects are
almost always made ad-hoc, and systems that
wish to optimize the re-use of a select()
would be using the "compiled_cache" feature.
A hit which would occur when calling select.bind
has been reduced, but the vast majority
of users shouldn't be using "bound metadata"
anyway :).
2011-12-03 19:50:01 -05:00
Mike Bayer 4de3b28abc fixes to actually get tests to pass 2011-11-22 18:05:05 -05:00
Mike Bayer e61a443849 minor callcount bump resulting from r3876c9c0b9a4 2011-09-09 17:18:10 -04:00
Mike Bayer 76a9219a1e - Added a slightly nicer __repr__() to SchemaItem
classes.  Note the repr here can't fully support
the "repr is the constructor" idea since schema
items can be very deeply nested/cyclical, have
late initialization of some things, etc.
[ticket:2223]
2011-08-14 12:20:54 -04:00
Mike Bayer f5f49f50c8 - add test profiling merge() behavior when merging lots of bidirectional collections/m2os,
collections present in given merge field.   This shows that the change proposed
in [ticket:2221] adds over 10% method call overhead including significantly more
SQL statements.
2011-08-12 22:48:40 -04:00
Mike Bayer eae80bb046 put some variance on this as it's a difference between 9 and 60 calls 2011-06-04 21:58:56 -04:00
Mike Bayer 09080baad1 - Adjusted the __contains__() method of
a RowProxy result row such that no exception
throw is generated internally;
NoSuchColumnError() also will generate its
message regardless of whether or not the column
construct can be coerced to a string.
[ticket:2178].  Also in 0.6.8.
2011-06-04 20:52:30 -04:00
Mike Bayer fdbfed3f30 - this helps oracle here since it has a panic attack otherwise 2011-04-25 22:51:58 -04:00
Mike Bayer 1092fd6590 uurg, add a use_reaper argument and have zoomark skip the reaping for its very special mode of operation... 2011-04-25 22:29:59 -04:00
Mike Bayer e1ec36fc9e - hardcore force every connection into a strong-referenced set, rollback on every test, close on every context.
this uses pool events but bypasses the pool's fairy/record/dispose services.   pypy still seems to expose
some holes in that at least as far as what some (or maybe just one, cant find it yet) of the tests does.
haven't tested this too deeply, just on sqlite + postgres, cypthon 2.7 + pypy.   will see what the buildbot
says
2011-04-25 21:50:26 -04:00
Mike Bayer 46ee78431c mark all aaa_profiling tests with __requires__ = 'cpython', 2011-04-23 12:34:38 -07:00
Mike Bayer fbcfd079de callcount update for cext + 2.7 2011-04-17 15:00:27 -04:00
Mike Bayer 898e347143 - callcounts
- clean out pool._refs in the test_pool perf tests, make things simple
2011-04-08 16:21:09 -04:00
Mike Bayer da938820ec - fix a callcount
- remove extra _load_fixtures() method.   using the classbound version as the fixtures
seem to have everything classlevel at the moment (wondering if we want to change that
for non-classlevel setup/teardown)
2011-03-27 18:16:40 -04:00
Mike Bayer 68a350d462 - remove test.sql._base, test.engine._base, test.orm._base, move those classes to a new test.lib.fixtures module
- move testing.TestBase to test.lib.fixtures
- massive search and replace
2011-03-27 16:27:27 -04:00
Mike Bayer a3083eabf4 - move all the setup_classes(cls) and setup_mappers(cls) to use a
local cls.Basic, cls.Comparable base class so that there is no ambiguity
or hash identity behaviors getting in the way of class registration.
2011-03-27 15:04:06 -04:00
Mike Bayer 14a2fae239 - remove @testing.resolve_artifact_names, replace with direct attribute
access to the cls/self.tables/classes registries
- express orm/_base.py ORMTest in terms of engine/_base.py TablesTest,
factor out common steps into TablesTest, remove AltEngineTest as a
separate class.   will further consolidate these base classes
2011-03-26 19:03:11 -04:00
Mike Bayer 429227fbae - pulling out the PG type impls in create table knocked the counts out a bit (I am assuming/guessing). 2011-02-18 21:32:39 -05:00
Mike Bayer 3f30fb065c - The compiler extension now supports overriding the default
compilation of expression._BindParamClause including that
the auto-generated binds within the VALUES/SET clause
of an insert()/update() statement will also use the new
compilation rules. [ticket:2042]
2011-02-09 15:45:15 -05:00
Mike Bayer 12073e281e - SchemaItem, SchemaType now descend from common type
SchemaEventTarget, which supplies dispatch
- the dispatch now provides before_parent_attach(),
after_parent_attach(), events which generally bound the _set_parent()
event. [ticket:2037]
- the _on_table_attach mechanism now usually uses the
event dispatch
- fixed class-level event dispatch to propagate to all subclasses, not just
immediate subclasses
- fixed class-level event unpickling to handle more involved
inheritance hierarchies, needed by the new schema event dispatch.
- ForeignKeyConstraint doesn't re-call the column attach event
on ForeignKey objects that are already associated with the correct
Column
- we still need that ImportError on mysqldb CLIENT FLAGS to support
mock DBAPIs
2011-01-30 20:29:48 -05:00
Mike Bayer 1515073b96 - New DBAPI support for pymysql, a pure Python port
of MySQL-python.  [ticket:1991]
2011-01-26 11:18:03 -05:00
Mike Bayer 86e6c2bafb callcount 2011-01-25 14:08:58 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer 1903e4f973 - remove some more 2.4 targets 2010-12-27 14:34:22 -05:00
Mike Bayer fe2d3e0aa2 py3k fixes 2010-12-27 14:17:10 -05:00
Mike Bayer fa2f1c5d82 - more skippage of 2.4 2010-12-23 15:51:41 -05:00
Mike Bayer 015110267e - allow cextension version to fall back to non-cextension
- start taking out "default" version, 2.4 version, only need these tests
in a relative sense
2010-12-22 20:36:20 -05:00
Mike Bayer 73f2b37fc9 - remove OrderedSet usage from a critical area 2010-12-22 19:07:04 -05:00
Mike Bayer 78d6c7c62e - arg callcounts change from 2.6.4 to 2.6.6 2010-12-21 21:52:26 -05:00
Mike Bayer b79a5e7640 - another heap of inlinings and now I really have to be done with this 2010-12-21 21:37:52 -05:00
Mike Bayer ecb0e53abb - modest inlinings into the MapperProperty.setup/row_processor chain 2010-12-20 20:30:29 -05:00
Mike Bayer 6c2cbd2428 callcounts 2010-12-19 20:14:39 -05:00
Mike Bayer 0a46523a92 triple check that the dict is empty 2010-12-19 19:13:40 -05:00