Commit Graph

521 Commits

Author SHA1 Message Date
Mike Bayer cd95c479e9 added string argument resolution to relation() in conjunction with declarative for: order_by,
primaryjoin, secondaryjoin, secondary, foreign_keys, and remote_side.
2008-05-26 23:01:05 +00:00
Jason Kirtland a66c441043 - Be a little smarter about aliased funcs/methods by ignoring func_name 2008-05-21 18:28:24 +00:00
Mike Bayer 89a8546d00 -removed useless log statement (merge garbage?)
- clarified autocommit mechanism
2008-05-18 17:09:21 +00:00
Jason Kirtland 81b1df8fe1 Query.one() raises either NoResultFound or MultipleResultsFound, [ticket:1034] 2008-05-14 20:44:16 +00:00
Jason Kirtland 65f4f02ec8 Columns now have default= and server_default=. PassiveDefault fades away. 2008-05-14 19:49:40 +00:00
Mike Bayer 0490fbc666 added blurb on session.rollback() 2008-05-10 20:00:10 +00:00
Mike Bayer 8413454b50 - removed all the order by's that no longer apply.
- realized about declarative that foobar: relation("SomeFutureClass") is not very useful for collections since
we can't set "order_by" there.
2008-05-10 19:19:47 +00:00
Lele Gaifax 5a77974f7d Fix typo in the ORM tutorial 2008-05-10 09:02:55 +00:00
Mike Bayer 77a707d629 order by doc 2008-05-10 00:54:17 +00:00
Mike Bayer 333a163ac2 edits 2008-05-10 00:31:35 +00:00
Mike Bayer 9fcc995b9d removed deprecated plugins docs 2008-05-10 00:31:09 +00:00
Mike Bayer cbabd91c21 added query.subquery() as shorthand for query.statement.alias() 2008-05-09 18:57:40 +00:00
Mike Bayer da44a7ac56 tweak 2008-05-09 17:28:43 +00:00
Mike Bayer 497b962f73 need delete-orphan 2008-05-09 17:21:10 +00:00
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