Skip to content

Commit 29233df

Browse files
authored
NodeJS update and lowercase collections (#3214)
1 parent f97d447 commit 29233df

File tree

8 files changed

+18
-15
lines changed

8 files changed

+18
-15
lines changed

frameworks/JavaScript/express/mysql-app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpa
2020
logging: false
2121
});
2222

23-
const World = sequelize.define('World', {
23+
const World = sequelize.define('world', {
2424
id: {
2525
type: 'Sequelize.INTEGER',
2626
primaryKey: true

frameworks/JavaScript/hapi/handlers/sequelize-postgres.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpa
1111
logging: false
1212
});
1313

14-
const Worlds = sequelize.define('World', {
14+
const Worlds = sequelize.define('world', {
1515
id: {
1616
type: 'Sequelize.INTEGER',
1717
primaryKey: true

frameworks/JavaScript/koa/handlers/sequelize-postgres.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpa
1010
logging: false
1111
});
1212

13-
const Worlds = sequelize.define('World', {
13+
const Worlds = sequelize.define('world', {
1414
id: {
1515
type: 'Sequelize.INTEGER',
1616
primaryKey: true

frameworks/JavaScript/koa/handlers/sequelize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpa
1010
logging: false
1111
});
1212

13-
const Worlds = sequelize.define('World', {
13+
const Worlds = sequelize.define('world', {
1414
id: {
1515
type: 'Sequelize.INTEGER',
1616
primaryKey: true

frameworks/JavaScript/nodejs/handlers/sequelize-postgres.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpa
77
logging: false
88
});
99

10-
const Worlds = sequelize.define('World', {
10+
const Worlds = sequelize.define('world', {
1111
id: {
1212
type: 'Sequelize.INTEGER',
1313
primaryKey: true
@@ -51,7 +51,7 @@ module.exports = {
5151

5252
for (let i = 0; i < queries; i++) {
5353
worldPromises.push(randomWorldPromise());
54-
}
54+
}
5555

5656
Promise.all(worldPromises).then((worlds) => {
5757
h.addTfbHeaders(res, 'json');
@@ -74,19 +74,22 @@ module.exports = {
7474
Updates: (queries, req, res) => {
7575
const worldPromises = [];
7676

77+
console.log('queries: ', queries);
7778
for (let i = 0; i < queries; i++) {
7879
worldPromises.push(randomWorldPromise());
7980
}
8081

8182
const worldUpdate = (world) => {
82-
world.randomNumber = h.randomTfbNumber();
83+
world.randomnumber = h.randomTfbNumber();
84+
85+
console.log('RANDOM NUMBER: ', world.randomnumber);
8386

8487
return Worlds.update({
85-
randomNumber: world.randomNumber
86-
},
87-
{
88-
where: { id: world.id }
89-
}).then((results) => {
88+
randomnumber: world.randomnumber
89+
},
90+
{
91+
where: { id: world.id }
92+
}).then((results) => {
9093
return world;
9194
}).catch((err) => process.exit(1));
9295
};

frameworks/JavaScript/sailsjs/api/controllers/SequelizeMySQLController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var sequelize = new Sequelize(
2323
})
2424

2525

26-
var Worlds = sequelize.define('World', {
26+
var Worlds = sequelize.define('world', {
2727
id: {
2828
type: Sequelize.INTEGER,
2929
primaryKey: true

frameworks/JavaScript/sailsjs/api/controllers/SequelizePostgresController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var sequelize = new Sequelize(
2323
})
2424

2525

26-
var Worlds = sequelize.define('World', {
26+
var Worlds = sequelize.define('world', {
2727
id: {
2828
type: Sequelize.INTEGER,
2929
primaryKey: true

toolset/setup/linux/webservers/nodejs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
fw_installed node && return 0
44

5-
VERSION="8.9.3"
5+
VERSION="8.9.4"
66

77
fw_get -O http://nodejs.org/dist/v$VERSION/node-v$VERSION-linux-x64.tar.gz
88
fw_untar node-v$VERSION-linux-x64.tar.gz

0 commit comments

Comments
 (0)