Commit Graph

1065 Commits

Author SHA1 Message Date
Mike Bayer 7fc08fe89a - The `info` parameter has been added to the constructor for
:class:`.SynonymProperty` and :class:`.ComparableProperty`.
- The ``info`` parameter has been added as a constructor argument
to all schema constructs including :class:`.MetaData`,
:class:`.Index`, :class:`.ForeignKey`, :class:`.ForeignKeyConstraint`,
:class:`.UniqueConstraint`, :class:`.PrimaryKeyConstraint`,
:class:`.CheckConstraint`.

fixes #2963
2014-08-13 19:45:34 -04:00
Mike Bayer 7c80e521f0 - Fixed bug in CTE where `literal_binds` compiler argument would not
be always be correctly propagated when one CTE referred to another
aliased CTE in a statement.
Fixes #3154
2014-08-02 14:42:57 -04:00
Mike Bayer 0bf33068f4 - ensure all tests are named test_* 2014-07-30 12:18:33 -04:00
Mike Bayer 405c223ae5 - Fixed 0.9.7 regression caused by 🎫3067 in conjunction with
a mis-named unit test such that so-called "schema" types like
:class:`.Boolean` and :class:`.Enum` could no longer be pickled.
fixes #3144
2014-07-29 13:32:05 -04:00
Mike Bayer 8574d5051a - find the remaining not cleaning up correctly test 2014-07-28 13:11:04 -04:00
Mike Bayer 54592942c4 - add support for tags, including include/exclude support.
simplify tox again now that we can exclude tests more easily
2014-07-27 18:46:20 -04:00
Mike Bayer d2358629c9 - scale up for mysql, sqlite 2014-07-26 20:50:57 -04:00
Mike Bayer 0df977ccad - Added a supported :meth:.FunctionElement.alias method to functions,
e.g. the ``func`` construct.  Previously, behavior for this method
was undefined.  The current behavior mimics that of pre-0.9.4,
which is that the function is turned into a single-column FROM
clause with the given alias name, where the column itself is
anonymously named.
fixes #3137
2014-07-24 14:33:50 -04:00
Mike Bayer 63c6aa0104 - update some SQL server tests, support
- add support for IDENTITY INSERT setting for INSERT with inline VALUES
2014-07-22 13:42:38 -04:00
Mike Bayer bb5f4392a4 - update the flake8 rules again
- apply autopep8 + manual fixes to most of test/sql/
2014-07-18 17:40:58 -04:00
Mike Bayer 3d7b188638 - Fixed a SQLite join rewriting issue where a subquery that is embedded
as a scalar subquery such as within an IN would receive inappropriate
substitutions from the enclosing query, if the same table were present
inside the subquery as were in the enclosing query such as in a
joined inheritance scenario.
fixes #3130
2014-07-15 12:25:38 -04:00
Mike Bayer f4653729a6 - wrestle with conv() and tests some more 2014-07-14 22:44:33 -04:00
Mike Bayer dbc8bbfba3 - allow the compilation rule that gets the formatted name
to again have the chance to veto rendering, as the naming convention
can make the decision that the name is "none" or not now.
2014-07-14 21:11:51 -04:00
Mike Bayer d2193f53c1 - Fix bug in naming convention feature where using a check
constraint convention that includes ``constraint_name`` would
then force all :class:`.Boolean` and :class:`.Enum` types to
require names as well, as these implicitly create a
constraint, even if the ultimate target backend were one that does
not require generation of the constraint such as Postgresql.
The mechanics of naming conventions for these particular
constraints has been reorganized such that the naming
determination is done at DDL compile time, rather than at
constraint/table construction time.
fixes #3067
2014-07-14 20:26:38 -04:00
Mike Bayer 0add251ea0 - In the SQL Server pyodbc dialect, repaired the implementation
for the ``description_encoding`` dialect parameter, which when
not explicitly set was preventing  cursor.description from
being parsed correctly in the case of result sets that
contained names in alternate encodings.  This parameter
shouldn't be needed going forward.
fixes #3091
2014-07-14 18:54:23 -04:00
Mike Bayer 4619936417 -Fixed bug in common table expressions whereby positional bound
parameters could be expressed in the wrong final order
when CTEs were nested in certain ways.
fixes #3090
2014-07-14 18:34:32 -04:00
Mike Bayer eb4abda811 - Fixed bug where multi-valued :class:.Insert construct would fail
to check subsequent values entries beyond the first one given
for literal SQL expressions.
fixes #3069
2014-07-14 18:28:07 -04:00
Mike Bayer a49ec1cf77 - Added a "str()" step to the dialect_kwargs iteration for
Python version < 2.6.5, working around the
"no unicode keyword arg" bug as these args are passed along as
keyword args within some reflection processes.
fixes #3123
2014-07-14 18:09:54 -04:00
Mike Bayer aacf952e0b - adjust this to work on PG also 2014-07-13 23:59:12 -04:00
Mike Bayer 071a183098 - Fixed bug in :class:.Enum and other :class:.SchemaType
subclasses where direct association of the type with a
:class:`.MetaData` would lead to a hang when events
(like create events) were emitted on the :class:`.MetaData`.
fixes #3124
2014-07-13 18:55:18 -04:00
Mike Bayer e5d0fa9493 - The :meth:.TypeEngine.with_variant method will now accept a
type class as an argument which is internally converted to an
instance, using the same convention long established by other
constructs such as :class:`.Column`. fixes #3122
2014-07-10 11:26:13 -04:00
Tony Locke fa80b73e3c PEP8 tidy of subset of test/sql/*.py 2014-07-07 07:32:33 +01:00
Tony Locke 73d00339c4 pg8000 passing test/sql 2014-07-06 23:13:44 +01:00
mike bayer 9c1f142e5a Merge pull request #99 from tlocke/master
pg8000 passing test/sql/test_types.py
2014-07-06 16:59:46 -04:00
Mike Bayer 01215cdaef - Fixed a bug within the custom operator plus :meth:.TypeEngine.with_variant
system, whereby using a :class:`.TypeDecorator` in conjunction with
variant would fail with an MRO error when a comparison operator was used.
fixes #3102
2014-06-27 16:08:42 -04:00
Tony Locke fe66ddb572 PEP8 tidy of test/sql/test_types.py 2014-06-23 22:34:01 +01:00
Tony Locke a88169c501 pg8000 passing test/sql/test_types.py
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.
2014-06-23 20:45:16 +01:00
Mike Bayer 650403ee64 - fix test failures 2014-06-21 18:11:04 -04:00
Mike Bayer bd56485f4c - The :paramref:.Column.nullable flag is implicitly set to `False`
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
2014-06-20 18:03:28 -04:00
Mike Bayer 482a67e1c6 - Fixed bug in INSERT..FROM SELECT construct where selecting from a
UNION would wrap the union in an anonymous (e.g. unlabled) subquery.
fixes #3044
2014-05-25 14:08:41 -04:00
Mike Bayer e6cbd88fe1 - Fixed bug in SQLite join rewriting where anonymized column names
due to repeats would not correctly be rewritten in subqueries.
This would affect SELECT queries with any kind of subquery + join.
fixes #3057
2014-05-25 11:32:07 -04:00
Mike Bayer d1705a46fe - Fixed bug where the :meth:.Operators.__and__,
:meth:`.Operators.__or__` and :meth:`.Operators.__invert__`
operator overload methods could not be overridden within a custom
:class:`.TypeEngine.Comparator` implementation.
fixes #3012
2014-05-24 14:35:28 -04:00
Mike Bayer 81959af6d3 - more tests, including backend tests
- implement for SQL server, use window functions when simple limit/offset not available
2014-05-16 15:33:39 -04:00
Mike Bayer 55eacc8dbe - Fixed bug where :meth:.Table.update and :meth:.Table.delete
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
2014-05-08 22:44:06 -04:00
Mike Bayer 2a458680a4 - Fixed bug where the combination of "limit" rendering as
"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
2014-04-30 19:07:45 -04:00
Alex Gaynor 1caa7fafbd Fix many typos throughout the codebase
Found using: https://github.com/intgr/topy
2014-04-26 13:13:13 -07:00
Mike Bayer c33d037880 - Liberalized the contract for :class:.Index a bit in that you can
specify a :func:`.text` expression as the target; the index no longer
needs to have a table-bound column present if the index is to be
manually added to the table, either via inline declaration or via
:meth:`.Table.append_constraint`. fixes #3028
2014-04-19 12:31:19 -04:00
Mike Bayer 99ae0dc821 - Fixed bug in new :meth:.DialectKWArgs.argument_for method where
adding an argument for a construct not previously included for any
special arguments would fail. fixes #3024
2014-04-15 23:34:07 -04:00
Matt Chisholm 3cefa27709 fix unclosed file ResourceWarning
part of #2830
2014-04-14 13:27:59 -04:00
Mike Bayer fcda519452 - Fixed regression introduced in 0.9 where new "ORDER BY <labelname>"
feature from 🎫`1068` would not apply quoting rules to the
label name as rendered in the ORDER BY.
fix #3020, re: #1068
2014-04-10 22:33:33 -04:00
Mike Bayer b23bb79581 - reverse order of columns in sample CTEs as this is a UNION and the cols need to line up
- alter this in the unit tests as well as these queries were just copied from the tests
- remove the included_parts.join(parts) from the core CTE doc (also just copied from the
test, where we want to make sure joins don't get screwed up with the CTE) as it doesn't
contribute to the query itself
fixes #3014
2014-04-02 18:11:11 -04:00
Mike Bayer 2e5c8913a8 - Fixes to the newly enhanced boolean coercion in 🎫2804 where
the new rules for "where" and "having" woudn't take effect for the
"whereclause" and "having" kw arguments of the :func:`.select` construct,
which is also what :class:`.Query` uses so wasn't working in the
ORM either. fixes #3013 re: #2804
2014-04-01 13:03:52 -04:00
Mike Bayer e16ede8cae - Added new flag :paramref:.expression.between.symmetric, when set to True
renders "BETWEEN SYMMETRIC".  Also added a new negation operator
"notbetween_op", which now allows an expression like ``~col.between(x, y)``
to render as "col NOT BETWEEN x AND y", rather than a parentheiszed NOT
string.  fixes #2990
2014-03-30 21:20:20 -04:00
Mike Bayer 477b9e7f02 mark failing tests for buggy mysqlconnector 2014-03-28 17:26:45 -04:00
Mike Bayer 9c731b2ebf - add further coverage for join_condition to make sure we get this case where
there are multiple, equivalent foreign keys
2014-03-28 16:41:08 -04:00
Mike Bayer 2f150bee28 - rename __multiple__ to __backend__, and apply __backend__ to a large number of tests.
- move out logging tests from test_execute to test_logging
2014-03-24 11:33:53 -04:00
Mike Bayer 5d2bfc4df4 - Fixed a few errant `u''` strings that would prevent tests from passing
in Py3.2.  Patch courtesy Arfrever Frehtes Taifersar Arahesis. fixes #2980
2014-03-22 18:48:59 -04:00
Mike Bayer 11003828cb - Added support for literal rendering of boolean values, e.g.
"true" / "false" or "1" / "0".
- added Boolean tests to the test suite
2014-03-13 20:03:48 -04:00
Mike Bayer 8433a48fab - add more support for suite tests, moving some tests from test_query out to suite
and adding some more requirements
2014-03-13 18:54:56 -04:00
Mike Bayer a7ef7eccaa :paramref:.MetaData.naming_convention feature will now also
apply to :class:`.CheckConstraint` objects that are associated
directly with a :class:`.Column` instead of just on the
:class:`.Table`.
2014-03-12 15:09:48 -04:00