Fix bug caused by receiving single item, not array

When the DBService function processQuery() returns the resulting rows to
the caller, it either returns an array of rows or a single row (not
wrapped in an array). This requires whatever code is calling
processQuery() to always check whether it is receiving an array or not.
We should consider changing the DB layer to remove that requirement.