Updated to reflect upstream database API changes.