lambdaorm
Version:
1 lines • 5.04 kB
JavaScript
'use strict';const a73k=a73y;(function(s,y){const c=a73y,g=s();while(!![]){try{const x=parseInt(c(0x1a6))/0x1+parseInt(c(0x1a4))/0x2+parseInt(c(0x1a5))/0x3+-parseInt(c(0x19e))/0x4*(-parseInt(c(0x1c1))/0x5)+parseInt(c(0x1c4))/0x6*(-parseInt(c(0x1a1))/0x7)+-parseInt(c(0x1a8))/0x8+-parseInt(c(0x1aa))/0x9*(parseInt(c(0x1c7))/0xa);if(x===y)break;else g['push'](g['shift']());}catch(m){g['push'](g['shift']());}}}(a73s,0xe6ca5));Object[a73k(0x19d)](exports,a73k(0x1d0),{'value':!![]}),exports[a73k(0x1c2)]=void 0x0;function a73y(s,y){const O=a73s();return a73y=function(D,g){D=D-0x19d;let M=O[D];return M;},a73y(s,y);}const lambdaorm_base_1=require('lambdaorm-base'),DdlBuilderBase_1=require(a73k(0x1b3));function a73s(){const u=['alterProperty','add\x20unique\x20key\x20','create\x20index\x20','5falcDL','NoSqlDDLBuilder','stringify','210YixikK','_PK','dialect','35570nmZKhs','truncate\x20collection\x20','setNull','dropIndex','mapping','drop\x20primary\x20key\x20','addPk','dropEntity','alterPropertyType','__esModule','find','name','SentenceAction','dropSequence','defineProperty','2237956aVWhQc','truncateEntity','create\x20collection\x20','114653CtPucA','\x22,\x20\x22sequence_value\x22:\x201\x20}','createIndex','3230988GbQNxU','4097886HOHCqm','361836IyFcuI','createEntity','11020544hwbSWr','{\x20\x22_id\x22\x20:\x20\x22','2547QzRrwG','drop\x20unique\x20key\x20','sequence','drop\x20sequence\x20','_UK','dropProperty','fields','createSequence','createQuery','./DdlBuilderBase','addFk','createFk','properties','DdlBuilderBase','dropPk','push','addProperty','drop\x20index\x20','dropUk','delimiter'];a73s=function(){return u;};return a73s();}class NoSqlDDLBuilder extends DdlBuilderBase_1[a73k(0x1b7)]{['truncateEntity'](s){const r=a73k;return this['createQuery'](lambdaorm_base_1[r(0x1d3)][r(0x19f)],'',s[r(0x1d2)],r(0x1c8)+s[r(0x1d2)]);}['createEntity'](s){const z=a73k;return this['createQuery'](lambdaorm_base_1[z(0x1d3)][z(0x1a7)],'',s['name'],z(0x1a0)+s[z(0x1d2)]);}[a73k(0x1b5)](s,y){return undefined;}[a73k(0x1b1)](s){const d=a73k;if(s[d(0x1ac)]===undefined)return undefined;const y=d(0x1a9)+this['dialect'][d(0x1bd)](s[d(0x1ac)])+d(0x1a2);return this[d(0x1b2)](lambdaorm_base_1[d(0x1d3)][d(0x1b1)],y,s[d(0x1d2)],'create\x20sequence\x20'+s['sequence']);}[a73k(0x1a3)](s,y){const i=a73k;var g;const x=[];for(const t of y[i(0x1b0)]){const v=(g=s[i(0x1b6)])===null||g===void 0x0?void 0x0:g[i(0x1d1)](a=>a['name']===t);x[i(0x1b9)](this[i(0x1c6)][i(0x1bd)](v['mapping']));}const m={};for(const a in x){m[x[a]]=0x1;}const w=JSON[i(0x1c3)]({'properties':m,'options':{'name':this[i(0x1c6)][i(0x1bd)](s[i(0x1cb)]+'_'+y['name'])}});return this[i(0x1b2)](lambdaorm_base_1['SentenceAction']['createIndex'],w,s[i(0x1d2)],i(0x1c0)+(s[i(0x1cb)]+'_'+y[i(0x1d2)]));}[a73k(0x1be)](s,y){return undefined;}[a73k(0x1cf)](s,y){return undefined;}['alterPropertyRequired'](s,y){return undefined;}[a73k(0x1ba)](s,y){return undefined;}['addPk'](s,y){const o=a73k;var g;const x=[];for(const t of y){const v=(g=s[o(0x1b6)])===null||g===void 0x0?void 0x0:g['find'](a=>a[o(0x1d2)]===t);x['push'](this[o(0x1c6)][o(0x1bd)](v['mapping']));}const m={};for(const a in x){x[a]!=='_id'&&(m[x[a]]=0x1);}const w=JSON[o(0x1c3)]({'properties':m,'options':{'name':this[o(0x1c6)][o(0x1bd)](s[o(0x1cb)]+o(0x1c5)),'unique':!![]}});return this['createQuery'](lambdaorm_base_1['SentenceAction'][o(0x1cd)],w,s['name'],'add\x20primary\x20key');}['addUk'](s,y){const p=a73k;var g;const x=[];for(const t of y){const v=(g=s['properties'])===null||g===void 0x0?void 0x0:g[p(0x1d1)](a=>a[p(0x1d2)]===t);x[p(0x1b9)](this[p(0x1c6)][p(0x1bd)](v[p(0x1cb)]));}const m={};for(const a in x){m[x[a]]=0x1;}const w=JSON[p(0x1c3)]({'properties':m,'options':{'name':this[p(0x1c6)][p(0x1bd)](s[p(0x1cb)]+p(0x1ae)),'unique':!![]}});return this[p(0x1b2)](lambdaorm_base_1['SentenceAction']['addUk'],w,s[p(0x1d2)],p(0x1bf)+(s[p(0x1cb)]+p(0x1ae)));}[a73k(0x1b4)](s,y){return undefined;}[a73k(0x1ce)](s){const f=a73k;return this[f(0x1b2)](lambdaorm_base_1[f(0x1d3)][f(0x1ce)],'',s['name'],'drop\x20collection\x20'+s[f(0x1d2)]);}[a73k(0x1af)](s,y){return undefined;}[a73k(0x1b8)](s){const q=a73k,y=this[q(0x1c6)][q(0x1bd)](s[q(0x1cb)]+q(0x1c5));return this[q(0x1b2)](lambdaorm_base_1[q(0x1d3)][q(0x1b8)],y,s[q(0x1d2)],q(0x1cc)+(s['mapping']+'_PK'));}[a73k(0x1bc)](s){const j=a73k,y=this[j(0x1c6)][j(0x1bd)](s[j(0x1cb)]+j(0x1ae));return this[j(0x1b2)](lambdaorm_base_1['SentenceAction'][j(0x1bc)],y,s['name'],j(0x1ab)+(s[j(0x1cb)]+j(0x1ae)));}[a73k(0x1c9)](s,y){return undefined;}['dropFk'](s,y){return undefined;}[a73k(0x1ca)](s,y){const b=a73k,g=this[b(0x1c6)][b(0x1bd)](s[b(0x1cb)]+'_'+y[b(0x1d2)]);return this[b(0x1b2)](lambdaorm_base_1[b(0x1d3)][b(0x1ca)],g,s[b(0x1d2)],b(0x1bb)+(s[b(0x1cb)]+'_'+y[b(0x1d2)]));}[a73k(0x1d4)](s){const l=a73k;if(s[l(0x1ac)]===undefined)return undefined;const y=JSON[l(0x1c3)]({'_id':this[l(0x1c6)][l(0x1bd)](s[l(0x1ac)])});return this['createQuery'](lambdaorm_base_1[l(0x1d3)][l(0x1d4)],y,s[l(0x1d2)],l(0x1ad)+s[l(0x1ac)]);}}exports['NoSqlDDLBuilder']=NoSqlDDLBuilder;