nodejs-bigquery icon indicating copy to clipboard operation
nodejs-bigquery copied to clipboard

autogen delete call handling

Open leahecole opened this issue 7 months ago • 1 comments

fixes b/396701485

This PR adds logic to the centralized client generator that does the following

  • refactors some previously existing code into helper functions optionsOrCallbackHelper
  • adds a new helper function returnStatementHelper that encompasses some existing logic and adds additional logic to handle delete calls
  • adds logic to intercept errors from gax due to BQ's improperly formatted delete calls - this is partially done in returnStatementHelper (the callback case) and partially done by creating a new async function for each delete call - this async function means we can use async/await syntax and don't run into the awful type errors we would run into if we added async to the top level delete* functions (related to the optional callback and varying return types)

leahecole avatar Apr 09 '25 17:04 leahecole