IResultSet is missing several methods that exist on ResultSet

Bug #659883 reported by Gavin Panella on 2010-10-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gavin Panella

Bug Description

The following names appear to be missing:


Related branches

James Henstridge (jamesh) wrote :

This bug is essentially a superset of bug 431203, which I marked incomplete and haven't seen any further activity on.

The rationale behind the exposed attributes is:
 1. your model code constructs a ResultSet and returns a security proxied object to the view code.
 2. the view code treats the ResultSet as an immutable sequence/iterable and presents the data to the user.

Both set() and remove() can be used to modify the contained objects, which will bypass the security proxies on those objects.

get_select_expr() will return a Select object, which has no security declarations (and it isn't clear that any would be desirable).

find(), group_by() and having() are really used to configure result sets, so are mostly intended for use on the model side.

I could see an argument for exposing difference(), intersection() and union() as a way for view code to combine multiple results, but it isn't clear how often it makes sense to do this on the view side rather than model side.

If my analysis is wrong, please explain what it is you want to do and how the current security declarations are preventing you from doing so. Simply stating that some methods are not exposed doesn't really give enough information to respond to the bug report.

Changed in storm:
status: New → Incomplete
Gavin Panella (allenap) wrote :

James, thank you for the detailed explanation. It makes a lot of
sense. I didn't consider that the interface's primary purpose is for
configuring a security proxy.

This bug report was inspired by wanting to use union() but hitting
security proxies, so perhaps that lends weight to adding the
difference/intersection/union methods to the interface, or adding
another interface (IResultSetSetOperations, heh) for those that want
to configure those operations separately.

If nothing else I think it's worth adding a comment (or the whole
rationale) to IResultSet. I'll prepare a short branch to do that.

Jamu Kakar (jkakar) on 2010-10-20
Changed in storm:
assignee: nobody → Gavin Panella (allenap)
importance: Undecided → Low
milestone: none → 0.18
status: Incomplete → Fix Committed
Gary Poster (gary) on 2010-10-26
Changed in storm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers