Allow a custom query class in ShardedSession so it can be defined by sessionmaker

Issue #2090 resolved
Former user created an issue

Make the query class customizable on ShardedSession to allow something like this:

class ShardedCachingQuery(CachingQuery, ShardedQuery):
    pass

Session = scoped_session(
                sessionmaker(
                    class_=ShardedSession,
                    query_cls=caching_query.query_callable(cache_manager,ShardedCachingQuery)

Comments (3)

  1. Log in to comment