summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-12-11 03:05:03 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2010-12-11 03:05:03 -0500
commit9c0755640c5f1d45596ff7234d2d42f1c92d09e0 (patch)
treed742ffa4269a28d9dc7e9017876af502a13a02fd /lib/sqlalchemy/ext
parent66e5de30f2e01593182058091075780b41411a78 (diff)
downloadsqlalchemy-9c0755640c5f1d45596ff7234d2d42f1c92d09e0.tar.gz
- clean up the batch insert thing
- add a test for batch inserts - don't need elaborate _inserted_primary_key thing - take some cruft out of ExecutionContext, ResultProxy, EC members can be non-underscored, have mapper just call the EC members for now. - simplify "connection_callable", no need for a "flush_opts" dictionary since this point of expansion is not needed
Diffstat (limited to 'lib/sqlalchemy/ext')
-rw-r--r--lib/sqlalchemy/ext/horizontal_shard.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/horizontal_shard.py b/lib/sqlalchemy/ext/horizontal_shard.py
index 78e3f5953..e48cb9fcb 100644
--- a/lib/sqlalchemy/ext/horizontal_shard.py
+++ b/lib/sqlalchemy/ext/horizontal_shard.py
@@ -50,12 +50,12 @@ class ShardedSession(Session):
self.id_chooser = id_chooser
self.query_chooser = query_chooser
self.__binds = {}
- self._mapper_flush_opts = {'connection_callable':self.connection}
+ self.connection_callable = self.connection
self._query_cls = ShardedQuery
if shards is not None:
for k in shards:
self.bind_shard(k, shards[k])
-
+
def connection(self, mapper=None, instance=None, shard_id=None, **kwargs):
if shard_id is None:
shard_id = self.shard_chooser(mapper, instance)