]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add a non-mixin function for model queries
authorSalvatore Orlando <salv.orlando@gmail.com>
Tue, 19 May 2015 16:27:14 +0000 (09:27 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Mon, 1 Jun 2015 18:22:29 +0000 (11:22 -0700)
commit70e07629bf263370102350d922d62970c60d5aa4
treef4038ce1543eef1ceda885db14b8236ef56ce799
parent5eddb2d274d69b7fd4b6242f37a6e815bb3f64ee
Add a non-mixin function for model queries

This patch simply adds a version of model_query in
neutron.db.common_db_mixin which can be invoked without
having to declare a class which inherits the mixin.

To this aim, model_query_scope has been refactored as well.
As the model query function being introduced in this patch
cannot use model query hooks (and does not need to), the
method was re-implemented rather than bringing out of the
mixin as it has been done for model_query_scope.

This change will allow for developing DB APIs without
having to use the baseDB/mixin classes models used so far.

Related-Blueprint: better-quotas

Change-Id: I7a79980f626e9eaf2775711c8a25f508067e5716
neutron/db/common_db_mixin.py