@lovrabet/dataset-mcp-server 1.3.1 → 1.3.2-beta.1
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/dist/analyzer/dataset-analyzer.js +1 -1
- package/dist/api/cache.js +1 -1
- package/dist/api/dev-api-client.js +1 -1
- package/dist/auth/constants.js +1 -1
- package/dist/auth/cookie-manager.js +1 -1
- package/dist/auth/session-validator.js +1 -1
- package/dist/index.js +1 -1
- package/dist/server.js +1 -1
- package/dist/tools/execute-custom-sql.js +1 -1
- package/dist/tools/generate-sdk-code.js +1 -1
- package/dist/tools/generate-sql-code.js +1 -1
- package/dist/tools/get-dataset-detail.js +1 -1
- package/dist/tools/get-operation-detail.js +1 -1
- package/dist/tools/get-operations.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/list-datasets.js +1 -1
- package/dist/tools/list-sql-queries.js +1 -1
- package/dist/tools/login.js +1 -1
- package/dist/tools/save-custom-sql.js +1 -1
- package/dist/tools/save-or-update-custom-sql.js +1 -1
- package/dist/tools/search-datasets.js +1 -1
- package/dist/tools/validate-sql-content.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/mcp-types.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/package.json +1 -1
package/dist/types/mcp-types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x2c68f9=a23_0x25d4;function a23_0x59a5(){const _0x5cf3ad=['44WgQNTW','NETWORK_ERROR','get_dataset_detail','push','SQL_EXECUTION_FAILED','9224UnXrzz','API_ERROR','语法错误','fixedSql','error','检查\x20SQL\x20语法,确保关键字拼写正确、括号匹配','SQL_NOT_FOUND','SQL_VALIDATION_FAILED','3271910IPZSLr','length','SQL\x20不存在:\x20','使用\x20get_dataset_detail\x20工具查看数据集的所有字段','list_datasets','确保\x20SELECT\x20语句格式正确,如:\x20SELECT\x20id,\x20name\x20FROM\x20table\x20WHERE\x20status\x20=\x201','432162Ttyztj','135276cymzZb','canAutoFix','7bqyojY','4PXSJWo','response','数据集不存在:\x20','login({\x20env:\x20\x22online\x22\x20})','get_dataset_detail({\x20datasetCode:\x20\x22customer\x22\x20})','查看所有可用的数据集','suggestions','5499456oMcDhs','类型不匹配','需要登录才能访问\x20Lovrabet\x20数据。请先使用\x20login\x20工具进行登录。','status','登录到\x20Lovrabet\x20平台','PARAMETER_MISSING','查看所有可用的\x20SQL\x20查询','<dataset-code>','缺少\x20WHERE\x20条件','TABLE_NOT_FOUND','PARAMETER_INVALID','recoverable','fixSteps','1062000SqLEte','AUTH_REQUIRED','description','type','list_sql_queries','code','字段不存在','location','缺少必需参数:\x20','使用\x20list_datasets\x20工具查看所有可用的数据集表名','DATASET_NOT_FOUND','list_sql_queries({\x20pageSize:\x20999\x20})','typeLabel','1570UNgLcx','UNKNOWN_ERROR','suggestedAction','表不存在','tool','toISOString','message','example','7443hqfNVf','124rGRpRr','不安全的查询','list_datasets({\x20pageSize:\x20999\x20})','severity'];a23_0x59a5=function(){return _0x5cf3ad;};return a23_0x59a5();}(function(_0x3ddfa7,_0xa021a2){const _0x18c2b0=a23_0x25d4,_0x5334dc=_0x3ddfa7();while(!![]){try{const _0x5dfcf2=parseInt(_0x18c2b0(0x14b))/0x1*(parseInt(_0x18c2b0(0x142))/0x2)+parseInt(_0x18c2b0(0x159))/0x3+-parseInt(_0x18c2b0(0x15d))/0x4*(parseInt(_0x18c2b0(0x153))/0x5)+parseInt(_0x18c2b0(0x171))/0x6*(-parseInt(_0x18c2b0(0x15c))/0x7)+parseInt(_0x18c2b0(0x164))/0x8+-parseInt(_0x18c2b0(0x186))/0x9*(parseInt(_0x18c2b0(0x17e))/0xa)+-parseInt(_0x18c2b0(0x146))/0xb*(parseInt(_0x18c2b0(0x15a))/0xc);if(_0x5dfcf2===_0xa021a2)break;else _0x5334dc['push'](_0x5334dc['shift']());}catch(_0x587225){_0x5334dc['push'](_0x5334dc['shift']());}}}(a23_0x59a5,0x60f05));function a23_0x25d4(_0x2b4af8,_0x4aa69b){_0x2b4af8=_0x2b4af8-0x142;const _0x59a582=a23_0x59a5();let _0x25d472=_0x59a582[_0x2b4af8];return _0x25d472;}export const SQL_ERROR_TYPE_LABELS={'TABLE_NOT_FOUND':a23_0x2c68f9(0x181),'COLUMN_NOT_FOUND':a23_0x2c68f9(0x177),'AMBIGUOUS_COLUMN':'字段名歧义','SYNTAX_ERROR':a23_0x2c68f9(0x14d),'TYPE_MISMATCH':a23_0x2c68f9(0x165),'MISSING_WHERE_CLAUSE':a23_0x2c68f9(0x16c),'UNSAFE_QUERY':a23_0x2c68f9(0x143)};export function createError(_0x3c358a){const _0x13cf44=a23_0x2c68f9;return{'error':!![],'code':_0x3c358a['code'],'message':_0x3c358a[_0x13cf44(0x184)],'status':_0x3c358a[_0x13cf44(0x167)],'description':_0x3c358a['description'],'response':_0x3c358a['response'],'suggestedAction':_0x3c358a[_0x13cf44(0x180)],'recoverable':_0x3c358a[_0x13cf44(0x16f)]??!![],'timestamp':new Date()[_0x13cf44(0x183)]()};}export function createAuthError(){const _0x4a3e8a=a23_0x2c68f9;return createError({'code':'AUTH_REQUIRED','message':_0x4a3e8a(0x166),'suggestedAction':{'tool':'login','description':_0x4a3e8a(0x168),'example':_0x4a3e8a(0x160)},'recoverable':!![]});}export function createMissingParamError(_0x5e2b0f,_0x9cc8d9){const _0x3c5278=a23_0x2c68f9;return createError({'code':_0x3c5278(0x169),'message':_0x3c5278(0x179)+_0x5e2b0f+(_0x9cc8d9?'\x20('+_0x9cc8d9+')':''),'recoverable':!![]});}export function createDatasetNotFoundError(_0x568919){const _0x45cdda=a23_0x2c68f9;return createError({'code':_0x45cdda(0x17b),'message':_0x45cdda(0x15f)+_0x568919,'suggestedAction':{'tool':_0x45cdda(0x157),'description':_0x45cdda(0x162),'example':'list_datasets({\x20pageSize:\x20999\x20})'},'recoverable':!![]});}export function createSqlNotFoundError(_0x163294){const _0x329207=a23_0x2c68f9;return createError({'code':_0x329207(0x151),'message':_0x329207(0x155)+_0x163294,'suggestedAction':{'tool':_0x329207(0x175),'description':_0x329207(0x16a),'example':_0x329207(0x17c)},'recoverable':!![]});}export function createSqlValidationError(_0x553481){const _0x922754=a23_0x2c68f9,_0x77de25=_0x553481[_0x922754(0x170)][_0x922754(0x154)]>0x0,_0xe9785f=_0x77de25?_0x553481[_0x922754(0x170)][0x0]:undefined,_0x56681a={'type':_0x553481[_0x922754(0x174)],'typeLabel':_0x553481[_0x922754(0x17d)],'location':_0x553481[_0x922754(0x178)],'severity':_0x553481[_0x922754(0x145)],'fixSteps':_0x553481[_0x922754(0x170)],'suggestions':_0x553481[_0x922754(0x163)],'canAutoFix':_0x553481[_0x922754(0x15b)],'fixedSql':_0x553481[_0x922754(0x14e)]};return createError({'code':_0x922754(0x152),'message':_0x553481[_0x922754(0x17d)]+':\x20'+_0x553481[_0x922754(0x184)],'status':_0x553481[_0x922754(0x167)],'description':_0x56681a,'response':_0x553481[_0x922754(0x15e)],'suggestedAction':_0xe9785f?{'tool':_0xe9785f[_0x922754(0x182)],'description':_0xe9785f[_0x922754(0x173)],'params':_0xe9785f['toolParams'],'example':_0xe9785f[_0x922754(0x185)]}:{'tool':_0x922754(0x148),'description':'获取数据集详情以确认表名和字段名','params':{'datasetCode':_0x922754(0x16b)}},'recoverable':_0x553481[_0x922754(0x145)]!==_0x922754(0x14f)});}export function createStructuredSqlError(_0x431bcc){const _0x45dcfb=a23_0x2c68f9,_0x2b9cde=SQL_ERROR_TYPE_LABELS[_0x431bcc['type']],_0x5f4b87=_0x431bcc['severity']??_0x45dcfb(0x14f),_0x51aa15=[];if(_0x431bcc['type']===_0x45dcfb(0x16d))_0x51aa15[_0x45dcfb(0x149)]({'description':_0x45dcfb(0x17a),'tool':_0x45dcfb(0x157),'toolParams':{'pageSize':0x3e7},'example':_0x45dcfb(0x144)});else{if(_0x431bcc[_0x45dcfb(0x174)]==='COLUMN_NOT_FOUND')_0x51aa15['push']({'description':_0x45dcfb(0x156),'tool':_0x45dcfb(0x148),'toolParams':{'datasetCode':'<dataset-code>'},'example':_0x45dcfb(0x161)});else _0x431bcc[_0x45dcfb(0x174)]==='SYNTAX_ERROR'&&_0x51aa15[_0x45dcfb(0x149)]({'description':_0x45dcfb(0x150),'example':_0x45dcfb(0x158)});}return{'type':_0x431bcc['type'],'typeLabel':_0x2b9cde,'location':_0x431bcc[_0x45dcfb(0x178)],'message':_0x431bcc[_0x45dcfb(0x184)],'severity':_0x5f4b87,'fixSteps':_0x431bcc[_0x45dcfb(0x170)]??_0x51aa15,'suggestions':_0x431bcc[_0x45dcfb(0x163)],'canAutoFix':_0x431bcc[_0x45dcfb(0x15b)],'fixedSql':_0x431bcc[_0x45dcfb(0x14e)],'status':_0x431bcc[_0x45dcfb(0x167)],'response':_0x431bcc[_0x45dcfb(0x15e)]};}export function fromLovrabetError(_0x46ea5f,_0x344c6d){const _0x2bc913=a23_0x2c68f9;return createError({'code':mapSdkCodeToMcpCode(_0x46ea5f[_0x2bc913(0x176)]),'message':_0x46ea5f['message'],'status':_0x46ea5f['status'],'description':_0x46ea5f['description'],'response':_0x46ea5f['response'],'suggestedAction':_0x344c6d,'recoverable':_0x46ea5f[_0x2bc913(0x167)]?_0x46ea5f['status']<0x1f4:!![]});}function mapSdkCodeToMcpCode(_0x1a76d0){const _0x487115=a23_0x2c68f9;if(!_0x1a76d0)return'UNKNOWN_ERROR';const _0x40cbed={'AUTH_REQUIRED':_0x487115(0x172),'AUTH_FAILED':_0x487115(0x172),'UNAUTHORIZED':_0x487115(0x172),'DATASET_NOT_FOUND':_0x487115(0x17b),'NOT_FOUND':_0x487115(0x17b),'INVALID_PARAMETER':_0x487115(0x16e),'MISSING_PARAMETER':'PARAMETER_MISSING','SQL_ERROR':_0x487115(0x14a),'NETWORK_ERROR':_0x487115(0x147),'API_ERROR':_0x487115(0x14c)};return _0x40cbed[_0x1a76d0]||_0x487115(0x17f);}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x455c10,_0x564ad9){const _0x2039b4=a24_0x4d32,_0x39f937=_0x455c10();while(!![]){try{const _0x541606=parseInt(_0x2039b4(0x1c3))/0x1+parseInt(_0x2039b4(0x1c8))/0x2+-parseInt(_0x2039b4(0x1d8))/0x3*(parseInt(_0x2039b4(0x1ce))/0x4)+parseInt(_0x2039b4(0x1de))/0x5+parseInt(_0x2039b4(0x1d2))/0x6+parseInt(_0x2039b4(0x1a2))/0x7*(parseInt(_0x2039b4(0x19f))/0x8)+-parseInt(_0x2039b4(0x1d3))/0x9;if(_0x541606===_0x564ad9)break;else _0x39f937['push'](_0x39f937['shift']());}catch(_0x37f007){_0x39f937['push'](_0x39f937['shift']());}}}(a24_0x1146,0x54788));import{createStructuredSqlError}from'../types/mcp-types.js';export function parseSqlStructure(_0x597296){const _0x54a672=a24_0x4d32,_0x111537={'tables':[],'columns':[],'parameters':[],'joins':[]};if(!_0x597296||typeof _0x597296!==_0x54a672(0x1ca))return _0x111537;const _0x5bc038=_0x597296['replace'](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x54a672(0x1c9)](/'[^']*'/g,'\x27\x27')[_0x54a672(0x1c9)](/--.*$/gm,'')[_0x54a672(0x1c9)](/\/\*[\s\S]*?\*\//g,''),_0x599cb7=_0x5bc038[_0x54a672(0x1bb)](/FROM\s+([^\s,)(]+)/i);if(_0x599cb7){const _0x3fb93c=_0x599cb7[0x1]['replace'](/[`"]/g,'');_0x111537[_0x54a672(0x1b1)][_0x54a672(0x1cb)](_0x3fb93c);}const _0x3774f3=_0x5bc038[_0x54a672(0x1bf)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi);for(const _0x2c1c30 of _0x3774f3){const _0x3e5808=_0x2c1c30[0x1][_0x54a672(0x1c9)](/[`"]/g,'');_0x3e5808&&!_0x111537[_0x54a672(0x1b1)]['includes'](_0x3e5808)&&_0x111537[_0x54a672(0x1b1)][_0x54a672(0x1cb)](_0x3e5808);}const _0x11b8bd=_0x5bc038[_0x54a672(0x1bb)](/SELECT\s+([\s\S]+?)\s+FROM/i);if(_0x11b8bd){const _0x392d3a=_0x11b8bd[0x1][_0x54a672(0x1cd)]();if(_0x392d3a!=='*'){const _0x18c8c0=splitSqlColumns(_0x392d3a);for(const _0x5f03a of _0x18c8c0){const _0x4f6df3=_0x5f03a['trim']();if(_0x4f6df3&&!_0x4f6df3[_0x54a672(0x1bb)](/^\d+$/)){const _0x4d356f=_0x4f6df3[_0x54a672(0x1a7)](/\s+AS\s+/i),_0x1194ab=_0x4d356f[0x0][_0x54a672(0x1cd)](),_0x5c4c91=_0x4d356f[0x1]?.['trim']();if(_0x1194ab['includes']('.')){const [_0x579d0b,_0x3c8603]=_0x1194ab[_0x54a672(0x1a7)]('.');_0x111537[_0x54a672(0x1e0)][_0x54a672(0x1cb)]({'table':_0x579d0b[_0x54a672(0x1cd)](),'column':_0x3c8603['replace'](/[`"]/g,'')[_0x54a672(0x1cd)](),'alias':_0x5c4c91});}else!_0x1194ab[_0x54a672(0x1c6)]('(')&&_0x111537[_0x54a672(0x1e0)][_0x54a672(0x1cb)]({'table':'','column':_0x1194ab[_0x54a672(0x1c9)](/[`"]/g,''),'alias':_0x5c4c91});}}}}const _0x20a658=_0x5bc038[_0x54a672(0x1bf)](/JOIN\s+(\w+)\s+(?:AS\s+)?(\w+)?\s+ON\s+([\w.]+)\s*=\s*([\w.]+)/gi);for(const _0x355274 of _0x20a658){const [,,,_0x1df071,_0x1ef1e8]=_0x355274;if(_0x1df071&&_0x1ef1e8){const [_0xa20428,_0x560d7f]=_0x1df071[_0x54a672(0x1c6)]('.')?_0x1df071[_0x54a672(0x1a7)]('.'):['',_0x1df071],[_0x152f8a,_0x27da2a]=_0x1ef1e8[_0x54a672(0x1c6)]('.')?_0x1ef1e8[_0x54a672(0x1a7)]('.'):['',_0x1ef1e8];_0x111537['joins']?.[_0x54a672(0x1cb)]({'leftTable':_0xa20428,'leftColumn':_0x560d7f,'rightTable':_0x152f8a,'rightColumn':_0x27da2a});}}const _0x5799c9=_0x597296[_0x54a672(0x1bf)](/[#\$]\{(\w+)\}/g),_0xcb51b3=new Set();for(const _0x485127 of _0x5799c9){const _0x356648=_0x485127[0x1];!_0xcb51b3[_0x54a672(0x1d9)](_0x356648)&&(_0xcb51b3[_0x54a672(0x1d7)](_0x356648),_0x111537[_0x54a672(0x1dc)][_0x54a672(0x1cb)]({'name':_0x356648,'type':inferParamType(_0x356648),'example':getExampleValue(_0x356648)}));}return _0x111537;}function splitSqlColumns(_0x326889){const _0x5b4c76=a24_0x4d32,_0x1cb059=[];let _0x5c2450='',_0x2bcbf7=0x0;for(let _0x3e63b5=0x0;_0x3e63b5<_0x326889['length'];_0x3e63b5++){const _0x2780e0=_0x326889[_0x3e63b5];if(_0x2780e0==='(')_0x2bcbf7++,_0x5c2450+=_0x2780e0;else{if(_0x2780e0===')')_0x2bcbf7--,_0x5c2450+=_0x2780e0;else _0x2780e0===','&&_0x2bcbf7===0x0?(_0x1cb059['push'](_0x5c2450),_0x5c2450=''):_0x5c2450+=_0x2780e0;}}return _0x5c2450&&_0x1cb059[_0x5b4c76(0x1cb)](_0x5c2450),_0x1cb059;}function inferParamType(_0x31a86b){const _0x28c3aa=a24_0x4d32,_0xd42c0=_0x31a86b[_0x28c3aa(0x19a)]();if(_0xd42c0[_0x28c3aa(0x1c6)]('id')||_0xd42c0[_0x28c3aa(0x1c6)](_0x28c3aa(0x199))||_0xd42c0[_0x28c3aa(0x1c6)](_0x28c3aa(0x1df))||_0xd42c0[_0x28c3aa(0x1c6)]('size')||_0xd42c0['includes'](_0x28c3aa(0x1a8))||_0xd42c0[_0x28c3aa(0x1c6)](_0x28c3aa(0x1ac))||_0xd42c0[_0x28c3aa(0x1c6)](_0x28c3aa(0x1af))||_0xd42c0[_0x28c3aa(0x1c6)](_0x28c3aa(0x1c7)))return _0x28c3aa(0x1a4);return'string';}function a24_0x4d32(_0x36de73,_0x189674){_0x36de73=_0x36de73-0x197;const _0x1146d0=a24_0x1146();let _0x4d32ba=_0x1146d0[_0x36de73];return _0x4d32ba;}function getExampleValue(_0x35f682){const _0xebc0bc=a24_0x4d32,_0xf1cefd=_0x35f682[_0xebc0bc(0x19a)](),_0x1f95f5=inferParamType(_0xf1cefd);if(_0x1f95f5===_0xebc0bc(0x1a4)){if(_0xf1cefd[_0xebc0bc(0x1c6)]('limit')||_0xf1cefd[_0xebc0bc(0x1c6)](_0xebc0bc(0x199))||_0xf1cefd[_0xebc0bc(0x1c6)]('size'))return 0xa;if(_0xf1cefd[_0xebc0bc(0x1c6)]('page'))return 0x1;return 0x7b;}if(_0xf1cefd[_0xebc0bc(0x1c6)]('date')||_0xf1cefd[_0xebc0bc(0x1c6)](_0xebc0bc(0x1ab)))return'2024-01-01';if(_0xf1cefd[_0xebc0bc(0x1c6)](_0xebc0bc(0x1b9)))return'1';if(_0xf1cefd[_0xebc0bc(0x1c6)]('keyword')||_0xf1cefd[_0xebc0bc(0x1c6)](_0xebc0bc(0x1b2))||_0xf1cefd[_0xebc0bc(0x1c6)](_0xebc0bc(0x198)))return _0xebc0bc(0x1cf);return _0xebc0bc(0x1b5);}export function validateIsSelectOnly(_0x13f754){const _0x2ab1bf=a24_0x4d32;if(!_0x13f754||typeof _0x13f754!==_0x2ab1bf(0x1ca))return{'valid':![],'reason':_0x2ab1bf(0x1c2)};const _0x5df056=_0x13f754[_0x2ab1bf(0x1c9)](/#\{[^}]*\}/g,'?')[_0x2ab1bf(0x1c9)](/\$\{[^}]*\}/g,'?')[_0x2ab1bf(0x1c9)](/@[^(\s]+(\([^)]*\))?/g,''),_0x3789f3=_0x5df056['trim'](),_0x557075=_0x3789f3['split']('\x0a');let _0xbbc22='';for(const _0x9878e4 of _0x557075){const _0x33b6a6=_0x9878e4[_0x2ab1bf(0x1cd)]();if(!_0x33b6a6||_0x33b6a6[_0x2ab1bf(0x1b6)]('--')||_0x33b6a6['startsWith']('/*'))continue;_0xbbc22=_0x33b6a6;break;}if(!_0xbbc22[_0x2ab1bf(0x1c5)]()[_0x2ab1bf(0x1b6)]('SELECT'))return{'valid':![],'reason':'Only\x20SELECT\x20queries\x20are\x20allowed.\x20The\x20SQL\x20must\x20start\x20with\x20SELECT\x20(after\x20any\x20comments).'};const _0x5a3536=[_0x2ab1bf(0x1d5),_0x2ab1bf(0x1b3),_0x2ab1bf(0x1bd),'DROP\x5cs+(TABLE|INDEX|DATABASE)',_0x2ab1bf(0x1d0),_0x2ab1bf(0x1a6),_0x2ab1bf(0x1dd),'GRANT',_0x2ab1bf(0x1aa),'EXEC','EXECUTE'],_0xb7fb99=_0x3789f3[_0x2ab1bf(0x1c5)]();for(const _0x3447f3 of _0x5a3536){const _0x3c4a44=new RegExp(_0x3447f3,'i');if(_0x3c4a44[_0x2ab1bf(0x1a3)](_0xb7fb99))return{'valid':![],'reason':'Forbidden\x20keyword\x20detected:\x20'+_0x3447f3[_0x2ab1bf(0x1c9)](_0x2ab1bf(0x1a9),'\x20')+_0x2ab1bf(0x1b0)};}return{'valid':!![]};}function a24_0x1146(){const _0x204d81=['tableName','amount','.\x20Only\x20SELECT\x20queries\x20are\x20allowed.','tables','search','UPDATE\x5cs+\x5cw+\x5cs+SET','error','value','startsWith','table','get','status','SQL\x20必须以\x20SELECT\x20开头','match','\x20|\x20','DELETE\x5cs+FROM','column','matchAll','\x22\x20中不存在','\x22\x20在表\x20\x22','SQL\x20content\x20cannot\x20be\x20empty','47017LzcRiV','reason','toUpperCase','includes','price','415744TDwzAe','replace','string','push','Params:\x20','trim','8WyvbFa','example','ALTER\x5cs+(TABLE|DATABASE)','filter','1993968nLpDFs','2915955omSdGM','joins','INSERT\x5cs+INTO','TABLE_NOT_FOUND','add','461019QASzlf','has','字段\x20\x22','length','parameters','TRUNCATE','1534495YDChhp','limit','columns','map','确保\x20SQL\x20语句以\x20SELECT\x20关键字开头','name','count','toLowerCase','join','keys','slice','\x22\x20在数据库\x20schema\x20中不存在','221912AAnhnh','Joins:\x20','表\x20\x22','21ryYqRv','test','number','SYNTAX_ERROR','CREATE\x5cs+(TABLE|INDEX|DATABASE|VIEW)','split','page','\x5c\x5cs+','REVOKE','time','num','from'];a24_0x1146=function(){return _0x204d81;};return a24_0x1146();}export function extractTableNames(_0x3a262e){const _0x3784d1=parseSqlStructure(_0x3a262e);return _0x3784d1['tables'];}export function extractColumnNames(_0x5885bd){const _0x1b2c38=a24_0x4d32,_0x226470=parseSqlStructure(_0x5885bd);return _0x226470['columns']['map'](_0x35ca17=>({'table':_0x35ca17[_0x1b2c38(0x1b7)],'column':_0x35ca17[_0x1b2c38(0x1be)]}));}export function extractParameters(_0x4b576a){const _0x7fed95=a24_0x4d32,_0x50f9c1=parseSqlStructure(_0x4b576a);return _0x50f9c1[_0x7fed95(0x1dc)];}export function validateSqlContent(_0x23af3f,_0x33e1a7){const _0xd8e928=a24_0x4d32,_0x7d56b7=validateIsSelectOnly(_0x23af3f);if(!_0x7d56b7['valid'])return{'valid':![],'isSelectOnly':![],'errors':[createStructuredSqlError({'type':_0xd8e928(0x1a5),'location':'SQL_START','message':_0x7d56b7[_0xd8e928(0x1c4)]||_0xd8e928(0x1ba),'severity':_0xd8e928(0x1b4),'fixSteps':[{'description':_0xd8e928(0x197),'example':'SELECT\x20id,\x20name\x20FROM\x20customer\x20WHERE\x20status\x20=\x201'}]})]};const _0x42a834=parseSqlStructure(_0x23af3f),_0x10e56c=[];if(_0x33e1a7){const _0x5c593d=new Map(_0x33e1a7[_0xd8e928(0x1b1)][_0xd8e928(0x1e1)](_0x1216ec=>[_0x1216ec[_0xd8e928(0x1ae)][_0xd8e928(0x19a)](),_0x1216ec[_0xd8e928(0x1e0)][_0xd8e928(0x1e1)](_0x176eda=>_0x176eda[_0xd8e928(0x19a)]())]));for(const _0x3a1ec6 of _0x42a834[_0xd8e928(0x1b1)]){const _0x4b2560=_0x3a1ec6['toLowerCase']();if(!_0x5c593d[_0xd8e928(0x1d9)](_0x4b2560)){const _0x3bfaad=Array['from'](_0x5c593d['keys']())[_0xd8e928(0x1d1)](_0x57da15=>_0x57da15[_0xd8e928(0x1c6)](_0x4b2560)||_0x4b2560[_0xd8e928(0x1c6)](_0x57da15));_0x10e56c[_0xd8e928(0x1cb)](createStructuredSqlError({'type':_0xd8e928(0x1d6),'location':_0x3a1ec6,'message':_0xd8e928(0x1a1)+_0x3a1ec6+_0xd8e928(0x19e),'severity':'error','suggestions':_0x3bfaad['length']>0x0?_0x3bfaad:Array[_0xd8e928(0x1ad)](_0x5c593d[_0xd8e928(0x19c)]())}));}}for(const _0x70e66d of _0x42a834[_0xd8e928(0x1e0)]){if(_0x70e66d[_0xd8e928(0x1b7)]){const _0x46995e=_0x70e66d[_0xd8e928(0x1b7)][_0xd8e928(0x19a)](),_0x11d9c5=_0x5c593d[_0xd8e928(0x1b8)](_0x46995e);if(_0x11d9c5){const _0x1bd284=_0x70e66d[_0xd8e928(0x1be)][_0xd8e928(0x19a)]();if(!_0x11d9c5[_0xd8e928(0x1c6)](_0x1bd284)&&!_0x70e66d['column'][_0xd8e928(0x1c6)]('*')){const _0x3adfc3=_0x11d9c5[_0xd8e928(0x1d1)](_0x5c7eac=>_0x5c7eac[_0xd8e928(0x1c6)](_0x1bd284)||_0x1bd284['includes'](_0x5c7eac));_0x10e56c[_0xd8e928(0x1cb)](createStructuredSqlError({'type':'COLUMN_NOT_FOUND','location':_0x70e66d[_0xd8e928(0x1b7)]+'.'+_0x70e66d['column'],'message':_0xd8e928(0x1da)+_0x70e66d['column']+_0xd8e928(0x1c1)+_0x70e66d['table']+_0xd8e928(0x1c0),'severity':_0xd8e928(0x1b4),'suggestions':_0x3adfc3['length']>0x0?_0x3adfc3:_0x11d9c5[_0xd8e928(0x19d)](0x0,0xa)}));}}}}}return{'valid':_0x10e56c[_0xd8e928(0x1db)]===0x0,'isSelectOnly':!![],'parsedStructure':_0x42a834,'errors':_0x10e56c['length']>0x0?_0x10e56c:undefined};}export function generateSqlSummary(_0x1cce22){const _0xf1504c=a24_0x4d32,_0x1cfa98=parseSqlStructure(_0x1cce22),_0x5d9e38=[];return _0x1cfa98['tables'][_0xf1504c(0x1db)]>0x0&&_0x5d9e38[_0xf1504c(0x1cb)]('Tables:\x20'+_0x1cfa98[_0xf1504c(0x1b1)][_0xf1504c(0x19b)](',\x20')),_0x1cfa98[_0xf1504c(0x1dc)][_0xf1504c(0x1db)]>0x0&&_0x5d9e38[_0xf1504c(0x1cb)](_0xf1504c(0x1cc)+_0x1cfa98[_0xf1504c(0x1dc)][_0xf1504c(0x1e1)](_0x4cfe2a=>_0x4cfe2a[_0xf1504c(0x198)])[_0xf1504c(0x19b)](',\x20')),_0x1cfa98['joins']&&_0x1cfa98[_0xf1504c(0x1d4)][_0xf1504c(0x1db)]>0x0&&_0x5d9e38[_0xf1504c(0x1cb)](_0xf1504c(0x1a0)+_0x1cfa98[_0xf1504c(0x1d4)][_0xf1504c(0x1db)]),_0x5d9e38['length']>0x0?_0x5d9e38[_0xf1504c(0x19b)](_0xf1504c(0x1bc)):'SELECT\x20query';}
|
|
1
|
+
(function(_0xef3225,_0x11e057){const _0x3bba3e=a24_0x4b77,_0x112d64=_0xef3225();while(!![]){try{const _0x402a0a=parseInt(_0x3bba3e(0x1b8))/0x1+parseInt(_0x3bba3e(0x19c))/0x2*(parseInt(_0x3bba3e(0x1cd))/0x3)+-parseInt(_0x3bba3e(0x1a1))/0x4*(parseInt(_0x3bba3e(0x1a5))/0x5)+parseInt(_0x3bba3e(0x1a9))/0x6*(parseInt(_0x3bba3e(0x1d7))/0x7)+parseInt(_0x3bba3e(0x19d))/0x8+-parseInt(_0x3bba3e(0x1df))/0x9*(parseInt(_0x3bba3e(0x1de))/0xa)+parseInt(_0x3bba3e(0x1d3))/0xb*(-parseInt(_0x3bba3e(0x1bc))/0xc);if(_0x402a0a===_0x11e057)break;else _0x112d64['push'](_0x112d64['shift']());}catch(_0x3c91be){_0x112d64['push'](_0x112d64['shift']());}}}(a24_0x5a38,0x5e397));import{createStructuredSqlError}from'../types/mcp-types.js';export function parseSqlStructure(_0x4f5836){const _0x33e21a=a24_0x4b77,_0x9fa466={'tables':[],'columns':[],'parameters':[],'joins':[]};if(!_0x4f5836||typeof _0x4f5836!=='string')return _0x9fa466;const _0xee26e3=_0x4f5836[_0x33e21a(0x1c3)](/#\{[^}]*\}/g,'?')[_0x33e21a(0x1c3)](/\$\{[^}]*\}/g,'?')[_0x33e21a(0x1c3)](/'[^']*'/g,'\x27\x27')['replace'](/--.*$/gm,'')[_0x33e21a(0x1c3)](/\/\*[\s\S]*?\*\//g,''),_0x29a079=_0xee26e3[_0x33e21a(0x1db)](/FROM\s+([^\s,)(]+)/i);if(_0x29a079){const _0x431e76=_0x29a079[0x1][_0x33e21a(0x1c3)](/[`"]/g,'');_0x9fa466[_0x33e21a(0x1b5)][_0x33e21a(0x1a3)](_0x431e76);}const _0x13e9ca=_0xee26e3[_0x33e21a(0x1d4)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi);for(const _0x15b1d7 of _0x13e9ca){const _0x3accdc=_0x15b1d7[0x1]['replace'](/[`"]/g,'');_0x3accdc&&!_0x9fa466[_0x33e21a(0x1b5)]['includes'](_0x3accdc)&&_0x9fa466['tables']['push'](_0x3accdc);}const _0x2edb4e=_0xee26e3[_0x33e21a(0x1db)](/SELECT\s+([\s\S]+?)\s+FROM/i);if(_0x2edb4e){const _0x421ab5=_0x2edb4e[0x1]['trim']();if(_0x421ab5!=='*'){const _0x3cd1be=splitSqlColumns(_0x421ab5);for(const _0x5970ff of _0x3cd1be){const _0x5a59d9=_0x5970ff['trim']();if(_0x5a59d9&&!_0x5a59d9['match'](/^\d+$/)){const _0x4fb743=_0x5a59d9[_0x33e21a(0x1a2)](/\s+AS\s+/i),_0x546705=_0x4fb743[0x0][_0x33e21a(0x1aa)](),_0xd483ee=_0x4fb743[0x1]?.[_0x33e21a(0x1aa)]();if(_0x546705[_0x33e21a(0x1c7)]('.')){const [_0x524954,_0x335218]=_0x546705['split']('.');_0x9fa466[_0x33e21a(0x1d9)]['push']({'table':_0x524954[_0x33e21a(0x1aa)](),'column':_0x335218[_0x33e21a(0x1c3)](/[`"]/g,'')[_0x33e21a(0x1aa)](),'alias':_0xd483ee});}else!_0x546705['includes']('(')&&_0x9fa466[_0x33e21a(0x1d9)]['push']({'table':'','column':_0x546705[_0x33e21a(0x1c3)](/[`"]/g,''),'alias':_0xd483ee});}}}}const _0x59047d=_0xee26e3[_0x33e21a(0x1d4)](/JOIN\s+(\w+)\s+(?:AS\s+)?(\w+)?\s+ON\s+([\w.]+)\s*=\s*([\w.]+)/gi);for(const _0x1024e3 of _0x59047d){const [,,,_0x3e076f,_0x16427c]=_0x1024e3;if(_0x3e076f&&_0x16427c){const [_0x47027e,_0x8d9c30]=_0x3e076f[_0x33e21a(0x1c7)]('.')?_0x3e076f[_0x33e21a(0x1a2)]('.'):['',_0x3e076f],[_0x4d8ec0,_0x19d3fb]=_0x16427c[_0x33e21a(0x1c7)]('.')?_0x16427c[_0x33e21a(0x1a2)]('.'):['',_0x16427c];_0x9fa466[_0x33e21a(0x1c9)]?.[_0x33e21a(0x1a3)]({'leftTable':_0x47027e,'leftColumn':_0x8d9c30,'rightTable':_0x4d8ec0,'rightColumn':_0x19d3fb});}}const _0x2c2363=_0x4f5836[_0x33e21a(0x1d4)](/[#\$]\{(\w+)\}/g),_0x52e44d=new Set();for(const _0xa9f955 of _0x2c2363){const _0x35d1b8=_0xa9f955[0x1];!_0x52e44d[_0x33e21a(0x1c5)](_0x35d1b8)&&(_0x52e44d[_0x33e21a(0x1b7)](_0x35d1b8),_0x9fa466[_0x33e21a(0x1ca)][_0x33e21a(0x1a3)]({'name':_0x35d1b8,'type':inferParamType(_0x35d1b8),'example':getExampleValue(_0x35d1b8)}));}return _0x9fa466;}function splitSqlColumns(_0x33f6ac){const _0x4eb49a=a24_0x4b77,_0x4bfe83=[];let _0x4dce7a='',_0x423703=0x0;for(let _0x4e45b0=0x0;_0x4e45b0<_0x33f6ac['length'];_0x4e45b0++){const _0x337116=_0x33f6ac[_0x4e45b0];if(_0x337116==='(')_0x423703++,_0x4dce7a+=_0x337116;else{if(_0x337116===')')_0x423703--,_0x4dce7a+=_0x337116;else _0x337116===','&&_0x423703===0x0?(_0x4bfe83[_0x4eb49a(0x1a3)](_0x4dce7a),_0x4dce7a=''):_0x4dce7a+=_0x337116;}}return _0x4dce7a&&_0x4bfe83['push'](_0x4dce7a),_0x4bfe83;}function a24_0x4b77(_0x15a056,_0x46c3df){_0x15a056=_0x15a056-0x19a;const _0x5a3870=a24_0x5a38();let _0x4b773e=_0x5a3870[_0x15a056];return _0x4b773e;}function inferParamType(_0xdaabf1){const _0x8892f4=a24_0x4b77,_0x18ab43=_0xdaabf1[_0x8892f4(0x1e8)]();if(_0x18ab43[_0x8892f4(0x1c7)]('id')||_0x18ab43['includes'](_0x8892f4(0x1d8))||_0x18ab43[_0x8892f4(0x1c7)](_0x8892f4(0x1c6))||_0x18ab43['includes'](_0x8892f4(0x1b6))||_0x18ab43[_0x8892f4(0x1c7)](_0x8892f4(0x1e4))||_0x18ab43[_0x8892f4(0x1c7)](_0x8892f4(0x1ce))||_0x18ab43[_0x8892f4(0x1c7)](_0x8892f4(0x1e1))||_0x18ab43['includes'](_0x8892f4(0x19f)))return _0x8892f4(0x1ad);return _0x8892f4(0x1e3);}function getExampleValue(_0x4204b8){const _0x98df27=a24_0x4b77,_0x10eabf=_0x4204b8[_0x98df27(0x1e8)](),_0x5ae7a2=inferParamType(_0x10eabf);if(_0x5ae7a2===_0x98df27(0x1ad)){if(_0x10eabf[_0x98df27(0x1c7)](_0x98df27(0x1c6))||_0x10eabf[_0x98df27(0x1c7)](_0x98df27(0x1d8))||_0x10eabf['includes'](_0x98df27(0x1b6)))return 0xa;if(_0x10eabf[_0x98df27(0x1c7)](_0x98df27(0x1e4)))return 0x1;return 0x7b;}if(_0x10eabf['includes'](_0x98df27(0x1d2))||_0x10eabf[_0x98df27(0x1c7)](_0x98df27(0x1ab)))return _0x98df27(0x1c0);if(_0x10eabf[_0x98df27(0x1c7)](_0x98df27(0x1b2)))return'1';if(_0x10eabf[_0x98df27(0x1c7)](_0x98df27(0x1d6))||_0x10eabf[_0x98df27(0x1c7)](_0x98df27(0x1bb))||_0x10eabf['includes'](_0x98df27(0x1c4)))return'example';return _0x98df27(0x1da);}export function validateIsSelectOnly(_0xe4592b){const _0x26e713=a24_0x4b77;if(!_0xe4592b||typeof _0xe4592b!==_0x26e713(0x1e3))return{'valid':![],'reason':'SQL\x20content\x20cannot\x20be\x20empty'};const _0x3b98f1=_0xe4592b[_0x26e713(0x1c3)](/#\{[^}]*\}/g,'?')[_0x26e713(0x1c3)](/\$\{[^}]*\}/g,'?')[_0x26e713(0x1c3)](/@[^(\s]+(\([^)]*\))?/g,''),_0x348b69=_0x3b98f1[_0x26e713(0x1aa)](),_0x18166c=_0x348b69[_0x26e713(0x1a2)]('\x0a');let _0x595eee='';for(const _0x1e7bf4 of _0x18166c){const _0x27f920=_0x1e7bf4[_0x26e713(0x1aa)]();if(!_0x27f920||_0x27f920[_0x26e713(0x1a4)]('--')||_0x27f920[_0x26e713(0x1a4)]('/*'))continue;_0x595eee=_0x27f920;break;}if(!_0x595eee[_0x26e713(0x1c1)]()[_0x26e713(0x1a4)]('SELECT'))return{'valid':![],'reason':_0x26e713(0x1ac)};const _0x405755=['INSERT\x5cs+INTO',_0x26e713(0x1d1),'DELETE\x5cs+FROM','DROP\x5cs+(TABLE|INDEX|DATABASE)','ALTER\x5cs+(TABLE|DATABASE)',_0x26e713(0x1d0),'TRUNCATE',_0x26e713(0x1a8),_0x26e713(0x1e2),_0x26e713(0x1e9),_0x26e713(0x1cc)],_0x1b21ce=_0x348b69['toUpperCase']();for(const _0x25f2ab of _0x405755){const _0x172954=new RegExp(_0x25f2ab,'i');if(_0x172954[_0x26e713(0x1bf)](_0x1b21ce))return{'valid':![],'reason':_0x26e713(0x1be)+_0x25f2ab[_0x26e713(0x1c3)](_0x26e713(0x1dd),'\x20')+_0x26e713(0x1bd)};}return{'valid':!![]};}function a24_0x5a38(){const _0x3f36db=['2024-01-01','toUpperCase','valid','replace','name','has','limit','includes','字段\x20\x22','joins','parameters','确保\x20SQL\x20语句以\x20SELECT\x20关键字开头','EXECUTE','75trNdmj','num','表\x20\x22','CREATE\x5cs+(TABLE|INDEX|DATABASE|VIEW)','UPDATE\x5cs+\x5cw+\x5cs+SET','date','1075547FCRfEg','matchAll','column','keyword','57547oAFggM','count','columns','value','match','TABLE_NOT_FOUND','\x5c\x5cs+','223180VuEPOF','117XvyxVn','SELECT\x20id,\x20name\x20FROM\x20customer\x20WHERE\x20status\x20=\x201','amount','REVOKE','string','page','Tables:\x20','length','SQL_START','toLowerCase','EXEC','Joins:\x20','Params:\x20','slice','40232KeahCY','2154560UnJRTw','SQL\x20必须以\x20SELECT\x20开头','price','\x22\x20在表\x20\x22','24bPNHmZ','split','push','startsWith','502965uABCnf','\x22\x20中不存在','get','GRANT','414EtisgT','trim','time','Only\x20SELECT\x20queries\x20are\x20allowed.\x20The\x20SQL\x20must\x20start\x20with\x20SELECT\x20(after\x20any\x20comments).','number','filter','tableName','map','join','status','COLUMN_NOT_FOUND','from','tables','size','add','233497llQdZE','table','error','search','36zQssLh','.\x20Only\x20SELECT\x20queries\x20are\x20allowed.','Forbidden\x20keyword\x20detected:\x20','test'];a24_0x5a38=function(){return _0x3f36db;};return a24_0x5a38();}export function extractTableNames(_0x3e9033){const _0x5e1f4f=a24_0x4b77,_0x5bb698=parseSqlStructure(_0x3e9033);return _0x5bb698[_0x5e1f4f(0x1b5)];}export function extractColumnNames(_0x54e8e4){const _0x328005=a24_0x4b77,_0x381600=parseSqlStructure(_0x54e8e4);return _0x381600[_0x328005(0x1d9)][_0x328005(0x1b0)](_0x52a18c=>({'table':_0x52a18c[_0x328005(0x1b9)],'column':_0x52a18c[_0x328005(0x1d5)]}));}export function extractParameters(_0x2adf86){const _0x1087ac=a24_0x4b77,_0x10a7c8=parseSqlStructure(_0x2adf86);return _0x10a7c8[_0x1087ac(0x1ca)];}export function validateSqlContent(_0x42dcba,_0x31a66f){const _0x4162c9=a24_0x4b77,_0x4fbe54=validateIsSelectOnly(_0x42dcba);if(!_0x4fbe54[_0x4162c9(0x1c2)])return{'valid':![],'isSelectOnly':![],'errors':[createStructuredSqlError({'type':'SYNTAX_ERROR','location':_0x4162c9(0x1e7),'message':_0x4fbe54['reason']||_0x4162c9(0x19e),'severity':_0x4162c9(0x1ba),'fixSteps':[{'description':_0x4162c9(0x1cb),'example':_0x4162c9(0x1e0)}]})]};const _0x3209c1=parseSqlStructure(_0x42dcba),_0x3642ff=[];if(_0x31a66f){const _0x30edac=new Map(_0x31a66f['tables']['map'](_0x29926d=>[_0x29926d[_0x4162c9(0x1af)][_0x4162c9(0x1e8)](),_0x29926d[_0x4162c9(0x1d9)]['map'](_0x5b442a=>_0x5b442a[_0x4162c9(0x1e8)]())]));for(const _0x538cb5 of _0x3209c1['tables']){const _0x82d1b8=_0x538cb5['toLowerCase']();if(!_0x30edac['has'](_0x82d1b8)){const _0xa19687=Array['from'](_0x30edac['keys']())[_0x4162c9(0x1ae)](_0xbf6819=>_0xbf6819[_0x4162c9(0x1c7)](_0x82d1b8)||_0x82d1b8['includes'](_0xbf6819));_0x3642ff[_0x4162c9(0x1a3)](createStructuredSqlError({'type':_0x4162c9(0x1dc),'location':_0x538cb5,'message':_0x4162c9(0x1cf)+_0x538cb5+'\x22\x20在数据库\x20schema\x20中不存在','severity':_0x4162c9(0x1ba),'suggestions':_0xa19687[_0x4162c9(0x1e6)]>0x0?_0xa19687:Array[_0x4162c9(0x1b4)](_0x30edac['keys']())}));}}for(const _0x44003b of _0x3209c1[_0x4162c9(0x1d9)]){if(_0x44003b[_0x4162c9(0x1b9)]){const _0x558d21=_0x44003b[_0x4162c9(0x1b9)][_0x4162c9(0x1e8)](),_0x5d1edc=_0x30edac[_0x4162c9(0x1a7)](_0x558d21);if(_0x5d1edc){const _0x30f6f2=_0x44003b[_0x4162c9(0x1d5)][_0x4162c9(0x1e8)]();if(!_0x5d1edc[_0x4162c9(0x1c7)](_0x30f6f2)&&!_0x44003b[_0x4162c9(0x1d5)][_0x4162c9(0x1c7)]('*')){const _0x1ff442=_0x5d1edc[_0x4162c9(0x1ae)](_0x20302b=>_0x20302b[_0x4162c9(0x1c7)](_0x30f6f2)||_0x30f6f2['includes'](_0x20302b));_0x3642ff['push'](createStructuredSqlError({'type':_0x4162c9(0x1b3),'location':_0x44003b[_0x4162c9(0x1b9)]+'.'+_0x44003b[_0x4162c9(0x1d5)],'message':_0x4162c9(0x1c8)+_0x44003b[_0x4162c9(0x1d5)]+_0x4162c9(0x1a0)+_0x44003b[_0x4162c9(0x1b9)]+_0x4162c9(0x1a6),'severity':_0x4162c9(0x1ba),'suggestions':_0x1ff442[_0x4162c9(0x1e6)]>0x0?_0x1ff442:_0x5d1edc[_0x4162c9(0x19b)](0x0,0xa)}));}}}}}return{'valid':_0x3642ff[_0x4162c9(0x1e6)]===0x0,'isSelectOnly':!![],'parsedStructure':_0x3209c1,'errors':_0x3642ff[_0x4162c9(0x1e6)]>0x0?_0x3642ff:undefined};}export function generateSqlSummary(_0x224c28){const _0x3f4ac0=a24_0x4b77,_0x11a443=parseSqlStructure(_0x224c28),_0x272973=[];return _0x11a443[_0x3f4ac0(0x1b5)][_0x3f4ac0(0x1e6)]>0x0&&_0x272973[_0x3f4ac0(0x1a3)](_0x3f4ac0(0x1e5)+_0x11a443['tables'][_0x3f4ac0(0x1b1)](',\x20')),_0x11a443[_0x3f4ac0(0x1ca)][_0x3f4ac0(0x1e6)]>0x0&&_0x272973[_0x3f4ac0(0x1a3)](_0x3f4ac0(0x19a)+_0x11a443[_0x3f4ac0(0x1ca)][_0x3f4ac0(0x1b0)](_0xcee58e=>_0xcee58e[_0x3f4ac0(0x1c4)])[_0x3f4ac0(0x1b1)](',\x20')),_0x11a443[_0x3f4ac0(0x1c9)]&&_0x11a443[_0x3f4ac0(0x1c9)][_0x3f4ac0(0x1e6)]>0x0&&_0x272973[_0x3f4ac0(0x1a3)](_0x3f4ac0(0x1ea)+_0x11a443[_0x3f4ac0(0x1c9)][_0x3f4ac0(0x1e6)]),_0x272973[_0x3f4ac0(0x1e6)]>0x0?_0x272973['join']('\x20|\x20'):'SELECT\x20query';}
|