Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. // var knex = require('knex')({
  2. // client: 'mssql',
  3. // connection: {
  4. // host : 'mssql.sequelizejs.com',
  5. // user : 'sequelize',
  6. // password : 'nEGkLma26gXVHFUAHJxcmsrK',
  7. // database : 'imperial_icore',
  8. // port: 1433,
  9. // pool: {
  10. // max: 5,
  11. // idle: 3000
  12. // }
  13. // }
  14. // });
  15. var knex = require('knex')({
  16. client: 'mssql',
  17. connection: 'mssql://SERVER01/GLOBALWANT'
  18. });
  19.  
  20. var Benchmark = require('benchmark');
  21.  
  22. var suite = new Benchmark.Suite;
  23.  
  24. suite.add('dbo.tblStock', function() {
  25. // knex.select('*').from('dbo.tblStock').then(function(o) {
  26. //
  27. // });
  28. knex('information_schema.tables').where({TABLE_TYPE:'BASE_TABLE'}).select('*').then(function(o) {
  29. console.log(o);
  30. });
  31. })
  32. // .add('dbo.tblPayment', function() {
  33. //
  34. // })
  35. // .add('dbo.tblInvoice', function() {
  36. //
  37. // })
  38. .on('complete', function() {
  39. console.log('Fastest is ' + this.filter('fastest').map('name'));
  40. })
  41. .run({ 'async': true });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement