Merged all of the functions in db.general into one.