Here's the delete method, delete is called to handle delete requests from the client
app, specifically, in our case, from the Hobbit apps helper class.
We print some debug information out, once again, do the match against the path and
the Uri to see whether or not we're doing characters or
a single character depending on what we get back,
we notify that we've gotten some changes that rows were deleted in the table.
Here's the deleteCharacters method implementation.
We add the selectorArgs using an OR and
use that as part of our selection to go ahead and delete
those entries from the database that's to delete all the characters that match.
Here we are deleting a single character, as you can see it's very similar except
this time we're deleting an individual character so we add the key id check
to the where statement to indicate we're deleting that one character.
Here is the add selectionArgs method,
this is a helper method that can concatenates all the selectionArgs for
a given selection using the given operation that we show here.
Do a little sanity checking to handle the case where we're passing null arguments.
And then we go ahead and we add the selectionArgs to the selectionResult.
And we're basically putting the operation In between each of these things which in
all the cases we've shown so far is the or operation.
So we're basically oring together all these selectionArgs.
For example, all the different types of races could be put in here.
And then we create the selectionResult and return that right after we print
out the results to the debugging logcat just to see what's going on.