scripting engine

This commit is contained in:
Jan Prochazka
2020-06-11 10:09:04 +02:00
parent ca079d5dce
commit f68bdafd9f
11 changed files with 127 additions and 28 deletions

View File

@@ -1,13 +1,24 @@
const dbgateApi = require('@dbgate/api');
async function run() {
// const queryReader = await dbgateApi.queryReader({
// connection: {
// server: 'localhost',
// engine: 'mysql',
// user: 'root',
// password: 'test',
// port: '3307',
// database: 'Chinook',
// },
// sql: 'SELECT * FROM Genre',
// });
const queryReader = await dbgateApi.queryReader({
connection: {
server: 'localhost',
engine: 'mysql',
user: 'root',
password: 'test',
port: '3307',
engine: 'mssql',
user: 'sa',
password: 'Pwd2020Db',
database: 'Chinook',
},
sql: 'SELECT * FROM Genre',
@@ -17,7 +28,7 @@ async function run() {
const csvWriter = await dbgateApi.csvWriter({
fileName: 'test.csv',
header: true,
// header: false,
});
const consoleWriter = await dbgateApi.consoleObjectWriter();