Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for microseconds precision #1192

Merged

Conversation

alvarowolfx
Copy link
Contributor

@alvarowolfx alvarowolfx commented Mar 10, 2023

Parses timestamps from the backend ( that arrives as a float64 ) using the @google-cloud/precise-date lib to support microsecond resolution.

Example output:

const bigquery = new BigQuery();
const [rows] = await bigquery.query({
  query: 'SELECT TIMESTAMP("2014-09-27 12:30:00.123456Z")',
});
console.log(JSON.stringify(rows));
// [{"f0_":{"value":"2014-09-27T12:30:00.123456000Z"}}]

Fixes #6

BEGIN_COMMIT_OVERRIDE
feat: add support for microseconds precision (#1192)
END_COMMIT_OVERRIDE

@alvarowolfx alvarowolfx requested a review from a team as a code owner March 10, 2023 22:31
@alvarowolfx alvarowolfx requested review from a team and Neenu1995 March 10, 2023 22:31
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/nodejs-bigquery API. labels Mar 10, 2023
@alvarowolfx alvarowolfx requested review from steffnay and shollyman and removed request for Neenu1995 March 10, 2023 22:39
@alvarowolfx alvarowolfx assigned alvarowolfx and unassigned loferris Mar 13, 2023
@alvarowolfx alvarowolfx added the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 15, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 15, 2023
src/bigquery.ts Show resolved Hide resolved
@alvarowolfx alvarowolfx requested a review from a team as a code owner March 17, 2023 17:13
@alvarowolfx alvarowolfx added automerge Merge the pull request once unit tests and other checks pass. owlbot:run Add this label to trigger the Owlbot post processor. labels Mar 17, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 17, 2023
@gcf-merge-on-green gcf-merge-on-green bot merged commit b5801a6 into googleapis:main Mar 17, 2023
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/nodejs-bigquery API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

losing precision in converting TIMESTAMP and INT64 to Javascript Number
4 participants