mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
3.4 KiB
JSON
1 line
3.4 KiB
JSON
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { ObjectConditionOperator } from '../Operators/Object-condition-operator.js';\nexport class filter {\n constructor(arg, TableSchema) {\n this.arg = arg;\n this.TableSchema = TableSchema;\n this.rows = [];\n this.operator = new ObjectConditionOperator(this.TableSchema, this.arg);\n }\n cursor(row, resolve, limit) {\n var _this = this;\n return _asyncToGenerator(function* () {\n const operationsResult = yield _this.operator.run(row);\n if (operationsResult == true) {\n _this.rows.push(row);\n if (_this.rows.length == limit) {\n resolve(_this.rows);\n }\n }\n })();\n }\n run(rows) {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n const newRows = [];\n for (let row of rows) {\n const operationsResult = yield _this2.operator.run(row);\n if (operationsResult == true) {\n newRows.push(row);\n }\n }\n return newRows;\n })();\n }\n}","map":{"version":3,"names":["ObjectConditionOperator","filter","constructor","arg","TableSchema","rows","operator","cursor","row","resolve","limit","_this","_asyncToGenerator","operationsResult","run","push","length","_this2","newRows"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/beast-orm/dist/src/sql/methods/filter.js"],"sourcesContent":["import { ObjectConditionOperator } from '../Operators/Object-condition-operator.js';\r\nexport class filter {\r\n constructor(arg, TableSchema) {\r\n this.arg = arg;\r\n this.TableSchema = TableSchema;\r\n this.rows = [];\r\n this.operator = new ObjectConditionOperator(this.TableSchema, this.arg);\r\n }\r\n async cursor(row, resolve, limit) {\r\n const operationsResult = await this.operator.run(row);\r\n if (operationsResult == true) {\r\n this.rows.push(row);\r\n if (this.rows.length == limit) {\r\n resolve(this.rows);\r\n }\r\n }\r\n }\r\n async run(rows) {\r\n const newRows = [];\r\n for (let row of rows) {\r\n const operationsResult = await this.operator.run(row);\r\n if (operationsResult == true) {\r\n newRows.push(row);\r\n }\r\n }\r\n return newRows;\r\n }\r\n}\r\n"],"mappings":";AAAA,SAASA,uBAAuB,QAAQ,2CAA2C;AACnF,OAAO,MAAMC,MAAM,CAAC;EAChBC,WAAWA,CAACC,GAAG,EAAEC,WAAW,EAAE;IAC1B,IAAI,CAACD,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,IAAI,GAAG,EAAE;IACd,IAAI,CAACC,QAAQ,GAAG,IAAIN,uBAAuB,CAAC,IAAI,CAACI,WAAW,EAAE,IAAI,CAACD,GAAG,CAAC;EAC3E;EACMI,MAAMA,CAACC,GAAG,EAAEC,OAAO,EAAEC,KAAK,EAAE;IAAA,IAAAC,KAAA;IAAA,OAAAC,iBAAA;MAC9B,MAAMC,gBAAgB,SAASF,KAAI,CAACL,QAAQ,CAACQ,GAAG,CAACN,GAAG,CAAC;MACrD,IAAIK,gBAAgB,IAAI,IAAI,EAAE;QAC1BF,KAAI,CAACN,IAAI,CAACU,IAAI,CAACP,GAAG,CAAC;QACnB,IAAIG,KAAI,CAACN,IAAI,CAACW,MAAM,IAAIN,KAAK,EAAE;UAC3BD,OAAO,CAACE,KAAI,CAACN,IAAI,CAAC;QACtB;MACJ;IAAC;EACL;EACMS,GAAGA,CAACT,IAAI,EAAE;IAAA,IAAAY,MAAA;IAAA,OAAAL,iBAAA;MACZ,MAAMM,OAAO,GAAG,EAAE;MAClB,KAAK,IAAIV,GAAG,IAAIH,IAAI,EAAE;QAClB,MAAMQ,gBAAgB,SAASI,MAAI,CAACX,QAAQ,CAACQ,GAAG,CAACN,GAAG,CAAC;QACrD,IAAIK,gBAAgB,IAAI,IAAI,EAAE;UAC1BK,OAAO,CAACH,IAAI,CAACP,GAAG,CAAC;QACrB;MACJ;MACA,OAAOU,OAAO;IAAC;EACnB;AACJ"},"metadata":{},"sourceType":"module"} |