| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
more correctly documented
|
|
|
|
| |
failing to apply type conversion to the bind parameter
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
receive session-specific context via the mapper.using() statement. reuslting object instances will be bound to this session, but query execution still handled by the SQLEngines implicit in the mapper's Table objects.
session now propigates to the unitofwork UOWTransaction object, as well as mapper's save_obj/delete_obj via the UOWTransaction it receives. UOWTransaction explicitly calls the Session for the engine corresponding to each Mapper in the flush operation, although the Session does not yet affect the choice of engines used, and mapper save/delete is still using the Table's implicit SQLEngine.
changed internal unitofwork commit() method to be called flush().
removed all references to 'engine' from mapper module, including adding insert/update specific SQLEngine methods such as last_inserted_ids, last_inserted_params, etc. to the returned ResultProxy so that Mapper need not know which SQLEngine was used for the execute.
changes to unit tests, SelectResults to support the new Query object.
|
|
|
|
| |
well as throughout the call-chain for those. lazy loader honors the "session" of the parent object, + added simple unit test
|
|
|
|
| |
initializers strictly through the SmartPropery instances attached to the class, so that attributes retain their natural polymorphic behavior. naming conventions migrating to "managed_attribute", simplifying codepaths.
|
|
|
|
| |
attribute-level TriggeredAttribute set on it, added unit test.
|
| |
|
|
|
|
| |
argument support to the mapper.select() methd. associated unit test tweaks and mapper integration.
|
|
|
|
| |
immediately removed as well as explicit from dirty/deleted lists. this also changes uow.rollback_object() to remove from those lists, which is strange that it didnt do that before. anyway the mapper, when selecting and creating instances, asks the uow if this already identity-mapped instance is expired, and if so refreshes it on the fly, saving the need for the re-_get() operation, if some other query happens to touch upon the expired object. unit test added to confirm this.
|
|
|
|
|
|
| |
refresh() condition
added None check in PropertyLoader many-to-one private deletion traversal, fixes byroot_tree (add a unit test for that)
|
|
|
|
|
| |
correction in attributes reset_history to really reset in all cases
added unit tests testing refresh()/expire() bug that was fixed by reset_history thing
|
|
|
|
|
|
|
|
|
|
|
| |
more intelligent bind parameter dictionary that does type conversions late and preserves the unconverted value; used to fix mappers not comparing correct value in post-fetch [ticket:110]
removed pre_exec assertion from oracle/firebird regarding "check for sequence/primary key value"
fix to Unicode type to check for null, fixes [ticket:109]
create_engine() now uses genericized parameters; host/hostname, db/dbname/database, password/passwd, etc. for all engine connections
fix to select([func(column)]) so that it creates a FROM clause to the column's table, fixes [ticket:111]
doc updates for column defaults, indexes, connection pooling, engine params
unit tests for the above bugfixes
|
| |
|
|
|
|
| |
work even when one side of the relation has both tables in it (new unittest will be added to inheritance.py to show this...)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this includes:
sql.Alias object keeps track of the immediate thing it aliased as well
as the ultimate non-aliased (usually a Table) object, so that proxied columns can have
a "parent" attribute
some cleanup to SelectBaseMixin.order_by_clause to allow easier access, needs more cleanup
engine has been making two ResultProxies all this time, added "return_raw" quickie flag to
disable that
some cleanup to _get_col_by_original so that it also works for oid columns, new eager load stuff
more aggressively aliaseses orderby's so this was needed
EagerLoader now makes "chains" of unique aliased eager loaders in all cases. no need for
use_alias/selectalias anymore since it aliases every time.
properly detects recursive eager loads and terminates them with a lazyloader, instead of
raising an exception. totally simplified setup() and init() is more straightforward and has
a single codepath now instead of two or three.
|
|
|
|
|
| |
version has "property" accessor which returns MapperProperty at
the class level
|
| |
|
| |
|
|
|
|
| |
changed unit tests/examples to not do it
|
| |
|
| |
|
| |
|
|
|
|
| |
will have a None oid_column attribute.
|
| |
|
|
|
|
|
|
| |
flag sent to create_engine enables whether or not the rowid_column on a Table will be None or not. mappers/relations will by default use the rowid_column for ordering if its not None, else theres no default ordering.
still should better define 'default_ordering'/'rowid_column' relationship since its a little kludgy.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functions:
testfunction has a more complete test (needs an assert tho);
added new labels, synonymous with column key, to "select" statements that are subqueries with use_labels=False, since SQLite wants them -
this also impacts the names of the columns attached to the select object in the case that the key and name dont match, since
it is now the key, not the name;
aliases generate random names if name is None (need some way to make them more predictable to help plan caching);
select statements have a rowid column of None, since there isnt really a "rowid"...at least cant figure out what it would be yet;
mapper creates an alias if given a select to map against, since Postgres wants it;
mapper checks if it has pks for a given table before saving/deleting, skips it otherwise;
mapper will not try to order by rowid if table doesnt have a rowid (since select statements dont have rowids...)
|
|
|
|
|
|
|
|
| |
support for types to be propigated into boolean expressions;
new label() function/method to make any column/literal/function/bind param
into a "foo AS bar" clause, better support in ansisql for this concept;
trying to get column list on a select() object to be Column and ColumnClause
objects equally, working on mappers that map to those select() objects
|
| |
|
|
|
|
|
| |
this also allows "deferred" column properties to remain untouched by a save operation
if they werent affected.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
defer/undefer options
mapper/relations are stricter about class attributes and primary mapper - is_primary flag
on relations fixed (wasnt working before). new primary mappers clear off old class attributes,
secondary mappers insure that their property was set up by the primary; otherwise secondary
mappers can add behavior to properties that are unmanaged by the primary mapper
added "group" option to deferred loaders so a group of properties can be loaded at once
mapper adds the "oid" column to the select list if "distinct" is set to true and its
using the default "order by oid" ordering (mysql benefits from ansisql fix to only print out unique
columns in the select list since its oid is the same as the pk column)
fixed unittests to comply with stricter primary mapper rules
|
| |
|
| |
|
| |
|
|
|
|
| |
is 'debug'.
|
| |
|
|
|
|
|
|
| |
added 'no_sort' property to mapper _compile method to disable all ordering
mapper _compile will not use its internal order_by if the given statement has an orderby
lazyloader order_by used standalone when loading via mapper
|
| |
|
| |
|
|
|
|
|
| |
fixed up order_by to support a list/scalar of columns or asc/desc
fixed up query.py unit test
|
|
|
|
| |
removed "scope" parameter from Mapper until we need to revisit that idea
|
|
|
|
|
|
| |
&|~ boolean operators
added 'literal' keyword
working on column clauses being more flexible
|
|
|
|
| |
import scheme
|
| |
|
| |
|