Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer 4a6afd469f r4695 merged to trunk; trunk now becomes 0.5.
0.4 development continues at /sqlalchemy/branches/rel_0_4
2008-05-09 16:34:10 +00:00
Mike Bayer b9e1a24898 fix foreign_keys example 2008-05-06 16:06:22 +00:00
Mike Bayer d95b063618 more declarative doc updates 2008-04-28 00:04:05 +00:00
Jason Kirtland 22197ca9c5 - Declarative gains @synonym_for and @comparable_using decorators 2008-03-17 22:55:43 +00:00
Mike Bayer 288f9d53e3 - the "synonym" function is now directly usable with
"declarative".  Pass in the decorated property using
the "instrument" keyword argument, e.g.:
somekey = synonym('_somekey', instrument=property(g, s))
- declared_synonym deprecated
2008-03-15 20:18:54 +00:00
Mike Bayer ec89c5ae51 typo 2008-03-12 21:04:19 +00:00
Mike Bayer 07d89b09bb more edits 2008-03-12 00:02:41 +00:00
Mike Bayer 3bcf4e69b9 fix a typo.... 2008-03-11 23:52:46 +00:00
Mike Bayer 0cb4ceeb82 filled in some of the types documentation 2008-03-11 20:03:14 +00:00
Mike Bayer 39355cfef7 updated SQL output, fixed String/Text type 2008-03-11 19:51:48 +00:00
Mike Bayer 88a8cc0c9e - a new super-small "declarative" extension has been added,
which allows Table and mapper() configuration to take place
inline underneath a class declaration.  This extension differs
from ActiveMapper and Elixir in that it does not redefine
any SQLAlchemy semantics at all; literal Column, Table
and relation() constructs are used to define the class
behavior and table definition.
2008-03-10 17:14:08 +00:00
Mike Bayer 793b7c2e6b - added "bind" keyword argument to insert(), update(), delete();
.bind property is settable on those as well as select().
2008-03-04 20:57:32 +00:00
Mike Bayer 2f0a163656 fix markdown bug 2008-03-04 00:40:40 +00:00
Mike Bayer eb51dfc4d5 document with_polymorphic() 2008-03-02 05:55:05 +00:00
Mike Bayer 8fee8e963d add note about global metadata removed [ticket:983] 2008-03-01 16:23:49 +00:00
Mike Bayer 334668d904 - added a new "higher level" operator called "of_type()" -
used in join() as well as with any() and has(), qualifies
the subclass which will be used in filter criterion,
e.g.:

query.filter(Company.employees.of_type(Engineer).
  any(Engineer.name=='foo')),

query.join(Company.employees.of_type(Engineer)).
  filter(Engineer.name=='foo')
2008-02-21 01:01:24 +00:00
Mike Bayer 85e8cb7ffb add pk cols to assocaition table 2008-02-12 16:45:39 +00:00
Mike Bayer 3ab7149e25 added info on foreign_keys attribute 2008-02-09 17:26:48 +00:00
Jason Kirtland 9bc19046d1 - clean up the print version of the docs a bit [ticket:745] 2008-02-06 01:32:33 +00:00
Jason Kirtland 28af2439d9 - doc edits- thanks asmodai! [ticket:906] 2008-02-05 20:26:08 +00:00
Mike Bayer 63d2ce5191 encourage usage of union() and other composites as module-level 2008-01-25 20:52:13 +00:00
Mike Bayer 29f7a38ee0 added an intro for the code sample so that its not construed as a "synopsis" 2008-01-23 20:00:53 +00:00
Mike Bayer ef63a84a49 further clarification on transaction state 2008-01-20 04:47:16 +00:00
Ants Aasma f645c0a420 example of using try-catch to do transaction commit/rollback was wrong in the docs 2008-01-20 03:39:43 +00:00
Ants Aasma 9f366afdda - parent transactions weren't started on the connection when adding a connection to a nested session transaction.
- session.transaction now always refers to the innermost active transaction, even when commit/rollback are called directly on the session transaction object.
- when preparing a two-phase transaction fails on one connection all the connections are rolled back.
- two phase transactions can now be prepared.
- session.close() didn't close all transactions when nested transactions were used.
- rollback() previously erroneously set the current transaction directly to the parent of the transaction that could be rolled back to.
- autoflush for commit() wasn't flushing for simple subtransactions.
2008-01-20 03:22:00 +00:00
Mike Bayer 02a4176a65 happy new year 2008-01-01 17:42:17 +00:00
Mike Bayer ba0267a955 introductory docstring bonanza 2007-12-18 23:53:40 +00:00
Mike Bayer f6068a3522 - select().as_scalar() will raise an exception if the select does not have
exactly one expression in its columns clause.
- added "helper exception" to select.type access, generic functions raise
the chance of this happening
- a slight behavioral change to attributes is, del'ing an attribute
does *not* cause the lazyloader of that attribute to fire off again;
the "del" makes the effective value of the attribute "None".  To
re-trigger the "loader" for an attribute, use
session.expire(instance, [attrname]).
- fix ormtutorial for IS NULL
2007-12-18 00:24:03 +00:00
Mike Bayer 7758edfd74 fix... 2007-12-09 18:27:01 +00:00
Mike Bayer acdb90784b - mutable primary key support is added. primary key columns can be
changed freely, and the identity of the instance will change upon
flush. In addition, update cascades of foreign key referents (primary
key or not) along relations are supported, either in tandem with the
database's ON UPDATE CASCADE (required for DB's like Postgres) or
issued directly by the ORM in the form of UPDATE statements, by setting
the flag "passive_cascades=False".
2007-12-09 05:00:12 +00:00
Mike Bayer c9b3f0bcef - added new methods to TypeDecorator, process_bind_param() and
process_result_value(), which automatically take advantage of the processing
of the underlying type.  Ideal for using with Unicode or Pickletype.
TypeDecorator should now be the primary way to augment the behavior of any
existing type including other TypeDecorator subclasses such as PickleType.
2007-12-08 23:03:22 +00:00
Mike Bayer 78bb82a44b changed the anonymous numbering scheme to be more appealing
got tests running
2007-12-08 18:38:18 +00:00
Mike Bayer 377a57ea8d corrected for current output... 2007-12-08 18:04:46 +00:00
Mike Bayer 88518c203d added a mention about eagerload_all() [ticket:897] 2007-12-08 17:07:40 +00:00
Mike Bayer 594784a206 assert_unicode=True replaced with default of assert_unicode='warn' 2007-12-05 22:21:37 +00:00
Mike Bayer 4ee7070223 new synonym() behavior, including auto-attribute gen, attribute decoration,
and auto-column mapping implemented; [ticket:801]
2007-11-28 21:13:35 +00:00
Mike Bayer d56e11ffe2 default value of assert_unicode is None on String, False on create_engine(), and True on Unicode type. 2007-11-28 00:44:16 +00:00
Mike Bayer 37bffd8f2b edits 2007-11-25 23:34:26 +00:00
Mike Bayer e4056a1787 - added new flag to String and create_engine(), assert_unicode=(True|False|None).
When convert_unicode=True, this flag also defaults to `True`, and results in all
unicode conversion operations raising an exception when a non-unicode bytestring
is passed as a bind parameter.  It is strongly advised that all unicode-aware
applications make proper use of Python unicode objects (i.e. u'hello' and
not 'hello').
2007-11-25 23:14:03 +00:00
Jason Kirtland 56d14df0eb Typo fix 2007-11-20 18:32:01 +00:00
Mike Bayer 051e43245d doctest fixups 2007-11-18 22:47:55 +00:00
Mike Bayer 622a26a655 - session.refresh() and session.expire() now support an additional argument
"attribute_names", a list of individual attribute keynames to be refreshed
or expired, allowing partial reloads of attributes on an already-loaded
instance.
- finally simplified the behavior of deferred attributes, deferred polymorphic
load, session.refresh, session.expire, mapper._postfetch to all use a single
codepath through query._get(), which now supports a list of individual attribute names
to be refreshed.  the *one* exception still remaining is mapper._get_poly_select_loader(),
which may stay that way since its inline with an already processing load operation.
otherwise, query._get() is the single place that all "load this instance's row" operation
proceeds.
- cleanup all over the place
2007-11-18 02:13:56 +00:00
Jason Kirtland df3cbebe3c Removed out of date identity map language (thanks, Jiten) 2007-11-10 15:47:19 +00:00
Mike Bayer 7a25be0f42 - identified some cases where Alias needs to be cloned; but still cant clone
when its an alias of a Table; added some test coverage for one particular
case from the doctests
- fixed "having" example in doctests, updated eager load example
2007-11-08 00:26:23 +00:00
Rick Morrison 5c060ab22a Added note about EXT_CONTINUE to 3.x -> 4.x migration guide 2007-11-05 22:52:21 +00:00
Rick Morrison 8dd51943a0 added small clarification on single-table inheritance mapper def 2007-11-03 16:11:41 +00:00
Mike Bayer 9cdc083ed1 doc updates for save_on_init=False, merge(...dont_save=True) 2007-11-02 21:02:22 +00:00
Mike Bayer 66cd772094 - merged factor_down_bindparams branch.
- removed ClauseParameters object; compiled.params returns a regular dictionary
  now, as well as result.last_inserted_params()/last_updated_params().
- various code trimming, method removals.
2007-11-01 03:58:21 +00:00
Mike Bayer ed2d7dc805 typos, PassiveDefault likes "text()" otherwise the argument is a literal 2007-10-17 19:10:16 +00:00
Mike Bayer cc41f0d3cf typo 2007-10-17 17:40:04 +00:00