Github Action Tests | CodeCov |
---|---|
English | 简体中文
- 1. Introduction
- 2. Get the Driver
- 3. Documentation
- 4. Prerequisites
- 5. Build
- 6. Testing
- 7. Submitting Issues
- 8. Submitting PRs
- 9. References
- 10. License
@tdengine/websocket is an efficient connector specially designed by TDengine for Node.js developers. It uses the WebSocket API provided by the taosAdapter component to establish a connection with TDengine, eliminating the dependence on TDengine client drivers and opening up a convenient development path for developers. With this powerful tool, developers can easily build applications for TDengine clusters. Whether it is performing complex SQL write and query tasks, implementing flexible schemaless write operations, or achieving highly real-time subscription functionality, this connector can easily and perfectly meet diverse data interaction needs in all aspects.
Supports Node.js 14 and above.
Support all platforms that can run Node.js.
Install the Node.js connector using npm.
npm install @tdengine/websocket
- For development examples, see Developer Guide, which includes examples of data writing, querying, schemaless writing, parameter binding, and data subscription.
- For other reference information, see Reference Manual, which includes version history, data types, example programs, API descriptions, and FAQs.
- Install the Node.js development environment, using version 14 or above. Download link: https://nodejs.org/en/download/
- Install the Node.js connector using npm.
- Install TypeScript 5.3.3 and above using npm.
- TDengine has been deployed locally. For specific steps, please refer to Deploy TDengine, and
taosd
andtaosAdapter
have been started.
Execute tsc
to build the project in the 'nodejs' directory.
Execute npm run test
in the project directory to run the tests. The test cases will connect to the local TDengine server and taosAdapter for testing.
After running the tests, the result similar to the following will be printed eventually. If all test cases pass, without any failures or errors.
Test Suites: 8 passed, 8 total
Tests: 1 skipped, 44 passed, 45 total
Snapshots: 0 total
Time: 20.373 s
Ran all test suites.
All tests are located in the nodejs/test/bulkPulling
directory of the project. You can add new test files or add test cases in existing test files.
The test cases use the jest framework. Generally, a connection is established and a database is created in the beforeAll
method, and the database is droped and the connection is released in the afterAll
method.
Performance testing is in progress.
We welcome the submission of GitHub Issue. When submitting, please provide the following information:
- Problem description, is it necessary to present it.
- Nodejs version.
- @tdengine/websocket version.
- Connection parameters (no username or password required).
- TDengine Server Version.
We welcome developers to contribute to this project. When submitting PRs, please follow these steps:
- Fork this project, refer to (how to fork a repo).
- Create a new branch from the main branch with a meaningful branch name (
git checkout -b my_branch
). Do not modify the main branch directly. - Modify the code, ensure all unit tests pass, and add new unit tests to verify the changes.
- Push the changes to the remote branch (
git push origin my_branch
). - Create a Pull Request on GitHub (how to create a pull request).
- After submitting the PR, if CI passes, you can find your PR on the codecov page to check the test coverage.