rename: change package name to @iotdb/client (#6)
The old name `iotdb-client-nodejs` was already taken on npm.
Use scoped package `@iotdb/client` under the @iotdb org instead.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index da01aa1..3fa7c4f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -51,4 +51,4 @@
- Example code for common use cases
- Apache License 2.0
-[0.1.0]: https://github.com/CritasWang/iotdb-client-nodejs/releases/tag/v0.1.0
+[0.1.0]: https://github.com/CritasWang/@iotdb/client/releases/tag/v0.1.0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 27dcca2..dfe9ecf 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -15,8 +15,8 @@
1. Clone the repository:
```bash
-git clone https://github.com/CritasWang/iotdb-client-nodejs.git
-cd iotdb-client-nodejs
+git clone https://github.com/CritasWang/@iotdb/client.git
+cd @iotdb/client
```
2. Install dependencies:
diff --git a/README.md b/README.md
index 8f6a36d..bf3621b 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
# Apache IoTDB Node.js Client
[](https://www.apache.org/licenses/LICENSE-2.0.html)
-[](https://www.npmjs.com/package/iotdb-client-nodejs)
-[](https://nodejs.org/)
+[](https://www.npmjs.com/package/@iotdb/client)
+[](https://nodejs.org/)
A Node.js client for Apache IoTDB with support for SessionPool and TableSessionPool, providing efficient connection management and comprehensive query capabilities.
@@ -45,7 +45,7 @@
## Installation
```bash
-npm install iotdb-client-nodejs
+npm install @iotdb/client
```
## Requirements
@@ -58,7 +58,7 @@
### Basic Session Usage
```typescript
-import { Session } from 'iotdb-client-nodejs';
+import { Session } from '@iotdb/client';
const session = new Session({
host: 'localhost',
@@ -110,7 +110,7 @@
The Builder pattern provides a more elegant and fluent API for configuration:
```typescript
-import { Session, ConfigBuilder } from 'iotdb-client-nodejs';
+import { Session, ConfigBuilder } from '@iotdb/client';
// Build a session configuration
const session = new Session(
@@ -134,7 +134,7 @@
The `executeQueryStatement()` method returns a SessionDataSet for efficient iteration through query results:
```typescript
-import { Session, SessionDataSet, RowRecord } from 'iotdb-client-nodejs';
+import { Session, SessionDataSet, RowRecord } from '@iotdb/client';
const session = new Session({
host: 'localhost',
@@ -182,7 +182,7 @@
### SessionPool Usage
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
const pool = new SessionPool('localhost', 6667, {
username: 'root',
@@ -263,7 +263,7 @@
For more control, you can explicitly get and release sessions from the pool:
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
const pool = new SessionPool('localhost', 6667, {
username: 'root',
@@ -304,7 +304,7 @@
Insert multiple tablets in a single RPC call (most efficient for tree model):
```typescript
-import { Session, TreeTablet, TSDataType } from 'iotdb-client-nodejs';
+import { Session, TreeTablet, TSDataType } from '@iotdb/client';
const session = new Session({ host: 'localhost', port: 6667 });
await session.open();
@@ -332,7 +332,7 @@
Use pool-level concurrent insertion for maximum throughput:
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
const pool = new SessionPool({
host: 'localhost',
@@ -357,7 +357,7 @@
Execute any operations in parallel using the pool:
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
const pool = new SessionPool({ host: 'localhost', port: 6667, maxPoolSize: 10 });
await pool.init();
@@ -386,7 +386,7 @@
Standalone utilities for concurrent execution:
```typescript
-import { executeConcurrent, chunkArray, createSemaphore } from 'iotdb-client-nodejs';
+import { executeConcurrent, chunkArray, createSemaphore } from '@iotdb/client';
// Execute any async operations with controlled concurrency
const result = await executeConcurrent(
@@ -416,7 +416,7 @@
When nodes have different host:port combinations, use the `nodeUrls` configuration with string array format:
```typescript
-import { SessionPool, PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { SessionPool, PoolConfigBuilder } from '@iotdb/client';
// Using config object with string array (RECOMMENDED)
const pool1 = new SessionPool({
@@ -472,7 +472,7 @@
When all nodes share the same port:
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
const pool = new SessionPool(
['node1.example.com', 'node2.example.com', 'node3.example.com'],
@@ -491,7 +491,7 @@
### SSL/TLS Support
```typescript
-import { Session } from 'iotdb-client-nodejs';
+import { Session } from '@iotdb/client';
import * as fs from 'fs';
const session = new Session({
@@ -514,7 +514,7 @@
### TableSessionPool Usage
```typescript
-import { TableSessionPool } from 'iotdb-client-nodejs';
+import { TableSessionPool } from '@iotdb/client';
const tablePool = new TableSessionPool('localhost', 6667, {
username: 'root',
@@ -551,7 +551,7 @@
**Configuration:**
```typescript
-import { SessionPool, TableSessionPool } from 'iotdb-client-nodejs';
+import { SessionPool, TableSessionPool } from '@iotdb/client';
// Tree model pool with redirection
const treePool = new SessionPool({
@@ -626,7 +626,7 @@
Fluent API for building Session configurations:
```typescript
-import { ConfigBuilder } from 'iotdb-client-nodejs';
+import { ConfigBuilder } from '@iotdb/client';
const config = new ConfigBuilder()
.host('localhost')
@@ -658,7 +658,7 @@
Fluent API for building SessionPool configurations (extends ConfigBuilder):
```typescript
-import { PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { PoolConfigBuilder } from '@iotdb/client';
const config = new PoolConfigBuilder()
.host('localhost')
@@ -817,7 +817,7 @@
**Class (with helper methods):**
```typescript
-import { TreeTablet, TSDataType } from 'iotdb-client-nodejs';
+import { TreeTablet, TSDataType } from '@iotdb/client';
// Create a tablet
const tablet = new TreeTablet(
@@ -869,7 +869,7 @@
**Class (with helper methods):**
```typescript
-import { TableTablet, ColumnCategory, TSDataType } from 'iotdb-client-nodejs';
+import { TableTablet, ColumnCategory, TSDataType } from '@iotdb/client';
// Create a tablet
const tablet = new TableTablet(
@@ -994,7 +994,7 @@
**New way** (more fluent):
```typescript
-import { ConfigBuilder } from 'iotdb-client-nodejs';
+import { ConfigBuilder } from '@iotdb/client';
const session = new Session(
new ConfigBuilder()
@@ -1221,8 +1221,8 @@
1. Clone the repository:
```bash
-git clone https://github.com/CritasWang/iotdb-client-nodejs.git
-cd iotdb-client-nodejs
+git clone https://github.com/CritasWang/@iotdb/client.git
+cd @iotdb/client
```
2. Install dependencies:
@@ -1750,7 +1750,7 @@
npm publish --tag beta
# Install beta version
-npm install iotdb-client-nodejs@beta
+npm install @iotdb/client@beta
```
### Hotfix Process
diff --git a/README_zh.md b/README_zh.md
index 1b2cd64..be04a96 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -1,8 +1,8 @@
# Apache IoTDB Node.js 客户端
[](https://www.apache.org/licenses/LICENSE-2.0.html)
-[](https://www.npmjs.com/package/iotdb-client-nodejs)
-[](https://nodejs.org/)
+[](https://www.npmjs.com/package/@iotdb/client)
+[](https://nodejs.org/)
用于 Apache IoTDB 的 Node.js 客户端,支持 SessionPool 和 TableSessionPool,提供高效的连接管理和全面的查询功能。
@@ -43,7 +43,7 @@
## 安装
```bash
-npm install iotdb-client-nodejs
+npm install @iotdb/client
```
## 环境要求
@@ -56,7 +56,7 @@
### 基本会话使用
```typescript
-import { Session } from 'iotdb-client-nodejs';
+import { Session } from '@iotdb/client';
const session = new Session({
host: 'localhost',
@@ -103,7 +103,7 @@
构建器模式提供更优雅和流畅的配置 API:
```typescript
-import { Session, ConfigBuilder } from 'iotdb-client-nodejs';
+import { Session, ConfigBuilder } from '@iotdb/client';
// 构建会话配置
const session = new Session(
@@ -125,7 +125,7 @@
### SessionPool 使用
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
const pool = new SessionPool('localhost', 6667, {
username: 'root',
@@ -169,7 +169,7 @@
当节点具有不同的 host:port 组合时,使用字符串数组格式的 `nodeUrls` 配置:
```typescript
-import { SessionPool, PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { SessionPool, PoolConfigBuilder } from '@iotdb/client';
// 使用字符串数组的配置对象(推荐)
const pool1 = new SessionPool({
@@ -206,7 +206,7 @@
### SSL/TLS 支持
```typescript
-import { Session } from 'iotdb-client-nodejs';
+import { Session } from '@iotdb/client';
import * as fs from 'fs';
const session = new Session({
@@ -229,7 +229,7 @@
### TableSessionPool 使用
```typescript
-import { TableSessionPool } from 'iotdb-client-nodejs';
+import { TableSessionPool } from '@iotdb/client';
const tablePool = new TableSessionPool('localhost', 6667, {
username: 'root',
@@ -396,7 +396,7 @@
**配置:**
```typescript
-import { SessionPool, TableSessionPool } from 'iotdb-client-nodejs';
+import { SessionPool, TableSessionPool } from '@iotdb/client';
// 带重定向的树模型连接池
const treePool = new SessionPool({
@@ -471,7 +471,7 @@
用于构建 Session 配置的流式 API:
```typescript
-import { ConfigBuilder } from 'iotdb-client-nodejs';
+import { ConfigBuilder } from '@iotdb/client';
const config = new ConfigBuilder()
.host('localhost')
@@ -503,7 +503,7 @@
用于构建 SessionPool 配置的流式 API(扩展 ConfigBuilder):
```typescript
-import { PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { PoolConfigBuilder } from '@iotdb/client';
const config = new PoolConfigBuilder()
.host('localhost')
@@ -623,8 +623,8 @@
1. 克隆仓库:
```bash
-git clone https://github.com/CritasWang/iotdb-client-nodejs.git
-cd iotdb-client-nodejs
+git clone https://github.com/CritasWang/@iotdb/client.git
+cd @iotdb/client
```
2. 安装依赖:
@@ -1140,7 +1140,7 @@
npm publish --tag beta
# 安装 beta 版本
-npm install iotdb-client-nodejs@beta
+npm install @iotdb/client@beta
```
### 热修复流程
diff --git a/docs/COLUMNCATEGORY_USAGE.md b/docs/COLUMNCATEGORY_USAGE.md
index f1904c1..c58b509 100644
--- a/docs/COLUMNCATEGORY_USAGE.md
+++ b/docs/COLUMNCATEGORY_USAGE.md
@@ -34,7 +34,7 @@
## Correct Usage Example
```typescript
-import { TableSessionPool, ColumnCategory, TSDataType } from 'iotdb-client-nodejs';
+import { TableSessionPool, ColumnCategory, TSDataType } from '@iotdb/client';
await pool.insertTablet({
tableName: 'sensor_data',
diff --git a/docs/data-types.md b/docs/data-types.md
index 60c08b6..55d08f3 100644
--- a/docs/data-types.md
+++ b/docs/data-types.md
@@ -35,7 +35,7 @@
### Creating Timeseries
```typescript
-import { Session } from 'iotdb-client-nodejs';
+import { Session } from '@iotdb/client';
const session = new Session({
host: 'localhost',
diff --git a/docs/performance-guide.md b/docs/performance-guide.md
index 476ec51..bf00198 100644
--- a/docs/performance-guide.md
+++ b/docs/performance-guide.md
@@ -56,7 +56,7 @@
**Solution**: Implemented `BufferPool` with size-based pooling strategy:
```typescript
-import { globalBufferPool } from 'iotdb-client-nodejs';
+import { globalBufferPool } from '@iotdb/client';
// Buffer pool automatically manages buffers in 7 size classes:
// 1KB, 4KB, 16KB, 64KB, 256KB, 1MB, 4MB
@@ -178,7 +178,7 @@
### Enabling/Disabling Fast Serialization
```typescript
-import { Session } from 'iotdb-client-nodejs';
+import { Session } from '@iotdb/client';
// Enable (default)
const session = new Session({
@@ -285,7 +285,7 @@
### 4. Monitor Buffer Pool Usage
```typescript
-import { globalBufferPool } from 'iotdb-client-nodejs';
+import { globalBufferPool } from '@iotdb/client';
// After warmup period
setInterval(() => {
@@ -319,7 +319,7 @@
```typescript
// Clear buffer pool periodically in long-running processes
-import { globalBufferPool } from 'iotdb-client-nodejs';
+import { globalBufferPool } from '@iotdb/client';
// Clear pool every hour to prevent potential memory bloat
setInterval(() => {
diff --git a/docs/redirection-design.md b/docs/redirection-design.md
index f61f0c9..f309a78 100644
--- a/docs/redirection-design.md
+++ b/docs/redirection-design.md
@@ -443,8 +443,8 @@
## Usage Example
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
-import { TSDataType } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
+import { TSDataType } from '@iotdb/client';
// Create pool with redirection enabled
const pool = new SessionPool({
diff --git a/docs/sessiondataset-guide.md b/docs/sessiondataset-guide.md
index abe8012..ce1e826 100644
--- a/docs/sessiondataset-guide.md
+++ b/docs/sessiondataset-guide.md
@@ -16,7 +16,7 @@
### Simple Iteration
```typescript
-import { Session } from 'iotdb-client-nodejs';
+import { Session } from '@iotdb/client';
const session = new Session({
host: 'localhost',
diff --git a/docs/user-guide-table-zh.md b/docs/user-guide-table-zh.md
index 6e475f7..575ce8b 100644
--- a/docs/user-guide-table-zh.md
+++ b/docs/user-guide-table-zh.md
@@ -54,7 +54,7 @@
### 2.1 从 npm 安装
```bash
-npm install iotdb-client-nodejs
+npm install @iotdb/client
```
**系统要求:**
@@ -65,12 +65,12 @@
**TypeScript:**
```typescript
-import { TableSessionPool, PoolConfigBuilder, TableTablet, ColumnCategory, TSDataType } from 'iotdb-client-nodejs';
+import { TableSessionPool, PoolConfigBuilder, TableTablet, ColumnCategory, TSDataType } from '@iotdb/client';
```
**JavaScript:**
```javascript
-const { TableSessionPool, PoolConfigBuilder, TableTablet, ColumnCategory, TSDataType } = require('iotdb-client-nodejs');
+const { TableSessionPool, PoolConfigBuilder, TableTablet, ColumnCategory, TSDataType } = require('@iotdb/client');
```
## 3. 快速入门
@@ -78,7 +78,7 @@
### 3.1 基础 TableSessionPool 示例
```typescript
-import { TableSessionPool, TableTablet, ColumnCategory } from 'iotdb-client-nodejs';
+import { TableSessionPool, TableTablet, ColumnCategory } from '@iotdb/client';
async function quickStart() {
// 创建并初始化表 session 连接池
@@ -224,7 +224,7 @@
#### 方式 3: 使用构建器模式(推荐)
```typescript
-import { PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { PoolConfigBuilder } from '@iotdb/client';
const pool = new TableSessionPool(
new PoolConfigBuilder()
@@ -378,7 +378,7 @@
**TableTablet 类 (带辅助方法 - 推荐):**
```typescript
-import { TableTablet, ColumnCategory, TSDataType } from 'iotdb-client-nodejs';
+import { TableTablet, ColumnCategory, TSDataType } from '@iotdb/client';
// 创建 tablet
const tablet = new TableTablet(
@@ -399,7 +399,7 @@
**替代方案: 普通对象方法 (仍支持):**
```typescript
-import { ColumnCategory, TSDataType } from 'iotdb-client-nodejs';
+import { ColumnCategory, TSDataType } from '@iotdb/client';
await pool.insertTablet({
tableName: 'sensor_data',
@@ -548,7 +548,7 @@
### 7.1 完整的数据库和表设置
```typescript
-import { TableSessionPool, PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { TableSessionPool, PoolConfigBuilder } from '@iotdb/client';
async function setupDatabase() {
const pool = new TableSessionPool(
@@ -1022,7 +1022,7 @@
### 9.4 获取帮助
- **文档**: [IoTDB Table Model Docs](https://iotdb.apache.org/)
-- **GitHub Issues**: [报告问题](https://github.com/CritasWang/iotdb-client-nodejs/issues)
+- **GitHub Issues**: [报告问题](https://github.com/CritasWang/@iotdb/client/issues)
- **社区**: dev@iotdb.apache.org
## 附录 A: 完整 API 参考
diff --git a/docs/user-guide-table.md b/docs/user-guide-table.md
index d056bf5..107e8a6 100644
--- a/docs/user-guide-table.md
+++ b/docs/user-guide-table.md
@@ -54,7 +54,7 @@
### 2.1 Install from npm
```bash
-npm install iotdb-client-nodejs
+npm install @iotdb/client
```
**Requirements:**
@@ -65,12 +65,12 @@
**TypeScript:**
```typescript
-import { TableSessionPool, PoolConfigBuilder, TableTablet, ColumnCategory, TSDataType } from 'iotdb-client-nodejs';
+import { TableSessionPool, PoolConfigBuilder, TableTablet, ColumnCategory, TSDataType } from '@iotdb/client';
```
**JavaScript:**
```javascript
-const { TableSessionPool, PoolConfigBuilder, TableTablet, ColumnCategory, TSDataType } = require('iotdb-client-nodejs');
+const { TableSessionPool, PoolConfigBuilder, TableTablet, ColumnCategory, TSDataType } = require('@iotdb/client');
```
## 3. Quick Start
@@ -78,7 +78,7 @@
### 3.1 Basic TableSessionPool Example
```typescript
-import { TableSessionPool, TableTablet, ColumnCategory } from 'iotdb-client-nodejs';
+import { TableSessionPool, TableTablet, ColumnCategory } from '@iotdb/client';
async function quickStart() {
// Create and initialize table session pool
@@ -224,7 +224,7 @@
#### Option 3: Using Builder Pattern (Recommended)
```typescript
-import { PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { PoolConfigBuilder } from '@iotdb/client';
const pool = new TableSessionPool(
new PoolConfigBuilder()
@@ -378,7 +378,7 @@
**TableTablet Class (with helper methods - recommended):**
```typescript
-import { TableTablet, ColumnCategory, TSDataType } from 'iotdb-client-nodejs';
+import { TableTablet, ColumnCategory, TSDataType } from '@iotdb/client';
// Create a tablet
const tablet = new TableTablet(
@@ -399,7 +399,7 @@
**Alternative: Plain object approach (still supported):**
```typescript
-import { ColumnCategory, TSDataType } from 'iotdb-client-nodejs';
+import { ColumnCategory, TSDataType } from '@iotdb/client';
await pool.insertTablet({
tableName: 'sensor_data',
@@ -548,7 +548,7 @@
### 7.1 Complete Database and Table Setup
```typescript
-import { TableSessionPool, PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { TableSessionPool, PoolConfigBuilder } from '@iotdb/client';
async function setupDatabase() {
const pool = new TableSessionPool(
@@ -1022,7 +1022,7 @@
### 9.4 Getting Help
- **Documentation**: [IoTDB Table Model Docs](https://iotdb.apache.org/)
-- **GitHub Issues**: [Report bugs](https://github.com/CritasWang/iotdb-client-nodejs/issues)
+- **GitHub Issues**: [Report bugs](https://github.com/CritasWang/@iotdb/client/issues)
- **Community**: dev@iotdb.apache.org
## Appendix A: Complete API Reference
diff --git a/docs/user-guide-tree-zh.md b/docs/user-guide-tree-zh.md
index af08763..3b67d93 100644
--- a/docs/user-guide-tree-zh.md
+++ b/docs/user-guide-tree-zh.md
@@ -43,7 +43,7 @@
### 2.1 从 npm 安装
```bash
-npm install iotdb-client-nodejs
+npm install @iotdb/client
```
**系统要求:**
@@ -54,12 +54,12 @@
**TypeScript:**
```typescript
-import { SessionPool, PoolConfigBuilder, TreeTablet, TSDataType } from 'iotdb-client-nodejs';
+import { SessionPool, PoolConfigBuilder, TreeTablet, TSDataType } from '@iotdb/client';
```
**JavaScript:**
```javascript
-const { SessionPool, PoolConfigBuilder, TreeTablet, TSDataType } = require('iotdb-client-nodejs');
+const { SessionPool, PoolConfigBuilder, TreeTablet, TSDataType } = require('@iotdb/client');
```
## 3. 快速入门
@@ -67,7 +67,7 @@
### 3.1 SessionPool 示例
```typescript
-import { SessionPool, TreeTablet } from 'iotdb-client-nodejs';
+import { SessionPool, TreeTablet } from '@iotdb/client';
async function quickStart() {
// 创建并初始化连接池
@@ -164,7 +164,7 @@
#### 方式 3: 使用构建器模式(推荐)
```typescript
-import { PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { PoolConfigBuilder } from '@iotdb/client';
const pool = new SessionPool(
new PoolConfigBuilder()
@@ -392,7 +392,7 @@
### 7.1 完整的 CRUD 示例
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
async function crudExample() {
const pool = new SessionPool('localhost', 6667, {
@@ -446,7 +446,7 @@
### 7.2 多节点 SessionPool 示例
```typescript
-import { SessionPool, PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { SessionPool, PoolConfigBuilder } from '@iotdb/client';
async function multiNodeExample() {
const pool = new SessionPool(
@@ -674,7 +674,7 @@
process.env.LOG_LEVEL = 'debug';
// 或直接使用 logger
-import { logger } from 'iotdb-client-nodejs';
+import { logger } from '@iotdb/client';
logger.setLevel('debug');
```
@@ -703,7 +703,7 @@
### 9.4 获取帮助
- **文档**: [IoTDB Docs](https://iotdb.apache.org/)
-- **GitHub Issues**: [报告问题](https://github.com/CritasWang/iotdb-client-nodejs/issues)
+- **GitHub Issues**: [报告问题](https://github.com/CritasWang/@iotdb/client/issues)
- **邮件列表**: dev@iotdb.apache.org
## 附录 A: 完整类型参考
diff --git a/docs/user-guide-tree.md b/docs/user-guide-tree.md
index 8d87a85..10173a0 100644
--- a/docs/user-guide-tree.md
+++ b/docs/user-guide-tree.md
@@ -43,7 +43,7 @@
### 2.1 Install from npm
```bash
-npm install iotdb-client-nodejs
+npm install @iotdb/client
```
**Requirements:**
@@ -54,12 +54,12 @@
**TypeScript:**
```typescript
-import { SessionPool, PoolConfigBuilder, TreeTablet, TSDataType } from 'iotdb-client-nodejs';
+import { SessionPool, PoolConfigBuilder, TreeTablet, TSDataType } from '@iotdb/client';
```
**JavaScript:**
```javascript
-const { SessionPool, PoolConfigBuilder, TreeTablet, TSDataType } = require('iotdb-client-nodejs');
+const { SessionPool, PoolConfigBuilder, TreeTablet, TSDataType } = require('@iotdb/client');
```
## 3. Quick Start
@@ -67,7 +67,7 @@
### 3.1 SessionPool Example
```typescript
-import { SessionPool, TreeTablet } from 'iotdb-client-nodejs';
+import { SessionPool, TreeTablet } from '@iotdb/client';
async function quickStart() {
// Create and initialize pool
@@ -164,7 +164,7 @@
#### Option 3: Using Builder Pattern (Recommended)
```typescript
-import { PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { PoolConfigBuilder } from '@iotdb/client';
const pool = new SessionPool(
new PoolConfigBuilder()
@@ -392,7 +392,7 @@
### 7.1 Complete CRUD Example
```typescript
-import { SessionPool } from 'iotdb-client-nodejs';
+import { SessionPool } from '@iotdb/client';
async function crudExample() {
const pool = new SessionPool('localhost', 6667, {
@@ -446,7 +446,7 @@
### 7.2 Multi-Node SessionPool Example
```typescript
-import { SessionPool, PoolConfigBuilder } from 'iotdb-client-nodejs';
+import { SessionPool, PoolConfigBuilder } from '@iotdb/client';
async function multiNodeExample() {
const pool = new SessionPool(
@@ -674,7 +674,7 @@
process.env.LOG_LEVEL = 'debug';
// Or use logger directly
-import { logger } from 'iotdb-client-nodejs';
+import { logger } from '@iotdb/client';
logger.setLevel('debug');
```
@@ -703,7 +703,7 @@
### 9.4 Getting Help
- **Documentation**: [IoTDB Docs](https://iotdb.apache.org/)
-- **GitHub Issues**: [Report bugs](https://github.com/CritasWang/iotdb-client-nodejs/issues)
+- **GitHub Issues**: [Report bugs](https://github.com/CritasWang/@iotdb/client/issues)
- **Mailing List**: dev@iotdb.apache.org
## Appendix A: Complete Type Reference
diff --git a/package-lock.json b/package-lock.json
index b18372a..9ca6975 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,11 +1,11 @@
{
- "name": "iotdb-client-nodejs",
+ "name": "@iotdb/client",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "iotdb-client-nodejs",
+ "name": "@iotdb/client",
"version": "0.1.0",
"license": "Apache-2.0",
"dependencies": {
diff --git a/package.json b/package.json
index fe088b2..67896f3 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,8 @@
{
- "name": "iotdb-client-nodejs",
+ "name": "@iotdb/client",
+ "publishConfig": {
+ "access": "public"
+ },
"version": "0.1.0",
"description": "Apache IoTDB Node.js client with SessionPool and TableSessionPool support",
"main": "dist/index.js",