Eli Mesika has uploaded a new change for review.

Change subject: core: user level queries - filtered entities
......................................................................

core: user level queries - filtered entities

This patch enables to filter data vertically in addition to the
horizontal filtering support.
Up to now, we had filtered some SPs that are accessible by users
horizontally (i.e. returning part of the resulted query rows by additing
a where clause)
Now, we will enable to filter those SPs returned data also vertically
(i.e set NULL as the value of some columns in the returned result set)

This is done by:
1) Adding a table called object_column_mask that holds for each relevant
table/view for which we want to filter vertically, the column names that
should have NULL values in the returned result.
The script adding this table and inserting its initial data is reentrant
and run the in pre-upgrade step.

2) A function fn_db_mask_object that accepts the object to filter and
returns the result with filtered column values.

Currently, we have only 2 user queries that returns the Power Management
details and can be accessed by users. The SPs that are executed by those
queries were modified to add a vertical filter on top of the existing
horizontal one.

(there are also user, password and LUN details in
storage_server_connection table) but AFAIK this is not retrieved by the
user portal.)

This can be easily expanded to other queries by adding the relevant
meta data in the pre_upgrade/add_object_column_mask_table.sql script and
modify the relevant SPs to filter data vertically.

Change insures that admin portal is not affected by this change, so any
query running from admin portal will run natively without any change.
Vertical filtering takes place when the v_is_filtered flag passed to the
SP is true.

Change-Id: If68b290aaacc0eea5d117ef64536cbf94d195cee
Signed-off-by: Eli Mesika <emes...@redhat.com>
---
M backend/manager/dbscripts/common_sp.sql
A backend/manager/dbscripts/upgrade/pre_upgrade/add_object_column_mask_table.sql
M backend/manager/dbscripts/vds_sp.sql
3 files changed, 88 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/4469/1
--
To view, visit http://gerrit.ovirt.org/4469
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If68b290aaacc0eea5d117ef64536cbf94d195cee
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to