Commit Graph

45 Commits

Author SHA1 Message Date
Mike Bayer c7f9aa2818 - rewrite the docs and add a test for the bake_queries=True
relationship flag; this flag *does* have an effect when the baked
lazy loader plugin has been invoked.  clarify the intent of this
flag as an "opt out" but only has an effect when the baked system
is loaded anyway.  fixes #3572
2015-11-19 14:23:08 -05:00
Mike Bayer 9d08c6abc2 - Added the :paramref:.AssociationProxy.info parameter to the
:class:`.AssociationProxy` constructor, to suit the
:attr:`.AssociationProxy.info` accessor that was added in
🎫`2971`.  This is possible because :class:`.AssociationProxy`
is constructed explicitly, unlike a hybrid which is constructed
implicitly via the decorator syntax.
fixes #3551
2015-10-09 18:01:43 -04:00
Éric Araujo 6245d003f2 Fix typo in directive 2015-05-29 15:21:16 -04:00
Ernest Walzel a518b31f3b Fix typos
agaisnt -> against
'a Alias' -> 'an Alias'
2015-03-26 18:28:11 +00:00
Mike Bayer 941fe5e060 - add the fact that we can cache the sql naively as well 2015-03-12 12:19:35 -04:00
Mike Bayer 6b76352f46 - add a rationale section 2015-03-12 11:23:44 -04:00
Mike Bayer e3b46bd624 - Added a new extension suite :mod:sqlalchemy.ext.baked. This
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
2015-03-11 20:31:11 -04:00
Mike Bayer 544e72bcb6 - corrections
- attempt to add a script to semi-automate the fixing of links
2014-12-27 16:22:41 -05:00
Mike Bayer 9561321d03 - squash-merge the improve_toc branch, which moves all the Sphinx styling
and extensions into an external library, and also reorganizes most large documentation
pages into many small areas to reduce scrolling and better present the context
into a more fine-grained hierarchy.
2014-12-17 17:24:23 -05:00
Mike Bayer 7f82c55fa7 - refactor of declarative, break up into indiviudal methods
that are now affixed to _MapperConfig
- declarative now creates column copies ahead of time
so that they are ready to go for a declared_attr
- overhaul of declared_attr; memoization, cascading modifier
- A relationship set up with :class:`.declared_attr` on
a :class:`.AbstractConcreteBase` base class will now be configured
on the abstract base mapping automatically, in addition to being
set up on descendant concrete classes as usual.
fixes #2670
- The :class:`.declared_attr` construct has newly improved
behaviors and features in conjunction with declarative.  The
decorated function will now have access to the final column
copies present on the local mixin when invoked, and will also
be invoked exactly once for each mapped class, the returned result
being memoized.   A new modifier :attr:`.declared_attr.cascading`
is added as well. fixes #3150
- the original plan for #3150 has been scaled back; by copying
mixin columns up front and memoizing, we don't actually need
the "map properties later" thing.
- full docs + migration notes
2014-09-25 21:08:17 -04:00
Mike Bayer 890ac4c81b doc fixes 2014-05-01 20:34:33 -04:00
Mike Bayer 21bc2c2a5b - docs + tests 2014-01-05 16:48:01 -05:00
Vraj Mohan a62afc6229 Fix cross references 2013-11-17 17:37:55 -05:00
Vraj Mohan 4bc2869b24 Add API generation to resolve cross references 2013-11-17 17:37:55 -05:00
Vraj Mohan 1a6dd8b393 Fix cross references 2013-11-14 17:42:55 -05:00
Mike Bayer 91ae63569d - catch the metadata on ScalarTest.test_scalar_proxy, this has been leaving itself
around for a long time
- association proxy now returns None for proxied scalar that is also None, rather
than raising AttributeError. [ticket:2810]
2013-10-25 17:56:53 -04:00
Mike Bayer 0c19c1c66f - reorganize docs so expression, schema are broken out into subfiles, they're too big
- fix the targeting of module names moved around by using custom handlers for "Bases", etc.
2013-08-18 18:01:27 -04:00
Mike Bayer af61551a11 - Improved the examples in `examples/generic_associations`, including
that ``discriminator_on_association.py`` makes use of single table
inheritance do the work with the "discriminator".  Also
added a true "generic foreign key" example, which works similarly
to other popular frameworks in that it uses an open-ended integer
to point to any other table, foregoing traditional referential
integrity.  While we don't recommend this pattern, information wants
to be free.  Also in 0.8.3.

- Added a convenience class decorator :func:`.as_declarative`, is
a wrapper for :func:`.declarative_base` which allows an existing base
class to be applied using a nifty class-decorated approach.  Also
in 0.8.3.
2013-07-19 22:56:34 -04:00
Mike Bayer b30ef87d27 Extended the :doc:/core/inspection system so that all Python descriptors
associated with the ORM or its extensions can be retrieved.
This fulfills the common request of being able to inspect
all :class:`.QueryableAttribute` descriptors in addition to
extension types such as :class:`.hybrid_property` and
:class:`.AssociationProxy`.  See :attr:`.Mapper.all_orm_descriptors`.
2012-12-29 19:31:28 -05:00
Diana Clarke 72d4f3e220 docs - missing 'attr' in AssociationProxy join see #2636 2012-12-16 08:01:08 -05:00
Mike Bayer d89d71d1da The :class:.MutableComposite type did not allow for the
:meth:`.MutableBase.coerce` method to be used, even though
the code seemed to indicate this intent, so this now works
and a brief example is added.  As a side-effect,
the mechanics of this event handler have been changed so that
new :class:`.MutableComposite` types no longer add per-type
global event handlers.  Also in 0.7.10

[ticket:2624]
2012-12-03 19:49:42 -05:00
Mike Bayer 4356741c48 - hstore adjustments 2012-11-17 20:45:17 -05:00
Mike Bayer d68bf88fa9 - add class_ to AliasedInsp
- redefine inspect(Class.attrname).parent to be always an inspectable
target; either Mapper or AliasedInsp
- add most major features to 08 migration, document, link
2012-10-26 19:25:23 -04:00
Mike Bayer 319aa982a1 - [moved] The InstrumentationManager interface
and the entire related system of alternate
class implementation is now moved out
to sqlalchemy.ext.instrumentation.   This is
a seldom used system that adds significant
complexity and overhead to the mechanics of
class instrumentation.  The new architecture
allows it to remain unused until
InstrumentationManager is actually imported,
at which point it is bootstrapped into
the core.
2012-06-24 02:06:10 -04:00
Mike Bayer d8d080a769 Add some Sphinx related version informations paragraph-level markups,
such as ``.. versionaddedd::``, ``.. versionchanged::`` and ``.. deprecated::``.
2012-06-08 15:56:58 -04:00
Mike Bayer 2925167550 - [feature] The "deferred declarative
reflection" system has been moved into the
declarative extension itself, using the
new DeferredReflection class.  This
class is now tested with both single
and joined table inheritance use cases.
[ticket:2485]
- [bug] The autoload_replace flag on Table,
when False, will cause any reflected foreign key
constraints which refer to already-declared
columns to be skipped, assuming that the
in-Python declared column will take over
the task of specifying in-Python ForeignKey
or ForeignKeyConstraint declarations.
2012-05-17 11:45:05 -04:00
Mike Bayer cb15295850 - remove sqlsoup [ticket:2262]
- remove sqlalchemy.exceptions [ticket:2433]
2012-04-24 13:14:08 -04:00
Mike Bayer d3ff10e035 - add OrderingList class and other functions to sphinx documentation
[ticket:2391]
2012-02-12 18:30:42 -05:00
Mike Bayer bb62d80217 - New event hook, MapperEvents.after_configured().
Called after a configure() step has completed and
    mappers were in fact affected.   Theoretically this
    event is called once per application, unless new mappings
    are constructed after existing ones have been used
    already.

  - New declarative features:
        - __declare_last__() method, establishes an event
        listener for the class method that will be called
        when mappers are completed with the final "configure"
        step.
        - __abstract__ flag.   The class will not be mapped
        at all when this flag is present on the class.
        - New helper classes ConcreteBase, AbstractConcreteBase.
        Allow concrete mappings using declarative which automatically
        set up the "polymorphic_union" when the "configure"
        mapper step is invoked.
        - The mapper itself has semi-private methods that allow
        the "with_polymorphic" selectable to be assigned
        to the mapper after it has already been configured.
        [ticket:2239]
2011-09-10 16:54:23 -04:00
Mike Bayer 84298f7cf9 - rework collections docs, talk about the simple stuff some more.
Scare away the user from custom !  scary !  boo !
2011-08-07 13:34:41 -04:00
Mike Bayer 669d0c47f8 - second pass through association proxy docs, some more links on any()/has(), MapperProperty 2011-08-06 12:43:09 -04:00
Mike Bayer 4fe4590a45 - rewrite the docs for association proxy using declarative, add new examples, querying,
etc., part of [ticket:2246]
- add some accessors to AssociationProxy for attributes, test in join(), [ticket:2236]
- update relationship docs to talk about callables, part of [ticket:2246]
2011-08-05 21:29:21 -04:00
Mike Bayer dc7d611182 - tests for hybrid
- documentation for hybrid
- rewrite descriptor, synonym, comparable_property documentation
2011-01-17 20:05:09 -05:00
Mike Bayer 4f18ce0af5 - add support for pickling with mutable scalars, mutable composites
- add pickle/unpickle events to ORM events.  these are needed
for the mutable extension.
- finish mutable extension documentation, consolidate examples,
add full descriptions
2011-01-02 19:54:31 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer f111a0ad54 mutable docfile 2011-01-02 13:55:51 -05:00
Mike Bayer b1c90de449 - mutable examples now move into sqlalchemy.ext.mutable
- streamline interfaces, get Mutable/MutableComposite to be as minimal
in usage as possible
- docs for mutable, warnings regrarding mapper events being global
- move MutableType/mutable=True outwards, move orm tests to its
own module, note in all documentation
- still need more events/tests for correct pickling support of
composites, mutables.  in the case of composites its needed
even without mutation.  see [ticket:2009]
2010-12-29 15:04:35 -05:00
Mike Bayer 11f2bdff31 - clean it up a bit
- don't need __set_composite_values__()
- break the bad news about mutations
2010-12-20 16:21:31 -05:00
Mike Bayer 2cbf1e590f various formatting and hyperlinking fixes 2010-12-09 00:21:13 -05:00
Mike Bayer f1e54a69fb - merge default tip 2010-12-05 14:56:26 -05:00
Mike Bayer aaf9933942 - add docs for hybrid 2010-11-28 17:13:07 -05:00
Mike Bayer c848624f9d - SqlSoup overhaul
- Added "map_to()" method to SqlSoup, which is a "master"
method which accepts explicit arguments for each aspect of
the selectable and mapping, including a base class per
mapping. [ticket:1975]

- Mapped selectables used with the map(), with_labels(),
join() methods no longer put the given argument into the
internal "cache" dictionary.  Particularly since the
join() and select() objects are created in the method
itself this was pretty much a pure memory leaking behavior.
2010-11-24 12:21:59 -05:00
Mike Bayer abc8e45b2f @mapperproperty -> @declared_attr 2010-09-27 10:01:48 -04:00
Mike Bayer 1ff666ffdf - @classproperty 's official name/location for usage
with declarative is sqlalchemy.ext.declarative.mapperproperty.
Same thing, but moving there since it is more of a
"marker" that's specific to declararative,
not just an attribute technique.  [ticket:1915]
2010-09-25 19:25:31 -04:00
Mike Bayer b42cbed427 almost through. 2010-09-04 19:59:21 -04:00