]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove unnecessary 'IN vs ==' sql query branches
authorKevin Benton <blak111@gmail.com>
Sat, 21 Mar 2015 16:10:25 +0000 (09:10 -0700)
committerKevin Benton <blak111@gmail.com>
Sat, 21 Mar 2015 16:39:06 +0000 (09:39 -0700)
commit0e8f7e1712b2bd92725622568b99901e0bcda59a
treef9dc360d6a8036bda5721a9cf0b696762f113b84
parenta840a207293bb728109e394ac451030aedc0c728
Remove unnecessary 'IN vs ==' sql query branches

Removes some branches in the codebase that switch
queries depending on whether a WHERE match is against
a single criteria or multiple criteria. For multiple
options an 'IN' statement was used and for a single
option an '==' was used.

This is completely unnecessary complexity and brancing
in our codebase because the 'col IN items' statement is
just a nice syntax offered by SQL that gets converted into
'col==item1 OR col==item2 OR col==item3...' statements
under the hood. So in the case of one item, 'WHERE col IN "F"'
is the same as 'WHERE col = "F"'.

Change-Id: I8bee8c49d72958f5ae424f87c9dc98b8abe6f579
neutron/db/l3_agentschedulers_db.py
neutron/db/portbindings_db.py