summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Allow kwargs to be passed through update()pr/164Amir Sadoughi2015-03-201-1/+13
| | | | | This is useful to be able to pass in mysql_limit=1 from using the ORM.
* - The "auto-attach" feature of constraints such as :class:`.UniqueConstraint`Mike Bayer2015-03-242-0/+132
| | | | | | | | | | and :class:`.CheckConstraint` has been further enhanced such that when the constraint is associated with non-table-bound :class:`.Column` objects, the constraint will set up event listeners with the columns themselves such that the constraint auto attaches at the same time the columns are associated with the table. This in particular helps in some edge cases in declarative but is also of general use. fixes #3341
* - Fixed bug in new "label resolution" feature of :ticket:`2992` whereMike Bayer2015-03-231-0/+9
| | | | | | | | a label that was anonymous, then labeled again with a name, would fail to be locatable via a textual label. This situation occurs naturally when a mapped :func:`.column_property` is given an explicit label in a query. fixes #3340
* - Fixed unicode support for PyMySQL when using an "executemany"Mike Bayer2015-03-221-0/+1
| | | | | | | | | operation with unicode parameters. SQLAlchemy now passes both the statement as well as the bound parameters as unicode objects, as PyMySQL generally uses string interpolation internally to produce the final statement, and in the case of executemany does the "encode" step only on the final statement. fixes #3337
* - totally skip on mysqlconnector for nowMike Bayer2015-03-211-0/+1
|
* - Fixed bug in new "label resolution" feature of :ticket:`2992` whereMike Bayer2015-03-211-0/+14
| | | | | | | | the string label placed in the order_by() or group_by() of a statement would place higher priority on the name as found inside the FROM clause instead of a more locally available name inside the columns clause. fixes #3335
* - oursql is unsupported on thisMike Bayer2015-03-211-0/+1
|
* - Repaired the commit for issue #2771 which was inadvertently commentedMike Bayer2015-03-201-0/+3
| | | | | | out. - add __backend__ to the dialect suite so that it runs on CI. - will be 1.0.0b3
* - test fixMike Bayer2015-03-201-0/+1
|
* - add a test for #2771, fixes #2771Mike Bayer2015-03-201-0/+8
| | | | - changelog for #2771
* - Loosened some restrictions that were added to ``@declared_attr``Mike Bayer2015-03-181-0/+33
| | | | | | | | | | | | | objects, such that they were prevented from being called outside of the declarative process; this is related to the enhancements of #3150 which allow ``@declared_attr`` to return a value that is cached based on the current class as it's being configured. The exception raise has been removed, and the behavior changed so that outside of the declarative process, the function decorated by ``@declared_attr`` is called every time just like a regular ``@property``, without using any caching, as none is available at this stage. fixes #3331
* - The "auto close" for :class:`.ResultProxy` is now a "soft" close.Mike Bayer2015-03-172-0/+44
| | | | | | | | | | | That is, after exhausing all rows using the fetch methods, the DBAPI cursor is released as before and the object may be safely discarded, but the fetch methods may continue to be called for which they will return an end-of-result object (None for fetchone, empty list for fetchmany and fetchall). Only if :meth:`.ResultProxy.close` is called explicitly will these methods raise the "result is closed" error. fixes #3330 fixes #3329
* Accept unicode in CascadeOptionspr/160Julien Castets2015-03-161-1/+9
|
* - Added a new extension suite :mod:`sqlalchemy.ext.baked`. ThisMike Bayer2015-03-113-2/+785
| | | | | | | | simple but unusual system allows for a dramatic savings in Python overhead for the construction and processing of orm :class:`.Query` objects, from query construction up through rendering of a string SQL statement. fixes #3054
* - Added a new entry ``"entity"`` to the dictionaries returned byMike Bayer2015-03-111-12/+21
| | | | | | | | | :attr:`.Query.column_descriptions`. This refers to the primary ORM mapped class or aliased class that is referred to by the expression. Compared to the existing entry for ``"type"``, it will always be a mapped entity, even if extracted from a column expression, or None if the given expression is a pure core expression. references #3320
* - The Postgresql :class:`.postgresql.ENUM` type will emit aMike Bayer2015-03-112-1/+100
| | | | | | | | | | | | DROP TYPE instruction when a plain ``table.drop()`` is called, assuming the object is not associated directly with a :class:`.MetaData` object. In order to accomodate the use case of an enumerated type shared between multiple tables, the type should be associated directly with the :class:`.MetaData` object; in this case the type will only be created at the metadata level, or if created directly. The rules for create/drop of Postgresql enumerated types have been highly reworked in general. fixes #3319
* - Added a new event suite :class:`.QueryEvents`. TheMike Bayer2015-03-101-1/+37
| | | | | | | | | | | :meth:`.QueryEvents.before_compile` event allows the creation of functions which may place additional modifications to :class:`.Query` objects before the construction of the SELECT statement. It is hoped that this event be made much more useful via the advent of a new inspection system that will allow for detailed modifications to be made against :class:`.Query` objects in an automated fashion. fixes #3317
* - The subquery wrapping which occurs when joined eager loadingMike Bayer2015-03-102-12/+38
| | | | | | | | | is used with a one-to-many query that also features LIMIT, OFFSET, or DISTINCT has been disabled in the case of a one-to-one relationship, that is a one-to-many with :paramref:`.relationship.uselist` set to False. This will produce more efficient queries in these cases. fixes #3249
* - Fixed bug where the session attachment error "object is alreadyMike Bayer2015-03-101-1/+20
| | | | | | | attached to session X" would fail to prevent the object from also being attached to the new session, in the case that execution continued after the error raise occurred. fixes #3301
* - Fixed bug where using an ``__abstract__`` mixin in the middleMike Bayer2015-03-101-0/+41
| | | | | | | of a declarative inheritance hierarchy would prevent attributes and configuration being correctly propagated from the base class to the inheriting class. fixes #3219 fixes #3240
* Merge branch 'postgres-concurrently' of ↵Mike Bayer2015-03-101-0/+10
|\ | | | | | | https://bitbucket.org/iurisilvio/sqlalchemy into pr45
| * Dialect option `postgresql_concurrently` to `Index` construct.Iuri de Silvio2015-02-251-0/+10
| |
* | Fix slice addressing of _AssociationList with python3Gilles Dartiguelongue2015-03-101-0/+16
| |
* | Merge branch 'sqlite-partial-indexes' of ↵Mike Bayer2015-03-101-1/+22
|\ \ | | | | | | | | | https://bitbucket.org/groner/sqlalchemy into pr42
| * | Test for partial index support in sqlite dialects.Kai Groner2015-01-261-1/+22
| | |
* | | - updated countsMike Bayer2015-03-091-137/+137
| | |
* | | - pick around gaining modest dings in callcounts here and thereMike Bayer2015-03-092-102/+99
| | |
* | | - start locking down querying for cols after observing yesterdaysMike Bayer2015-03-092-196/+361
| | | | | | | | | | | | | | | callcount bump due to the slots thing - rewrite profiles using new technique
* | | - we really don't want to force lib here, but we do needMike Bayer2015-03-091-2/+1
| | | | | | | | | | | | | | | it for the plain "pytest" case, so do an append instead of an insert - add a new tox file to do a full regen of callcounts
* | | - fix some more result_map callsMike Bayer2015-03-083-14/+14
| | |
* | | - rename _select_wrapsMike Bayer2015-03-081-0/+61
| | | | | | | | | | | | | | | - replace force_result_map with a mini-API for nested result sets, add coverage
* | | fooMike Bayer2015-03-086-33/+33
| | |
* | | - the change for #918 was of course not nearly that simple.Mike Bayer2015-03-072-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "wrapping" employed by the mssql and oracle dialects using the "iswrapper" argument was not being used intelligently by the compiler, and the result map was being written incorrectly, using *more* columns in the result map than were actually returned by the statement, due to "row number" columns that are inside the subquery. The compiler now writes out result map on the "top level" select in all cases fully, and for the mssql/oracle wrapping case extracts out the "proxied" columns in a second step, which only includes those columns that are proxied outwards to the top level. This change might have implications for 3rd party dialects that might be imitating oracle's approach. They can safely continue to use the "iswrapper" kw which is now ignored, but they may need to also add the _select_wraps argument as well.
* | | - do a full rewrite of callcountsMike Bayer2015-03-071-94/+93
| | |
* | | - The SQL compiler now generates the mapping of expected columnspositional_targetingMike Bayer2015-03-072-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | such that they are matched to the received result set positionally, rather than by name. Originally, this was seen as a way to handle cases where we had columns returned with difficult-to-predict names, though in modern use that issue has been overcome by anonymous labeling. In this version, the approach basically reduces function call count per-result by a few dozen calls, or more for larger sets of result columns. The approach still degrades into a modern version of the old approach if textual elements modify the result map, or if any discrepancy in size exists between the compiled set of columns versus what was received, so there's no issue for partially or fully textual compilation scenarios where these lists might not line up. fixes #918 - callcounts still need to be adjusted down for this so zoomark tests won't pass at the moment
* | | - add a skip for JSONB on pg8000 if we are on 1.10.1 or earlierMike Bayer2015-03-022-0/+9
| | |
* | | Merge remote-tracking branch 'origin/pr/132' into pr132Mike Bayer2015-03-021-3/+6
|\ \ \
| * | | pg8000 client_encoding in create_engine()Tony Locke2014-12-161-3/+6
| | | | | | | | | | | | | | | | | | | | The pg8000 dialect now supports the setting of the PostgreSQL parameter client_encoding from create_engine().
* | | | - squash-merge the final row_proc integration branch. this isMike Bayer2015-03-012-11/+35
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a much more modest outcome than what we started with. The work of create_row_processor() for ColumnProperty objects is essentially done at query setup time combined with some lookups in _instance_processor(). - to allow this change for deferred columns, deferred columns no longer search for themselves in the result. If they've been set up as deferred without any explicit directive to undefer them, then this is what was asked for. if we don't do this, then we're stuck with this performance penalty for all deferred columns which in the vast majority of typical use cases (e.g. loading large, legacy tables or tables with many/large very seldom used values) won't be present in the result and won't be accessed at all.
* | | - repair issue in declared_attr.cascading such that within aMike Bayer2015-02-241-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | subclass, the value returned by the descriptor is not available because the superclass is already mapped with the InstrumentedAttribute, until the subclass is mapped. We add a setattr() to set up that attribute so that the __mapper_args__ hook and possibly others have access to the "cascaded" version of the attribute within the call.
* | | - Fixed bugs in ORM object comparisons where comparison ofMike Bayer2015-02-202-10/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | many-to-one ``!= None`` would fail if the source were an aliased class, or if the query needed to apply special aliasing to the expression due to aliased joins or polymorphic querying; also fixed bug in the case where comparing a many-to-one to an object state would fail if the query needed to apply special aliasing due to aliased joins or polymorphic querying. fixes #3310
* | | - Fixed bug where internal assertion would fail in the case whereMike Bayer2015-02-201-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | an ``after_rollback()`` handler for a :class:`.Session` incorrectly adds state to that :class:`.Session` within the handler, and the task to warn and remove this state (established by :ticket:`2389`) attempts to proceed. fixes #3309
* | | - expect_warnings was not expecting and neither was assert_warningsMike Bayer2015-02-191-4/+4
| | | | | | | | | | | | asserting.
* | | - repair merge failureMike Bayer2015-02-191-22/+6
| | |
* | | - autopep8Mike Bayer2015-02-191-39/+43
| | |
* | | - Mapped state internals have been reworked to allow for a 50% reductionMike Bayer2015-02-184-67/+141
| | | | | | | | | | | | | | | | | | | | | | | | in callcounts specific to the "expiration" of objects, as in the "auto expire" feature of :meth:`.Session.commit` and for :meth:`.Session.expire_all`, as well as in the "cleanup" step which occurs when object states are garbage collected. fixes #3307
* | | - add the test_expire_lots test for comparisonMike Bayer2015-02-182-0/+71
| | |
* | | - additional mysql cast-related test fixesMike Bayer2015-02-092-0/+9
| | |
* | | - The MySQL dialect now supports CAST on types that are constructedMike Bayer2015-02-091-1/+11
| | | | | | | | | | | | as :class:`.TypeDecorator` objects.
* | | - test skips for MySQL w new cast warningMike Bayer2015-02-091-0/+16
| | |