Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- client: 'mysql',
- connection: {
- host: '192.168.1.3', // Linux VM
- port: 3306,
- user: 'sandalphon',
- password: '*****',
- database: 'sandalphon'
- }
- }
- var storage = require('knex')(config);
- var Promise = require('bluebird');
- storage('information_schema.tables')
- .select(storage.raw('count(*) as count'))
- .where('table_schema', 'sandalphon')
- .then((response) => {
- console.log(response);
- }); // returning 4
- storage('information_schema.tables')
- .select('*')
- .then((response) => {
- console.log(response);
- }); // returning [ Object ]
- process.exit(0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement