Skip to content

feat: streaming raw data#679

Open
sezanzeb wants to merge 5 commits intonode-influx:masterfrom
sezanzeb:master
Open

feat: streaming raw data#679
sezanzeb wants to merge 5 commits intonode-influx:masterfrom
sezanzeb:master

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 draft May 4, 2023 09:30
@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