nodejs-bigquery
nodejs-bigquery copied to clipboard
autogen delete call handling
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
returnStatementHelperthat 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 leveldelete*functions (related to the optional callback and varying return types)