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

Expose X-ClickHouse-Summary header info #214

Merged
merged 4 commits into from
Dec 13, 2023
Merged

Conversation

slvrtrn
Copy link
Contributor

@slvrtrn slvrtrn commented Dec 6, 2023

Summary

  • Adds summary field to insert/exec/command result, which is parsed from the X-ClickHouse-Summary response header.
  • Geo data type test is temporarily marked as ignored as it is still unclear why it fails with a cluster setup on the latest master.

Node.js only. The web version seems to have some CORS limitations.

Question: shall we expose summary for query, too? It is very unlikely to be correct with streaming scenarios, and for non-streaming ones, we know the number of rows anyway.

Resolves #210

Checklist

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG

@slvrtrn slvrtrn requested a review from mshustov December 6, 2023 00:36
@slvrtrn slvrtrn marked this pull request as ready for review December 6, 2023 13:50

### New features

- (Node.js only) `X-ClickHouse-Summary` response header is now parsed when working with `insert`/`exec`/`command` methods.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, something to discuss for sure. In tests, for non-streaming operations, it works regardless.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the Changelog, it should work for non-streaming operations

@slvrtrn slvrtrn merged commit 152b89a into main Dec 13, 2023
23 checks passed
@slvrtrn slvrtrn deleted the summary-header-parsing branch December 13, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There is no way to get number of inserted rows
2 participants