0.1.9 • Published 3 years ago

node-datax v0.1.9

Weekly downloads
4
License
ISC
Repository
github
Last release
3 years ago

node-datax

使用TypeScript开发的Node的数据提取工具

安装

$ npm install node-datax

使用

  const { datax } = require('node-datax');
  const srcConnect = { host: '', username: 'postgres', password: '', database: '' }
  const destConnect = { host: '', username: 'postgres', password: '', database: '' }
  try {
    const datax1 = await datax(srcConnect, destConnect, { srcName: 'jcb_cd_test', destName: 'jcb_cd', column: ['*'] })
    datax1.on('finish', (res) => {
      console.log('总条数:', res.count)
      console.log('finish')
    })
    datax1.on('error', (res) => {
      console.log('error')
    })
    datax1.on('data', (res) => {
      console.log('完成条数:', res.count)
    })
  } catch (error) {
    console.log('初始化失败')
  }
### 开发
1. 修改`tsconfig.json`中`sourceMap`为`false`
2. 执行 `npm run build`命令
0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago