Modernize a db API call