I am looking to get a queryset to problem its query on the different DB connection, utilizing a different cursor class. Does anybody determine if that's possible and when just how it may be done? In psuedo-code:
# setup a new db connection: db = db_connect(cursorclass=AlternateCursor) # setup a generic queryset qset = blah.objects.all() # tell qset to use the new connection: qset.use_db(db) # and then apply some filters qset = qset.filter(...) # and execute the query: for object in qset: ...
You could do from Django 1. on - the secret is by using a custom manager for the model and replace the manager's connection object. Begin to see the code at Eric Florenzano's publish at http://www.eflorenzano.com/blog/post/easy-multi-database-support-django/