-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
69 lines (58 loc) · 1.71 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
var knex = require('knex')({
client: 'pg',
connection: {
host : 'dp416311-003.dbaas.ovh.net',
user : 'buzzz_io_strapi',
password : '8gyzk42B',
database : 'buzzz_io_strapi',
connectTimeout: 90000
},
pool: { //<- this is important
min : 0
},
// client: 'mssql',
// connection: {
// host : '127.0.0.1',
// // user : 'sa',
// // password : '8gyzk42B',
// database : 'Sharepoint_19731',
// connectTimeout: 90000
// }
});
// knex.raw("SELECT VERSION()")
// .then((version) => console.log((version[0][0])))
// .catch((err) => { console.log( err); throw err })
// .finally(() => {
// knex.destroy();
// });
// // var test = knex.select().table('users-permissions_user')
// // console.log(test);
// var knex = require('knex')({
// client: 'mssql',
// connection: {
// server:'localhost',
// connectionString: "Initial Catalog=SharePoint_19731;Data Source=.;Integrated Security=SSPI;"
// }
// });
// knex.raw("SELECT VERSION()").then(
// (version) => console.log((version[0][0]))
// ).catch((err) => { console.log( err); throw err });
// // .finally(() => {
// // knex.destroy();
// // // });
knex
.from('users-permissions_user')
.select('username')
.then((test)=>{
//console.log(test);
});
// knex('buzzz_io_strapi').table('users-permissions_user')
// .select('Products.Price as Price')
// .then((product) => {
// // console.log('log product', product);
// // console.dir('dir product', product);
// // logger.info('Query Data: %j', product);
// })
// .finally(() => {
// knex.destroy();
// });