Selecting the `doc_id_rev` here was problematic when the docid contained `'\u0000'`, since the db would only return the string up to the null terminator, so after splitting on `'::'` you would just get an empty string.  The solution is just to grab the rev from the json data, since we're parsing it anyway.