@bee.js/node 0.0.57 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/DBA/beeDBA.js CHANGED
@@ -111,7 +111,7 @@ module.exports.actions = {
111
111
  )}
112
112
  FOREIGN KEY (${field})
113
113
  REFERENCES ${model.relations[field].split(".")[0]} (${
114
- model.relations[field].split(".")[1]
114
+ model.relations[field].split(".")[1].split(" ")[0]
115
115
  })
116
116
  ${"ON DELETE CASCADE"}
117
117
  ${"ON UPDATE CASCADE"};
package/lib/ORM/beeORM.js CHANGED
@@ -169,6 +169,11 @@ module.exports = {
169
169
  return false;
170
170
  default:
171
171
  return mysql.createPool({
172
+ acquireTimeout: 10000, // Tempo limite para tentar adquirir uma nova conexão
173
+ connectTimeout: 10000, // Tempo limite para conectar ao banco de dados
174
+ idleTimeout: 60000, // Tempo que uma conexão pode ficar inativa antes de ser fechada
175
+ reconnect: true,
176
+ ...db,
172
177
  host: db.host,
173
178
  user: db.user,
174
179
  password: db.pass,
@@ -176,10 +181,6 @@ module.exports = {
176
181
  waitForConnections: db.waitForConnections || true,
177
182
  connectionLimit: db.connectionLimit || 10,
178
183
  queueLimit: db.queueLimit || 0,
179
- acquireTimeout: 10000, // Tempo limite para tentar adquirir uma nova conexão
180
- connectTimeout: 10000, // Tempo limite para conectar ao banco de dados
181
- idleTimeout: 60000, // Tempo que uma conexão pode ficar inativa antes de ser fechada
182
- reconnect: true,
183
184
  });
184
185
  }
185
186
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bee.js/node",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "description": "A JavaScript framework for making Node.js API´s",
5
5
  "main": "index.js",
6
6
  "scripts": {