| Summary: | saved results in OQL | ||
|---|---|---|---|
| Product: | [Tools] MAT | Reporter: | Iulian Dragos <jaguarul> |
| Component: | Core | Assignee: | Andrew Johnson <andrew_johnson> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | jaguarul |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Iulian Dragos
Another way might be to allow an OQL query to be run on a selection of objects from another query.
These could be identified using a special variable. E.g.
select * from objects ${selection} t where t.field = 2
Previous OQL queries can be retrieved using the navigator view. The title is only the first line so might just read '/* Press F1 for Help */', so it would be clearer if the navigator view showed the whole query. Another small step is to ensure table results from an OQL query supplies OQL from IContextObjectSet.getOQL This OQL should just be the select statement and a FROM OBJECTS giving the object. Some complex queries such as
SELECT OBJECTS r from OBJECTS ${snapshot}.@GCRoots r WHERE (SELECT s FROM OBJECTS ${snapshot}.getGCRootInfo(r) s WHERE s.@type = 128) != null
weren't working.
This is for GCroots query and is selecting GC roots of a particular type. It wasn't working as the second select wasn't detected
as being context dependent (with the r in the method call), so was only being executed once.
I'll add a fix.
The reuse of queries is handled by the Navigator View - comment 2 makes it easier to use. The save and refine can now be done by copying OQL from the result of a previous query. This works, provided there are not too many objects. If the copy is too big (>60000 characters) then it will fail with: "OQL statement is too big to use". The copy OQL from an OQL also copies the column definitions. I have updated the documentation. This should solve most of the requirements. The 'operate on a previous result' idea doesn't work too well as the result is not reproducible, so gets lost as soon as the new OQL statement is executed. The binding form also has problems with reproducibility such as from the navigator view and requires more grammar changes. I hope this solves your requirements. Please let us know how it works for you. |