A wrapper for indexed db