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: streaming raw data #679

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

sezanzeb
Copy link

@sezanzeb sezanzeb commented May 3, 2023

Fixes #678

Proposed Changes

  • Adds a stream method that just forwards the callback to the pools stream method
  • Since .vscode existed, I thought I'd just commit the .idea setup as well. It contains run configurations for unit and integration tests for webstorm
  • renovate.json was not prettier compliant
  • renamed expectQuery to expectJsonCall because it was only ever used to test the json function
  • stream method has an optional csv option to tell the influxdb to answer with csv data. This is especially useful for streaming use-cases, because with json the complete answer has to be received by the client before it can be parsed. Partially received csv on the other hand can already be parsed.

Checklist

  • A test has been added if appropriate
  • npm test completes successfully
  • Commit messages are in semantic format

those have been failing already before my change:

  1) pool
       attempts to make an https request:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/tobias/Code/node-influx/test/unit/pool.test.ts)
      at listOnTimeout (node:internal/timers:568:17)
      at processTimers (node:internal/timers:511:7)

  2) pool
       passes through request options:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/tobias/Code/node-influx/test/unit/pool.test.ts)
      at listOnTimeout (node:internal/timers:568:17)
      at processTimers (node:internal/timers:511:7)

@sezanzeb sezanzeb marked this pull request as ready for review May 23, 2023 06:25
@sezanzeb
Copy link
Author

sezanzeb commented May 23, 2023

@bencevans this would be ready for review, it works for our use case :)

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.

Stream raw results
1 participant