Commit Graph

10240 Commits

Author SHA1 Message Date
Mike Bayer 9ae4db27b9 - Fixed bug that affected many classes of event, particularly
ORM events but also engine events, where the usual logic of
"de duplicating" a redundant call to :func:`.event.listen`
with the same arguments would fail, for those events where the
listener function is wrapped.  An assertion would be hit within
registry.py.  This assertion has now been integrated into the
deduplication check, with the added bonus of a simpler means
of checking deduplication across the board.
fixes #3199
2014-09-18 15:24:40 -04:00
Mike Bayer f82f6d55dc - Added new method :meth:.Select.with_statement_hint and ORM
method :meth:`.Query.with_statement_hint` to support statement-level
hints that are not specific to a table.
fixes #3206
2014-09-18 11:44:48 -04:00
Mike Bayer e3f07f7206 - Added support for the Oracle table option ON COMMIT. This is being
kept separate from Postgresql's ON COMMIT for now even though ON COMMIT
is in the SQL standard; the option is still very specific to temp tables
and we eventually would provide a more first class temporary table
feature.
- oracle can apparently do get_temp_table_names() too, so implement that,
fix its get_table_names(), and add it to #3204.  fixes #3204 again.
2014-09-17 19:43:45 -04:00
Johannes Erdfelt 7fa21b2298 Reflect unique constraints when reflecting a Table object
Calls to reflect a table did not create any UniqueConstraint objects.
The reflection core made no calls to get_unique_constraints and as
a result, the sqlite dialect would never reflect any unique constraints.

MySQL transparently converts unique constraints into unique indexes, but
SQLAlchemy would reflect those as an Index object and as a
UniqueConstraint. The reflection core will now deduplicate the unique
constraints.

PostgreSQL would reflect unique constraints as an Index object and as
a UniqueConstraint object. The reflection core will now deduplicate
the unique indexes.
2014-09-17 13:19:50 -07:00
Mike Bayer 1f2f88d8ff - not sure what this is testing but remove the self.l that might
be contributing to pypy not cleaning up on this one
2014-09-17 15:40:09 -04:00
Mike Bayer 354e118f4b - we can start checking these flake rules 2014-09-17 15:39:47 -04:00
Mike Bayer c926df3617 - changelog for #3203; fixes #3203 2014-09-17 15:19:19 -04:00
Mike Bayer 7864f80a62 Merge branch 'sqlite-temp-table-reflection' of https://bitbucket.org/jerdfelt/sqlalchemy/branch/sqlite-temp-table-reflection into pr31 2014-09-17 15:16:33 -04:00
Mike Bayer cb23fa243f - Added :meth:.Inspector.get_temp_table_names and
:meth:`.Inspector.get_temp_view_names`; currently, only the
SQLite dialect supports these methods.    The return of temporary
table and view names has been **removed** from SQLite's version
of :meth:`.Inspector.get_table_names` and
:meth:`.Inspector.get_view_names`; other database backends cannot
support this information (such as MySQL), and the scope of operation
is different in that the tables can be local to a session and
typically aren't supported in remote schemas.
fixes #3204
2014-09-17 15:15:21 -04:00
Mike Bayer 1217d6ce97 - move this to the correct location 2014-09-17 14:02:34 -04:00
Mike Bayer 4a4cbe5ff2 - comment this out (again) 2014-09-17 13:12:41 -04:00
Mike Bayer 3a6cd72bea Merge branch 'pr128' 2014-09-17 13:11:49 -04:00
Mike Bayer be57def4b9 - repair get_foreign_table_names() for PGInsp/dialect level
- repair get_view_names()
- changelog + migration note
2014-09-17 13:11:22 -04:00
Mike Bayer 27617986bb keep this off for the moment as jenkins isn't set up for this yet 2014-09-17 12:41:55 -04:00
Mike Bayer 414bc1c64d - the actual round trip requires password authent set up for the user;
we don't actually need a round trip test here as we're only testing reflection.
2014-09-17 12:41:08 -04:00
Johannes Erdfelt 9d402e204d Handle sqlite get_unique_constraints() call for temporary tables
The sqlite get_unique_constraints() implementation did not do a union
against the sqlite_temp_master table like other code does. This could
result in an exception being raised if get_unique_constraints() was
called against a temporary table.
2014-09-17 08:01:01 -07:00
Mike Bayer a985f84ed6 - Fixed the version string detection in the pymssql dialect to
work with Microsoft SQL Azure, which changes the word "SQL Server"
to "SQL Azure".
fixes #3151
2014-09-16 17:40:06 -04:00
Mike Bayer 8546153d5d - break out and fix tests for materialized view and foreign tables. foreign tables not working 2014-09-16 17:24:34 -04:00
Mike Bayer ecda5429af Merge remote-tracking branch 'origin/pr/128' into pr128 2014-09-16 16:55:05 -04:00
Mike Bayer cc3dba01db - raise from cause here to preserve stack trace 2014-09-16 16:20:22 -04:00
mike bayer 7094193c61 Merge pull request #138 from BY-jk/master
Added EXASolution dialect to documentation
2014-09-16 15:10:36 -04:00
Jan 4f39e3839f Added EXASolution dialect to documentation 2014-09-16 20:54:27 +02:00
jona ba951b99a6 change functions 2014-09-16 20:19:03 +02:00
Mike Bayer b9d430af75 - add differentiating examples of list() vs. iteration 2014-09-16 11:57:03 -04:00
Mike Bayer d299c40265 Merge branch 'master' into ticket_3100 2014-09-15 16:31:40 -04:00
Mike Bayer 47a6ffe090 - cant do xargs in tox.ini as it doesnt run outside of postgresql/mysql 2014-09-15 15:29:54 -04:00
Mike Bayer 2c46128a2f - use compat.u for python3.2, fixes #3198 2014-09-15 14:57:41 -04:00
Mike Bayer 8b7f57d258 - fix issue where nose Failure object comes into play here 2014-09-15 14:53:20 -04:00
Mike Bayer d7498cf4ad - remove some crufty old testing options
- reestablish the "bootstrap" system of loading the test runners
in testing/plugin; using the updated approach we just came up with for
alembic.  Coverage should be fixed now when running either py.test or
nose. fixes #3196
- upgrade tox.ini and start using a .coveragerc file
2014-09-14 21:41:13 -04:00
Jim Hokanson 7fd3f05805 Updated documenation for engines.rst
Clarified connecting to absolute path for sqlite using Windows.
2014-09-14 00:25:41 -04:00
jona 98a0114535 add failing test 2014-09-12 21:14:52 +02:00
Mike Bayer f98c89d2be - Fixed warning that would emit when a complex self-referential
primaryjoin contained functions, while at the same time remote_side
was specified; the warning would suggest setting "remote side".
It now only emits if remote_side isn't present.
fixes #3194
2014-09-11 11:51:44 -04:00
Ilja Everilä 76c06aa653 method documentation typo fix 2014-09-11 15:49:51 +03:00
Ilja Everilä 89fc7d65b9 documentation indentation fix 2014-09-11 15:47:24 +03:00
Ilja Everilä 52a095ba66 allow windowing filtered functions 2014-09-11 15:39:56 +03:00
Ilja Everilä ab1c25266d renamed aggregatefilter to funcfilter, since it is that 2014-09-11 15:29:33 +03:00
Mike Bayer 14d2bb074c - Fixed bug in ordering list where the order of items would be
thrown off during a collection replace event, if the
reorder_on_append flag were set to True.  The fix ensures that the
ordering list only impacts the list that is explicitly associated
with the object.
fixes #3191
2014-09-10 14:14:50 -04:00
Ilja Everilä a3cd517c95 add ClauseTest for aggregatefilter 2014-09-10 12:07:38 +03:00
Ilja Everilä ad82849bbe implementation for <aggregate_fun> FILTER (WHERE ...) 2014-09-10 11:34:33 +03:00
Ilja Everilä a23264e1dc tests for <aggregate_fun> FILTER (WHERE ...) 2014-09-10 11:33:49 +03:00
Mike Bayer 706d4fcc4f - for whatever reason, Insert.values() with multi values wasn't
in the 0.8 migration, so let's just add that
2014-09-09 18:59:59 -04:00
Mike Bayer 48080d88be - add in all the method-chained methods to the parameter descriptions
on select().  improve some descriptions and add more info for limit()/
offset(), including new 1.0 functionality.
2014-09-09 17:29:37 -04:00
Mike Bayer 7904ebc62e - rework the previous "order by" system in terms of the new one,
unify everything.
- create a new layer of separation between the "from order bys" and "column order bys",
so that an OVER doesn't ORDER BY a label in the same columns clause
- identify another issue with polymorphic for ref #3148, match on label
keys rather than the objects
2014-09-08 16:31:11 -04:00
Mike Bayer e4996d4f54 - check for None linker... 2014-09-08 13:01:43 -04:00
Mike Bayer 390207e533 - Added new event handlers :meth:.AttributeEvents.init_collection
and :meth:`.AttributeEvents.dispose_collection`, which track when
a collection is first associated with an instance and when it is
replaced.  These handlers supersede the :meth:`.collection.linker`
annotation. The old hook remains supported through an event adapter.
2014-09-07 20:28:19 -04:00
Mike Bayer 083d44c082 - remove some old cruft
- prop.compare() isn't needed; replace with prop._with_parent()
for relationships
- update docs in orm/interfaces
2014-09-07 19:17:46 -04:00
Mike Bayer 77e6046ff0 - mako_layout isn't used, remove it
- to check for epub look at "builder"
2014-09-07 18:10:40 -04:00
mike bayer 56e14e2e28 Merge pull request #133 from hiaselhans/doc_epub
Docs: use layout.mako only when mako_layout=='html'
2014-09-07 17:38:05 -04:00
hiaselhans a8ef876f6c Docs: use the base layout when mako_layout=='epub'
- https://readthedocs.org/projects/sqlalchemy/downloads/epub/latest/ renders with the full template which is unreadable on e-readers
  - in the makefile the template-variable mako_layout is set for target: epub which makes mako use only the base layout.
  - this is the more elegant solution as proposed to #133
2014-09-07 22:55:05 +02:00
Mike Bayer 51eff5eb7a - changelog and migration for #3188, #3148.
fixes #3188
fixes #3148
2014-09-07 15:23:24 -04:00