Convert sqlalchemy connector to use the new tree style query objects.
Convert django connector to use new tree style query objects.