* Run function in CLS context. * If no CLS context in use, just runs the function normally * * @private * @param {Function} fn Function to run * @returns {*} Return value of function
(fn)
| 1240 | * @returns {*} Return value of function |
| 1241 | */ |
| 1242 | static _clsRun(fn) { |
| 1243 | const ns = Sequelize._cls; |
| 1244 | if (!ns) return fn(); |
| 1245 | |
| 1246 | let res; |
| 1247 | ns.run(context => res = fn(context)); |
| 1248 | return res; |
| 1249 | } |
| 1250 | |
| 1251 | log(...args) { |
| 1252 | let options; |
no test coverage detected