@bee.js/node 0.0.94 → 0.0.96
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/ORM/beeORM.js +4 -1
- package/package.json +1 -1
- package/tools/guid.js +2 -0
package/lib/ORM/beeORM.js
CHANGED
|
@@ -122,6 +122,7 @@ module.exports = {
|
|
|
122
122
|
modelSqlSelectFields,
|
|
123
123
|
|
|
124
124
|
createPool: function (configs) {
|
|
125
|
+
if (global.beeDBPool) return global.beeDBPool;
|
|
125
126
|
// TODO criar aviso de error para falta de configs.db. Criar no hive().create
|
|
126
127
|
|
|
127
128
|
// TODO pegar dinamicamnete database utilizada
|
|
@@ -146,7 +147,7 @@ module.exports = {
|
|
|
146
147
|
password: db.pass,
|
|
147
148
|
database: db.name,
|
|
148
149
|
waitForConnections: db.waitForConnections || true,
|
|
149
|
-
connectionLimit: db.connectionLimit ||
|
|
150
|
+
connectionLimit: db.connectionLimit || 100,
|
|
150
151
|
queueLimit: db.queueLimit || 0,
|
|
151
152
|
});
|
|
152
153
|
|
|
@@ -162,6 +163,8 @@ module.exports = {
|
|
|
162
163
|
}
|
|
163
164
|
}, db.ping);
|
|
164
165
|
|
|
166
|
+
global.beeDBPool = pool;
|
|
167
|
+
|
|
165
168
|
return pool;
|
|
166
169
|
}
|
|
167
170
|
},
|
package/package.json
CHANGED