Refactor database._selectOneRow