Actions
action #301
closedWrite needle DB query API
Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2013-04-04
Due date:
2013-04-05
% Done:
100%
Estimated time:
10.00 h
Actions
Added by aplanas about 12 years ago. Updated about 12 years ago.
100%
Alberto - can you specify a bit better what you expect from this?
Right now we have needle::tag("inst-bootmenu") which returns an array of needles. What else do you have in mind?
I'm doing some DVD installations to get some needles in the database to actually play with queries
Yeah sorry. There is a task (#310) that need to remove or add a set of needles before a set of test will run. The example was the 'Text mode installation', to avoid match with a graphic needle, we need to recover only the needles that are for the Install stage && Text mode.
You created new tags for that, so the recover of these needles are possible, but we need to expand a bit the needle API: .remove() .add()
Use cases:
waitforneedle("desktop KDE") will now match only needles that have them all.
use case
for my $n (@{needle::tags("installatin)}) {
$n->unregister() unless $n->has_tag("TEXT");
}
use case
needle::tags("desktop KDE")
use case
for my $n (@{needle::tags("TEXT")}) {
$n->unregister();
}