Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer 0b52a5ae74 - Added @event.listens_for() decorator, given
target + event name, applies the decorated
function as a listener.  [ticket:2106]
- remove usage of globals from test.base.test_events
2011-04-02 13:29:11 -04:00
Mike Bayer b99cd60cb8 - beef up the "augmenting existing types" section
- add docstirngs for everything TypeDecorator [ticket:2086]
2011-03-30 14:07:27 -04:00
Mike Bayer d355a3be3b - Documented SQLite DATE/TIME/DATETIME types.
[ticket:2029] (also in 0.6.7)
- add "currentmodule" directive to all the dialect type docs to
ensure users import from the dialect package, not the "base" module
2011-03-27 20:34:39 -04:00
Mike Bayer b6423d2628 - remove all the fanfare from dynamic_loader() and de-emphasize it in
the docs for [ticket:2080].   Not deprecating for now.
2011-03-20 14:54:35 -04:00
Mike Bayer 50764fd641 - add attrstrings for all the important mapper() attrbutes, [ticket:2094].
Sticking with quotes here since that's what's used everywhere else.
- rename "API Documentation - XYZ" to "XYZ API".
- move connection API docs to the bottom of that section.  still
floating between separate API sections vs. inline API sections, not
sure how to be consistent.
- fix outdated paragraph about derived_attrbutes
- other target function fixes
2011-03-20 14:00:16 -04:00
Michael Trier 75c78aa714 Added docs requirements 2011-03-20 00:05:22 -04:00
Mike Bayer 2136054ca8 - some doc reorg
- change engine.Connection to _connection_cls so sphinx doesn't get upset
- globally add "." to all :class:`Foo`
- start naming sections that are mostly docstrings "API Documentation - blah blah"
- move some ad-hoc docstrings into "API" sections, there is some inconsistency here
and it may be that we just have to leave it that way
- add "internals" rsts to core, orm, I'm not super thrilled how these look but they are
targeted by some of the public api docs, users typically become aware of these anyway
2011-03-17 21:13:14 -04:00
Brad Allen d2c2f06ee1 Added TypeDecorator documentation to the Sphinx page, as well
as several docstrings to TypeDecorator methods. Work in progress
but committing for review so far...
2011-03-14 17:55:47 -04:00
Mike Bayer 7dab4ae6a9 - rename EngineEvents to ConnectionEvents
- simplify connection event model to be inline inside Connection, don't use ad-hoc
subclasses (technically would leak memory for the app that keeps creating engines
and adding events)
- not doing listen-per-connection yet.  this is closer.  overall things
are much simpler now (until we put listen-per-connection in...)
2011-02-17 19:59:45 -05:00
Mike Bayer 2e4da52221 - The Sequence() construct, when passed a MetaData()
object via its 'metadata' argument, will be
included in CREATE/DROP statements within
metadata.create_all() and metadata.drop_all(),
including "checkfirst" logic.  [ticket:2055]
2011-02-13 19:32:00 -05:00
Mike Bayer 2a289e915e - fix long lines in test_attributes
- add deprecation warning to get_history() when passed
True or False, convert
- rearrange symbol() so we can get sphinx autodata to work
2011-02-11 17:58:49 -05:00
Mike Bayer 020d6ef8f0 - Added over() function, method to FunctionElement
classes, produces the _Over() construct which
in turn generates "window functions", i.e.
"<window function> OVER (PARTITION BY <partition by>,
ORDER BY <order by>)".
[ticket:1844]
2011-02-10 21:57:44 -05:00
Mike Bayer 3f9a343d72 - Query.distinct() now accepts column expressions
as *args, interpreted by the Postgresql dialect
  as DISTINCT ON (<expr>). [ticket:1069]
- select.distinct() now accepts column expressions
  as *args, interpreted by the Postgresql dialect
  as DISTINCT ON (<expr>).  Note this was already
  available via passing a list to the `distinct`
  keyword argument to select(). [ticket:1069]
- select.prefix_with() accepts multiple expressions
  (i.e. *expr), 'prefix' keyword argument to select()
  accepts a list or tuple.
- Passing a string to the `distinct` keyword argument
  of `select()` for the purpose of emitting special
  MySQL keywords (DISTINCTROW etc.) is deprecated -
  use `prefix_with()` for this.
- put kw arguments to select() in order
- restore docs for _SelectBase, renamed from _SelectBaseMixin
2011-02-10 14:17:08 -05:00
Mike Bayer e80eac22a8 - figured out the ::autodata directive, can move the docstring for
expression.func into the .py module
- added a note about logging only being checked on new connections,
as one user had this issue awhile back, and I suspect it for
a current ML user issue
2011-02-09 16:30:49 -05:00
Mike Bayer f14f71581c show sequence members 2011-02-05 16:51:24 -05:00
Mike Bayer 85084caeff - A single contains_eager() call across
multiple entities will indicate all collections
along that path should load, instead of requiring
distinct contains_eager() calls for each endpoint
(which was never correctly documented).
[ticket:2032]

- The "name" field used in orm.aliased() now renders
in the resulting SQL statement.
2011-02-05 16:09:49 -05:00
Mike Bayer 5a2c332f5e - Some adjustments so that Interbase is supported as well.
FB/Interbase version idents are parsed into a structure
such as (8, 1, 1, 'interbase') or (2, 1, 588, 'firebird')
so they can be distinguished. [ticket:1885]
- fixed relfection of the "autoincrement" flag against a default
placed on the column.
2011-02-01 16:34:37 -05:00
Mike Bayer 12073e281e - SchemaItem, SchemaType now descend from common type
SchemaEventTarget, which supplies dispatch
- the dispatch now provides before_parent_attach(),
after_parent_attach(), events which generally bound the _set_parent()
event. [ticket:2037]
- the _on_table_attach mechanism now usually uses the
event dispatch
- fixed class-level event dispatch to propagate to all subclasses, not just
immediate subclasses
- fixed class-level event unpickling to handle more involved
inheritance hierarchies, needed by the new schema event dispatch.
- ForeignKeyConstraint doesn't re-call the column attach event
on ForeignKey objects that are already associated with the correct
Column
- we still need that ImportError on mysqldb CLIENT FLAGS to support
mock DBAPIs
2011-01-30 20:29:48 -05:00
Mike Bayer 1515073b96 - New DBAPI support for pymysql, a pure Python port
of MySQL-python.  [ticket:1991]
2011-01-26 11:18:03 -05:00
Mike Bayer 9122268ed0 - new dialect for Drizzle [ticket:2003]
- move mysqldb to a connector, can be shared among mysql/drizzle
2011-01-26 10:44:00 -05:00
Mike Bayer 0f52225ba8 - move maxdb notes from wiki to the maxdb module
- move exception docs down to the lower portion of core/orm
2011-01-18 16:02:02 -05: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 7325ba60bc - execution_options() on Connection accepts
"isolation_level" argument, sets transaction isolation
level for that connection only until returned to the
connection pool, for thsoe backends which support it
(SQLite, Postgresql) [ticket:2001]
- disallow the option on Engine (use isolation_level to create_engine()),
Executable (we don't want to check/set per statement)
- docs
2011-01-16 17:04:07 -05:00
Mike Bayer dff5a404e4 - getting slightly more consistent behavior for the edge case of pk columns
with server default - autoincrement is now false with any server_default,
so these all return None, applies consistency to [ticket:2020], [ticket:2021].
if prefetch is desired a "default" should be used instead of server_default.
2011-01-15 16:42:29 -05:00
Mike Bayer 411cbf29e9 more copyright 2011-01-07 20:50:46 -05:00
Mike Bayer 76b86a905b 2011 2011-01-07 20:48:23 -05:00
Mike Bayer e46301b515 - The Index() construct can be created inline with a Table
definition, using strings as column names, as an alternative
to the creation of the index outside of the Table.
2011-01-04 13:48:46 -05:00
Mike Bayer 49ede80b05 doc updates 2011-01-03 13:55:27 -05:00
Mike Bayer 18eef3a22b finish an unfinished sentence 2011-01-02 20:41:30 -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 426c4356eb - removes the "on_" prefix. 2010-12-30 14:22:43 -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 2e58059cbb - docs for mutable events example 2010-12-26 17:28:56 -05:00
Mike Bayer 6cd730541f - restore declarative support for "composite"
- add an example of mutable scalars with events
2010-12-23 15:27:47 -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 4d9d6c126f - add version selector 2010-12-05 18:45:15 -05:00
Mike Bayer f1e54a69fb - merge default tip 2010-12-05 14:56:26 -05:00
Mike Bayer 77763969ff - refer to 0.7 in docs 2010-12-05 13:29:34 -05:00
Mike Bayer d30678d18d new calling style: event.listen(target, identifier, fn) 2010-12-01 14:10:11 -05:00
Mike Bayer 4c6e93d72a - format guid hexstring explicit with 32 chars, [ticket:1988] 2010-11-30 13:29:23 -05:00
Mike Bayer aaf9933942 - add docs for hybrid 2010-11-28 17:13:07 -05:00
Mike Bayer ca9d3cea39 after some usage, its clear that [ticket:1974] should not be implemented. backrefs
add to collections so its expected that collection membership would mirror in session
membership.
Backed out changeset e836366c84
2010-11-28 16:27:44 -05:00
Mike Bayer e836366c84 - cascade_backrefs flag on relationship() now set to False by default.
[ticket:1974]
2010-11-28 13:01:23 -05:00
Mike Bayer 61840abbce - NullPool is now used by default for SQLite file-
based databases.  :memory: databases will continue
 to select SingletonThreadPool by default.
 [ticket:1921]
2010-11-28 12:00:01 -05:00
Mike Bayer ee25562461 - merge 2-arg form of query.join(), [ticket:1923] 2010-11-26 16:40:41 -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 ca2d85540f - logging has been overhauled such that engines no longer need to encode the
"hex id" string in their logging name in order to maintain separate loggers
per engine. thanks to Vinay Sajip for assistance.  merge of [ticket:1926]
2010-11-20 16:28:39 -05:00