csvReader follows dbgate stream api

This commit is contained in:
Jan Prochazka
2020-06-11 10:19:38 +02:00
parent f68bdafd9f
commit dc7c44b797
2 changed files with 55 additions and 16 deletions

View File

@@ -3,21 +3,21 @@ const dbgateApi = require('@dbgate/api');
async function run() {
const csvReader = await dbgateApi.csvReader({
fileName: 'test.csv',
header: true,
// header: false,
});
const tableWriter = await dbgateApi.tableWriter({
connection: {
server: 'localhost',
engine: 'mysql',
user: 'root',
password: 'test',
port: '3307',
database: 'Chinook',
},
pureName: 'importedTable'
});
// const tableWriter = await dbgateApi.tableWriter({
// connection: {
// server: 'localhost',
// engine: 'mysql',
// user: 'root',
// password: 'test',
// port: '3307',
// database: 'Chinook',
// },
// pureName: 'importedTable'
// });
const consoleWriter = await dbgateApi.consoleObjectWriter();