summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mapping multiple tables for one classpr/20biner2013-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm doing something to finish the horizontal shard job. The examle is sharding to multiple database . And i just do it for multipls tables in one database. there is many tables just like msg_00,msg_01..... msg_99 defind the class like Msg() map the tables . =============================== m = Msg number = int(uid)%100 tablename = 'msg_%02d'%(number) m.__uuid__ = uid m.__table__.name = tablename =============================== now "m" mapping the table msg_xx . It works in the select sql. but fail in the session.add(newmessage) because the sqlalchemy has cache connection . event one table is Table(msg_00) and another is Table (msg_01) So, i edit the memo key . then there is diff insert object . ------------------ It's simple change and useful. It‘s safe for the old version . sorry for my poor english.
* Updates to MySQL reserved words for versions 5.5, 5.6, courtesyMike Bayer2013-07-314-0/+31
| | | | | Hanno Schlichting. Also in 0.8.3, 0.7.11. [ticket:2791]
* fix missing commaMike Bayer2013-07-311-1/+1
|
* - update ORM event docs to include that you can listen on an unmapped base,Mike Bayer2013-07-311-29/+32
| | | | [ticket:2777]
* fix changelogMike Bayer2013-07-311-1/+1
|
* - Fixed bug in common table expression system where if the CTE wereMike Bayer2013-07-316-12/+71
| | | | | | used only as an ``alias()`` construct, it would not render using the WITH keyword. Also in 0.8.3, 0.7.11. [ticket:2783]
* modernize this a bitMike Bayer2013-07-271-19/+10
|
* - this collection can be None on cleanup, so check for thatMike Bayer2013-07-271-1/+1
|
* last updatedMike Bayer2013-07-271-1/+1
|
* try seeing if just clearing this ahead of time helpsMike Bayer2013-07-271-0/+1
|
* - fix issue in join rewriting whereby we need to ensure the .key and .nameMike Bayer2013-07-272-5/+86
| | | | | | are transferred correctly for when .key is present; tests have been enhanced to test this condition for render, result map construction, statement execution. [ticket:2790]
* - The C extensions are ported to Python 3 and will build underMike Bayer2013-07-267-55/+394
| | | | any supported CPython 2 or 3 environment. [ticket:2161]
* - add event.contains() function to the event package, returns TrueMike Bayer2013-07-265-18/+25
| | | | | if the given target/event/fn is set up to listen. - repair mutable package which is doing some conditional event listening
* - Removal of event listeners is now implemented. The feature isMike Bayer2013-07-2616-825/+1392
| | | | | | | | | | | | | | | | provided via the :func:`.event.remove` function. [ticket:2268] - reorganization of event.py module into a package; with the addition of the docstring work as well as the new registry for removal, there's a lot more code now. the package separates concerns and provides a top-level doc for each subsection of functionality - the remove feature works by providing the EventKey object which associates the user-provided arguments to listen() with a global, weak-referencing registry. This registry stores a collection of _ListenerCollection and _DispatchDescriptor objects associated with each set of arguments, as well as the wrapped function which was applied to that collection. The EventKey can then be recreated for a removal, all the _ListenerCollection and _DispatchDescriptor objects are located, and the correct wrapped function is removed from each one.
* - The mechanism by which attribute events pass along anMike Bayer2013-07-268-65/+231
| | | | | | | | | | | | | | | | | | | :class:`.AttributeImpl` as an "initiator" token has been changed; the object is now an event-specific object called :class:`.attributes.Event`. Additionally, the attribute system no longer halts events based on a matching "initiator" token; this logic has been moved to be specific to ORM backref event handlers, which are the typical source of the re-propagation of an attribute event onto subsequent append/set/remove operations. End user code which emulates the behavior of backrefs must now ensure that recursive event propagation schemes are halted, if the scheme does not use the backref handlers. Using this new system, backref handlers can now peform a "two-hop" operation when an object is appended to a collection, associated with a new many-to-one, de-associated with the previous many-to-one, and then removed from a previous collection. Before this change, the last step of removal from the previous collection would not occur. [ticket:2789]
* tpoMike Bayer2013-07-201-9/+9
|
* - Improved the examples in ``examples/generic_associations``, includingMike Bayer2013-07-1910-49/+276
| | | | | | | | | | | | | | | 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.
* Merge pull request #18 from davidjb/patch-1mike bayer2013-07-191-2/+2
|\ | | | | Minor hybrid extension documentation update
| * Minor hybrid extension documentation updatepr/18David Beitey2013-07-191-2/+2
|/
* Fixed bug in ORM-level event registration where the "raw" orMike Bayer2013-07-184-18/+79
| | | | | | "propagate" flags could potentially be mis-configured in some "unmapped base class" configurations. Also in 0.8.3. [ticket:2786]
* Fixed bug in :class:`.CheckConstraint` DDL where the "quote" flag from aMike Bayer2013-07-175-1/+47
| | | | | :class:`.Column` object would not be propagated. Also in 0.8.3, 0.7.11. [ticket:2784]
* Merge pull request #17 from iElectric/docs/wording_yield_permike bayer2013-07-141-6/+6
|\ | | | | wording about supported dialects for Query.yield_per
| * wording about supported dialects for Query.yield_perpr/17Domen Kožar2013-07-141-6/+6
|/
* typoMike Bayer2013-07-131-7/+7
|
* further tweakingMike Bayer2013-07-131-3/+2
|
* fix the scoping hereMike Bayer2013-07-131-2/+4
|
* changelog for 0.9Mike Bayer2013-07-131-0/+15
|
* A performance fix related to the usage of the :func:`.defer` optionMike Bayer2013-07-138-46/+146
| | | | | | | | | | | | | when loading mapped entities. The function overhead of applying a per-object deferred callable to an instance at load time was significantly higher than that of just loading the data from the row (note that ``defer()`` is meant to reduce DB/network overhead, not necessarily function call count); the function call overhead is now less than that of loading data from the column in all cases. There is also a reduction in the number of "lazy callable" objects created per load from N (total deferred values in the result) to 1 (total number of deferred cols). [ticket:2778]
* doc fixMike Bayer2013-07-121-1/+1
|
* The newly added SQLite DATETIME arguments storage_format andMike Bayer2013-07-124-1/+70
| | | | | | | regexp apparently were not fully implemented correctly; while the arguments were accepted, in practice they would have no effect; this has been fixed. Also in 0.8.3. [ticket:2781]
* - use inline=True for the insert..select here so it works on oracleMike Bayer2013-07-122-2/+13
|
* CSS tweaks to support version styling in the latest versions of sphinxMike Bayer2013-07-121-9/+16
|
* Fixed bug where the expression system relied upon the ``str()``Mike Bayer2013-07-128-5/+118
| | | | | | | | | | | | form of a some expressions when referring to the ``.c`` collection on a ``select()`` construct, but the ``str()`` form isn't available since the element relies on dialect-specific compilation constructs, notably the ``__getitem__()`` operator as used with a Postgresql ``ARRAY`` element. The fix also adds a new exception class :class:`.UnsupportedCompilationError` which is raised in those cases where a compiler is asked to compile something it doesn't know how to. Also in 0.8.3. [ticket:2780]
* don't split the regexps for chop_traceback()Mike Bayer2013-07-121-4/+2
|
* Dialect.initialize() is not called a second time if an :class:`.Engine`Mike Bayer2013-07-116-4/+63
| | | | | | is recreated, due to a disconnect error. This fixes a particular issue in the Oracle 8 dialect, but in general the dialect.initialize() phase should only be once per dialect. Also in 0.8.3. [ticket:2776]
* - we dont actually need this unicode cast, on py3k + linux it seems theMike Bayer2013-07-093-8/+4
| | | | | has_table issues are OK. On OSX forget it. - still some issues with PY3k + pyodbc + decimal values it doesn't expect, not sure
* changelog for 2355Mike Bayer2013-07-091-0/+7
|
* callcountsMike Bayer2013-07-081-32/+32
|
* - create a new system where we can decorate an event methodMike Bayer2013-07-0812-78/+668
| | | | | | | | | | | | | | | | with @_legacy_signature, will inspect incoming listener functions to see if they match an older signature, will wrap into a newer sig - add an event listen argument named=True, will send all args as kw args so that event listeners can be written with **kw, any combination of names - add a doc system to events that writes out the various calling styles for a given event, produces deprecation messages automatically. a little concerned that it's a bit verbose but will look at it up on RTD for awhile to get a feel. - change the calling signature for bulk update/delete events - we have the BulkUD object right there, and there's at least six or seven things people might want to see, so just send the whole BulkUD in [ticket:2775]
* remove undoc-members from query docstring [ticket:2774]Mike Bayer2013-07-072-1/+7
|
* use "target tables" hereMike Bayer2013-07-062-2/+2
|
* - Added new method to the :func:`.insert` constructMike Bayer2013-07-0510-5/+315
| | | | | | | | | | :meth:`.Insert.from_select`. Given a list of columns and a selectable, renders ``INSERT INTO (table) (columns) SELECT ..``. While this feature is highlighted as part of 0.9 it is also backported to 0.8.3. [ticket:722] - The :func:`.update`, :func:`.insert`, and :func:`.delete` constructs will now interpret ORM entities as FROM clauses to be operated upon, in the same way that select() already does. Also in 0.8.3.
* 0.9 changelogMike Bayer2013-07-041-0/+9
|
* Fixed bug whereby attribute history functions would failMike Bayer2013-07-043-45/+139
| | | | | | | when an object we moved from "persistent" to "pending" using the :func:`.make_transient` function, for operations involving collection-based backrefs. [ticket:2773]
* Fixed bug where :class:`.QueuePool` would lose the correctMike Bayer2013-07-044-2/+75
| | | | | | checked out count if an existing pooled connection failed to reconnect after an invalidate or recycle event. Also in 0.8.3. [ticket:2772]
* 0.8.2Mike Bayer2013-07-031-0/+1
|
* dont need thisMike Bayer2013-07-031-1/+1
|
* make this rule automatic based on coverage pluginMike Bayer2013-07-031-5/+8
|
* for this test, apparently we don't handle sets as unordered since neither doesMike Bayer2013-07-021-3/+9
| | | | | MySQL. for some reason set ordering was constant when testing mysqldb, but not so with oursql.
* add a float exclusion to help oursql build 100%Mike Bayer2013-07-023-0/+13
|