UNPKG

lambdaorm

Version:
1 lines 2.16 kB
'use strict';const a20z=a20y;function a20s(){const l=['226phirRt','value','done','findIndex','11767PFyllI','__awaiter','775079cyOtVf','2345895VjLJye','config','6232776upFvog','create','13455WqlvBb','throw','__esModule','1816HUoaTO','10bloIdS','splice','next','end','connections','apply','1677330kAAPYm','then','12QJzZIf','uuid','ConnectionPoolAdapter','608710TrJOzL','release'];a20s=function(){return l;};return a20s();}(function(s,y){const r=a20y,g=s();while(!![]){try{const x=parseInt(r(0x1eb))/0x1+parseInt(r(0x1e5))/0x2*(-parseInt(r(0x1f0))/0x3)+-parseInt(r(0x1fc))/0x4*(-parseInt(r(0x1e3))/0x5)+-parseInt(r(0x1fa))/0x6+-parseInt(r(0x1e9))/0x7*(-parseInt(r(0x1f3))/0x8)+-parseInt(r(0x1ec))/0x9*(-parseInt(r(0x1f4))/0xa)+-parseInt(r(0x1ee))/0xb;if(x===y)break;else g['push'](g['shift']());}catch(m){g['push'](g['shift']());}}}(a20s,0x68e03));var __awaiter=this&&this[a20z(0x1ea)]||function(s,y,P,g){function x(m){return m instanceof P?m:new P(function(w){w(m);});}return new(P||(P=Promise))(function(m,w){const p=a20y;function t(c){const d=a20y;try{a(g[d(0x1f6)](c));}catch(k){w(k);}}function v(c){const i=a20y;try{a(g[i(0x1f1)](c));}catch(k){w(k);}}function a(c){const o=a20y;c[o(0x1e7)]?m(c[o(0x1e6)]):x(c[o(0x1e6)])[o(0x1fb)](t,v);}a((g=g[p(0x1f9)](s,y||[]))[p(0x1f6)]());});};Object['defineProperty'](exports,a20z(0x1f2),{'value':!![]}),exports[a20z(0x1fe)]=void 0x0;class ConnectionPoolAdapter{constructor(s,y){const f=a20z;this['helper']=y,this[f(0x1f8)]=[],this[f(0x1ed)]=s;}['acquire'](){return __awaiter(this,void 0x0,void 0x0,function*(){const q=a20y,s=this['helper'][q(0x1fd)]['v4'](),y=yield this[q(0x1ef)](s);return this['connections']['push'](y),y;});}[a20z(0x1e4)](s){return __awaiter(this,void 0x0,void 0x0,function*(){const j=a20y;yield s['end']();const y=this[j(0x1f8)][j(0x1e8)](g=>g['id']===s['id']);y>-0x1&&this['connections'][j(0x1f5)](y,0x1);});}[a20z(0x1f7)](){return __awaiter(this,void 0x0,void 0x0,function*(){const b=a20y;for(const s of this[b(0x1f8)]){yield s[b(0x1f7)]();}});}}function a20y(s,y){const O=a20s();return a20y=function(D,g){D=D-0x1e3;let M=O[D];return M;},a20y(s,y);}exports[a20z(0x1fe)]=ConnectionPoolAdapter;