2.0.0 • Published 8 years ago
mysql2rethinkdb v2.0.0
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'
})),
}),
});