summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* PEP8 tidy of test/sql/test_types.pypr/99Tony Locke2014-06-231-221/+256
|
* pg8000 passing test/sql/test_types.pyTony Locke2014-06-231-13/+11
| | | | | | | Opened up two tests that now pass with pg8000. Also, rewrote two tests to use actual tables rather than having a round trip in a single select statement. This is necessary for pg8000 because it sends strings to the server with type 'unknown' and lets the server work out the type.
* - use new Or() directive to test for both SQL variants here, which can varyMike Bayer2014-06-211-7/+16
| | | | based on hash ordering of the ClassManager
* - fix test failuresMike Bayer2014-06-212-5/+5
|
* - Additional checks have been added for the case where an inheritingMike Bayer2014-06-209-69/+111
| | | | | | | | | | mapper is implicitly combining one of its column-based attributes with that of the parent, where those columns normally don't necessarily share the same value. This is an extension of an existing check that was added via :ticket:`1892`; however this new check emits only a warning, instead of an exception, to allow for applications that may be relying upon the existing behavior. fixes #3042
* - The :paramref:`.Column.nullable` flag is implicitly set to ``False``Mike Bayer2014-06-201-0/+18
| | | | | | | | | when that :class:`.Column` is referred to in an explicit :class:`.PrimaryKeyConstraint` for that table. This behavior now matches that of when the :class:`.Column` itself has the :paramref:`.Column.primary_key` flag set to ``True``, which is intended to be an exactly equivalent case. fixes #3023
* - Added a new type :class:`.postgresql.OID` to the Postgresql dialect.Mike Bayer2014-06-201-0/+13
| | | | | | | | While "oid" is generally a private type within PG that is not exposed in modern versions, there are some PG use cases such as large object support where these types might be exposed, as well as within some user-reported schema reflection use cases. fixes #3002
* - Fixed bug where column names added to ``mysql_length`` parameterMike Bayer2014-06-181-0/+33
| | | | | | | | on an index needed to have the same quoting for quoted names in order to be recognized. The fix makes the quotes optional but also provides the old behavior for backwards compatibility with those using the workaround. fixes #3085
* - Modified the behavior of :func:`.orm.load_only` such that primary keyMike Bayer2014-06-121-5/+36
| | | | | | | | | columns are always added to the list of columns to be "undeferred"; otherwise, the ORM can't load the row's identity. Apparently, one can defer the mapped primary keys and the ORM will fail, that hasn't been changed. But as load_only is essentially saying "defer all but X", it's more critical that PK cols not be part of this deferral. fixes #3080
* - fix this test for MySQL, needs InnoDBMike Bayer2014-05-301-3/+7
|
* - vastly improve the "safe close cursor" tests in test_reconnectMike Bayer2014-05-301-14/+57
| | | | | | | | | | | - Fixed bug which would occur if a DBAPI exception occurs when the engine first connects and does its initial checks, and the exception is not a disconnect exception, yet the cursor raises an error when we try to close it. In this case the real exception would be quashed as we tried to log the cursor close exception via the connection pool and failed, as we were trying to access the pool's logger in a way that is inappropriate in this very specific scenario. fixes #3063
* - The ``__mapper_args__`` dictionary is copied from a declarativeMike Bayer2014-05-301-0/+27
| | | | | | | | | mixin or abstract class when accessed, so that modifications made to this dictionary by declarative itself won't conflict with that of other mappings. The dictionary is modified regarding the ``version_id_col`` and ``polymorphic_on`` arguments, replacing the column within with the one that is officially mapped to the local class/table. fixes #3062
* Merge branch 'master' of https://github.com/tlocke/sqlalchemy into tlocke-masterMike Bayer2014-05-303-68/+58
|\
| * PEP 8 tidy of pg8000 dialect and postgresql/test_dialect.pypr/88Tony Locke2014-05-221-50/+40
| |
| * Autocommit isolation level for postgresql+pg8000Tony Locke2014-05-221-7/+13
| | | | | | | | | | | | | | | | As with postgresql+psycopg2, execution_options(isolation_level='AUTOCOMMIT') now works for the postgresql+pg8000 dialect. Also enabled the autocommit test in test_dialect.py for pg8000.
| * Add postgresql+pg8000 to floats_to_four_decimalsTony Locke2014-05-211-2/+5
| | | | | | | | | | pg8000 uses binary transfer of floats and so accuracy is lost for floats that can't be represented exactly in binary.
| * pg8000 now passes test_extract() testTony Locke2014-05-211-1/+0
| |
| * Two tests now work for pg800 in EnumTestTony Locke2014-05-211-6/+0
| | | | | | | | | | The two tests, test_create_table() and test_unicode_labels() previously failed under pg8000, but now they pass, so this commit opens them up.
| * pg8000 no longer truncates decimalsTony Locke2014-05-211-2/+0
| | | | | | | | | | We can now update the requirements to remove the special case of pg8000 truncating decimals.
* | - Related to :ticket:`3060`, an adjustment has been made to the unitMike Bayer2014-05-301-13/+6
| | | | | | | | | | | | | | | | | | | | of work such that loading for related many-to-one objects is slightly more aggressive, in the case of a graph of self-referential objects that are to be deleted; the load of related objects is to help determine the correct order for deletion if passive_deletes is not set. - revert the changes to test_delete_unloaded_m2o, these deletes do in fact need to occur in the order of the two child objects first.
* | - add a new assertsql construct "Or", so that we can test for a UOW flushMike Bayer2014-05-301-9/+18
| | | | | | | | | | | | that might take one of multiple directions; apply this to test_delete_unloaded_m2o which is now illustrating multiple paths due to #3060/#3061, though still doing the right thing.
* | - Adjustment to attribute mechanics concerning when a value isMike Bayer2014-05-291-6/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | implicitly initialized to None via first access; this action, which has always resulted in a population of the attribute, now emits an attribute event just like any other attribute set operation and generates the same kind of history as one. Additionally, many mapper internal operations will no longer implicitly generate these "None" values when various never-set attributes are checked. These are subtle behavioral fixes to attribute mechanics which provide a better solution to the problem of :ticket:`3060`, which also involves recognition of attributes explicitly set to ``None`` vs. attributes that were never set. fixes #3061
* | - Fixed a few edge cases which arise in the so-called "row switch"Mike Bayer2014-05-282-1/+127
| | | | | | | | | | | | | | | | | | | | | | scenario, where an INSERT/DELETE can be turned into an UPDATE. In this situation, a many-to-one relationship set to None, or in some cases a scalar attribute set to None, may not be detected as a net change in value, and therefore the UPDATE would not reset what was on the previous row. This is due to some as-yet unresovled side effects of the way attribute history works in terms of implicitly assuming None isn't really a "change" for a previously un-set attribute. See also :ticket:`3061`. fixes #3060
* | - Fixed bug in INSERT..FROM SELECT construct where selecting from aMike Bayer2014-05-251-1/+19
| | | | | | | | | | UNION would wrap the union in an anonymous (e.g. unlabled) subquery. fixes #3044
* | - Added the ``hashable=False`` flag to the PG :class:`.HSTORE` type, whichMike Bayer2014-05-251-0/+15
| | | | | | | | | | | | is needed to allow the ORM to skip over trying to "hash" an ORM-mapped HSTORE column when requesting it in a mixed column/entity list. Patch courtesy Gunnlaugur Þór Briem. Fixes #3053
* | - Fixed bug in subquery eager loading where a long chain ofMike Bayer2014-05-252-1/+112
| | | | | | | | | | | | | | eager loads across a polymorphic-subclass boundary in conjunction with polymorphic loading would fail to locate the subclass-link in the chain, erroring out with a missing property name on an :class:`.AliasedClass`. fixes #3055
* | - Fixed bug in SQLite join rewriting where anonymized column namesMike Bayer2014-05-252-1/+57
| | | | | | | | | | | | due to repeats would not correctly be rewritten in subqueries. This would affect SELECT queries with any kind of subquery + join. fixes #3057
* | - repair oracle compilation for new limit/offset system.Mike Bayer2014-05-241-15/+22
| |
* | - reset callcountsMike Bayer2014-05-241-396/+291
| |
* | - revert the memoized committed_state / callables changes as they appear to ↵Mike Bayer2014-05-241-1/+3
| | | | | | | | | | | | add to lazy loading. not really clear which approach is better in the long run.
* | - fix typos in testMike Bayer2014-05-241-2/+2
| | | | | | | | - restore __len__ to identity map
* | - Fixed bug where the :meth:`.Operators.__and__`,Mike Bayer2014-05-241-0/+49
| | | | | | | | | | | | | | :meth:`.Operators.__or__` and :meth:`.Operators.__invert__` operator overload methods could not be overridden within a custom :class:`.TypeEngine.Comparator` implementation. fixes #3012
* | - more tests, including backend testsMike Bayer2014-05-163-13/+78
| | | | | | | | - implement for SQL server, use window functions when simple limit/offset not available
* | Merge branch 'issue_3034' of ↵Mike Bayer2014-05-161-0/+13
|\ \ | |/ |/| | | https://bitbucket.org/dobesv/sqlalchemy/branch/issue_3034 into ticket_3034
| * Expand test to also test whether offset accepts a bindparam.Dobes Vandermeer2014-04-241-2/+6
| |
| * Proof-of-concept implementation of supporting bindparam for offset and limit ↵Dobes Vandermeer2014-04-241-0/+9
| | | | | | | | on a query.
* | - changelog for #2785Mike Bayer2014-05-161-29/+15
| | | | | | | | | | - refactor tests a bit fixes #2785
* | Merge branch 'zero_indexes-param-for-postgresql-ARRAY-type' of ↵Mike Bayer2014-05-161-0/+53
|\ \ | | | | | | | | | https://bitbucket.org/LevonXXL/sqlalchemy/overview into t
| * | zero_indexes-param-for-postgresql-ARRAY-typeAlexey Terentev2014-05-131-0/+53
| | |
* | | - Fixed bug in mutable extension where :class:`.MutableDict` did notMike Bayer2014-05-141-0/+17
| | | | | | | | | | | | | | | report change events for the ``setdefault()`` dictionary operation. fixes #3051
* | | Merged in WSMcG/sqlalchemy (pull request #15) Mike Bayer2014-05-121-0/+4
|\ \ \ | |/ / |/| | Added optional '=' to MySQL KEY_BLOCK_SIZE regex
| * | Added optional '=' to MySQL KEY_BLOCK_SIZE regexW. Sean McGivern2014-04-191-0/+4
| | |
* | | Merge pull request #91 from smurfix/de_apostroph_ifymike bayer2014-05-112-2/+2
|\ \ \ | | | | | | | | Documentation fix-up: "its" vs. "it's"
| * | | Documentation fix-up: "its" vs. "it's"pr/91Matthias Urlichs2014-05-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed ungrammatical apostrophes from documentation, replacing "it's" with "its" where appropriate (but in a few cases with "it is" when that read better). While doing that, I also fixed a couple of minor typos etc. as I noticed them.
* | | | - Fixed ORM bug where the :func:`.class_mapper` function would maskMike Bayer2014-05-101-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | AttributeErrors or KeyErrors that should raise during mapper configuration due to user errors. The catch for attribute/keyerror has been made more specific to not include the configuration step. fixes #3047
* | | | - stress test for invalidationMike Bayer2014-05-101-0/+51
|/ / /
* | | - Fixed bug where :meth:`.Table.update` and :meth:`.Table.delete`Mike Bayer2014-05-083-1/+33
| | | | | | | | | | | | | | | | | | | | | would produce an empty WHERE clause when an empty :func:`.and_()` or :func:`.or_()` or other blank expression were applied. This is now consistent with that of :func:`.select`. fixes #3045
* | | - critically, py.test for unknown reasons *SKIPS* tests that have an ↵Mike Bayer2014-05-021-27/+7
| | | | | | | | | | | | | | | | | | __init__() method. No clue. nosetests doesn't do this. concerning that other tests might have the same issue.
* | | - Fixed bug where the combination of "limit" rendering asMike Bayer2014-04-302-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | "SELECT FIRST n ROWS" using a bound parameter (only firebird has both), combined with column-level subqueries which also feature "limit" as well as "positional" bound parameters (e.g. qmark style) would erroneously assign the subquery-level positions before that of the enclosing SELECT, thus returning parameters which are out of order. Fixes #3038
* | | Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-2632-47/+47
| |/ |/| | | | | Found using: https://github.com/intgr/topy