Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer 33cb84945f - Modified the behavior of :func:.orm.load_only such that primary key
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
2014-06-12 11:47:50 -04:00
Mike Bayer bd9c325852 - changelog 2014-06-08 18:03:07 -04:00
Mike Bayer cbd2103087 Merged in univerio/sqlalchemy/materialized_paths (pull request #21)
Materialized paths example
2014-06-08 18:01:46 -04:00
Mike Bayer 15bfeb48cb changelog 2014-06-08 17:54:48 -04:00
Jack Zhou 7242e48efe Materialized paths example. 2014-06-07 18:39:18 -07:00
Mike Bayer 809a7890a1 - remove drizzle dialect
- restore mysqldb fully within dialects/mysql/, it's no longer a connector.
fixes #2984
2014-05-30 18:06:09 -04:00
Mike Bayer 814637e291 - vastly improve the "safe close cursor" tests in test_reconnect
- 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
2014-05-30 16:24:38 -04:00
Mike Bayer 8daa6ccfb0 - The `__mapper_args__` dictionary is copied from a declarative
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
2014-05-30 15:36:13 -04:00
Mike Bayer 2da30fde12 fix typo 2014-05-30 13:21:12 -04:00
Mike Bayer 56fa40e7f3 Merged in chrisw/sqlalchemy/more_range_docs (pull request #20)
more docs for using psycopg2 range types, specifically instantiating models with them

fixes #3046
2014-05-30 13:02:05 -04:00
Mike Bayer 2e4d3e65e3 - changelog + docs for pg8000 transaction isolation level 2014-05-30 12:27:42 -04:00
Mike Bayer 860b413ade - The psycopg2 `.closed` accessor is now consulted when determining
if an exception is a "disconnect" error; ideally, this should remove
the need for any other inspection of the exception message to detect
disconnect, however we will leave those existing messages in place
as a fallback.   This should be able to handle newer cases like
"SSL EOF" conditions.  Pull request courtesy Dirk Mueller.
fixes #3021
2014-05-30 11:56:19 -04:00
Mike Bayer 69dbcdd0eb - Related to 🎫3060, an adjustment has been made to the unit
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.
2014-05-30 01:32:53 -04:00
Mike Bayer 1bd578998b add ticket 2014-05-29 19:57:03 -04:00
Mike Bayer 752f2e0fc8 - Adjustment to attribute mechanics concerning when a value is
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 🎫`3060`, which also
involves recognition of attributes explicitly set to ``None``
vs. attributes that were never set.
fixes #3061
2014-05-29 19:54:51 -04:00
Mike Bayer a04f0c1e37 relative here 2014-05-29 18:52:15 -04:00
Mike Bayer 6adaa66fbe - correct the size on side elements 2014-05-29 16:42:11 -04:00
Mike Bayer f07bc010ee - re-merge doc_nav. We've removed the whole idea of a "fixed top", and moved the
"fixed" thing entirely to the left side.  The content now regains full vertical real estate, such
that there's no workarounds needed for anchors, they work directly again.
we had to reorganize the whole layout to accommodate this however.
2014-05-29 15:54:13 -04:00
Mike Bayer 5d37a9377c fix 2014-05-29 15:49:04 -04:00
Mike Bayer 39e15ac760 more 2014-05-29 15:38:17 -04:00
Mike Bayer 686887688d - all new approach which allows the main text to be on the top 2014-05-29 15:26:31 -04:00
Mike Bayer b987f90cd0 - disable the scrolling layout, anchors for code/params are not working,
and the current approach used for sections is not able to work for fine-grained
anchors like these, another approach needs to be taken.
2014-05-29 12:28:19 -04:00
Mike Bayer bc08ee9029 - Fixed a few edge cases which arise in the so-called "row switch"
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 🎫`3061`. fixes #3060
2014-05-28 20:01:21 -04:00
Mike Bayer d60b680e96 - a rework of doc layout and nav:
- reduce the real estate for the top nav; move the search box
    into the top yellow box, close in space
  - use a new CSS/js approach such that the top toolbar freezes from
    scrolling at the top of the page.  The left nav scrolls independently
    of the content pane so that the local contents remain visible regardless
    of scrolling.   this approach is disabled on mobile where the dual scrollbars
    may be cumbersome (overall the site is not well designed for mobile).
2014-05-28 10:58:55 -04:00
Mike Bayer 5dfcf24b85 - add some more height here so that anchors come out 2014-05-27 19:06:30 -04:00
Mike Bayer bcb978d7b5 - disallow negative scroll positions from affecting the left nav position 2014-05-27 18:34:56 -04:00
Mike Bayer 70159e7551 - again use "fixed" for sidebar in all automated cases, dynamically
adjust its top within the initial scroll period, this is what foundationdb
is doing.   For whatever reason that comes out smooth on all browsers.
the rationale is so that its independently scrollable at all times.
2014-05-27 17:55:38 -04:00
Mike Bayer 59111c50c1 - go back to float:left for the sidenav in normal mode, we had a clear:right
causing the issue
2014-05-27 17:05:50 -04:00
Mike Bayer bb671fafca OK this one seems to be the most solid 2014-05-27 16:53:49 -04:00
Mike Bayer a0366c9a56 - use relative/absolute positioning and greatly simplify everything,
works in chrome + safari
2014-05-27 13:24:58 -04:00
Mike Bayer 2ce24b64e1 more tweaks 2014-05-26 16:40:24 -04:00
Mike Bayer e17ea5b3af - automate the offset part 2014-05-26 13:11:10 -04:00
Mike Bayer 2f878a47f8 - add mobile detection, turn the whole thing off if mobile 2014-05-26 12:37:48 -04:00
Mike Bayer 461bf43669 - pull in the whole top into the fixed part, reduce the size, clean it up 2014-05-26 12:31:43 -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 e384347ffb - Added the `hashable=False flag to the PG :class:.HSTORE` type, which
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
2014-05-25 13:58:08 -04:00
Mike Bayer 95b10c4e8e - Fixed bug in subquery eager loading where a long chain of
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
2014-05-25 13:45:32 -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
Chris Withers 551c730f3f more docs for using psycopg2 range types, specifically instantiating models with them 2014-05-25 15:46:31 +01:00
Mike Bayer b0b6f4295e - indicate all 0.9.5 issues as from 1.0.0 backported to 0.9.5 2014-05-24 15:15:00 -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 931685bac9 - hyperlink all the column operators listed in the ORM tutorial common filter operators section
- add language to MATCH explicitly stating this operator varies by backend and is not available
on SQLite, as the tutorial defaults to SQLite to start with, fix #3059
- on the actual match() documentation fix this up to be more accurate, list some example renderings
for different backends.  again mention SQLite not supported
2014-05-24 09:54:20 -04:00
Mike Bayer bc91884a41 - document the compiler_kwargs accessor
- add new FAQ for rendering SQL as a string
2014-05-23 14:26:22 -04:00
Mike Bayer 9c394ec1ae call this 1.0 2014-05-23 12:28:28 -04:00
Mike Bayer 0436538314 - changelog for #3034, at this point we can mark fix #3034 2014-05-23 11:34:14 -04:00
Mike Bayer 0932e16cb7 - switch master to be 1.0 2014-05-23 11:18:46 -04:00
Mike Bayer 460465a874 - changelog for #2785
- refactor tests a bit
fixes #2785
2014-05-16 13:09:50 -04:00
Mike Bayer 0f925ad430 typo 2014-05-16 12:59:47 -04:00
Mike Bayer 6212d59bdc - add lots more to the profiling section
- add the query profiling recipe, fix it with a stack as we now nest those
calls occasionally
- tabs to spaces
2014-05-16 11:53:12 -04:00
Mike Bayer aa12fdb40e - Fixed bug in mutable extension where :class:.MutableDict did not
report change events for the ``setdefault()`` dictionary operation.
fixes #3051
2014-05-14 10:03:24 -04:00