mysql2rethinkdb

2.0.0 • Public • Published

npm version

What is it

Migrate mysql tables into rethinkdb.

Usage

Before use command, Check Rethinkdb python driver is installed. Because rethinkdb import command is implemented by python.

Source Code

npm install -S mysql2rethinkdb;
import mysql2rethinkdb from 'mysql2rethinkdb';
 
mysql2rethinkdb({
  mysql: {
    host: 'localhost',
    user: 'root',
    password: '',
    port: '3306',
    database: 'test',
  },
  rethinkdb: {
    host: 'localhost',
    port: '28015',
    database: 'test',
    authKey: 'AUTH_KEY',
  },
  tables: ['user', 'post'],
  transform: ({ table, rows }) => ({
    table: '_' + table,
    rows: rows.map(row => ({
      ...row
      hello: 'world'
    })),
  }),
});

Related Links

Readme

Keywords

none

Package Sidebar

Install

npm i mysql2rethinkdb

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • ironhee