1 line
15 KiB
JSON
1 line
15 KiB
JSON
|
{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DescribeResult = exports.CursorEntry = exports.BatchResult = exports.StmtResult = exports.Error = void 0;\nexports.Error = {\n default() {\n return {\n message: \"\",\n code: undefined\n };\n },\n 1(r, msg) {\n msg.message = r.string();\n },\n 2(r, msg) {\n msg.code = r.string();\n }\n};\nexports.StmtResult = {\n default() {\n return {\n cols: [],\n rows: [],\n affectedRowCount: 0,\n lastInsertRowid: undefined\n };\n },\n 1(r, msg) {\n msg.cols.push(r.message(Col));\n },\n 2(r, msg) {\n msg.rows.push(r.message(Row));\n },\n 3(r, msg) {\n msg.affectedRowCount = Number(r.uint64());\n },\n 4(r, msg) {\n msg.lastInsertRowid = r.sint64();\n }\n};\nconst Col = {\n default() {\n return {\n name: undefined,\n decltype: undefined\n };\n },\n 1(r, msg) {\n msg.name = r.string();\n },\n 2(r, msg) {\n msg.decltype = r.string();\n }\n};\nconst Row = {\n default() {\n return [];\n },\n 1(r, msg) {\n msg.push(r.message(Value));\n }\n};\nexports.BatchResult = {\n default() {\n return {\n stepResults: new Map(),\n stepErrors: new Map()\n };\n },\n 1(r, msg) {\n const [key, value] = r.message(BatchResultStepResult);\n msg.stepResults.set(key, value);\n },\n 2(r, msg) {\n const [key, value] = r.message(BatchResultStepError);\n msg.stepErrors.set(key, value);\n }\n};\nconst BatchResultStepResult = {\n default() {\n return [0, exports.StmtResult.default()];\n },\n 1(r, msg) {\n msg[0] = r.uint32();\n },\n 2(r, msg) {\n msg[1] = r.message(exports.StmtResult);\n }\n};\nconst BatchResultStepError = {\n default() {\n return [0, exports.Error.default()];\n },\n 1(r, msg) {\n msg[0] = r.uint32();\n },\n 2(r, msg) {\n msg[1] = r.message(exports.Error);\n }\n};\nexports.CursorEntry = {\n default() {\n return {\n type: \"none\"\n };\n },\n 1(r) {\n return r.message(StepBeginEntry);\n },\n 2(r) {\n return r.message(StepEndEntry);\n },\n 3(r) {\n return r.message(StepErrorEntry);\n },\n 4(r) {\n return {\n type: \"row\",\n row: r.message(Row)\n };\n },\n 5(r) {\n return {\n type: \"error\",\n error: r.message(exports.Error)\n };\n }\n};\nconst StepBeginEntry = {\n default() {\n return {\n type: \"step_begin\",\n step: 0,\n cols: []\n };\n },\n 1(r, msg) {\n msg.step = r.uint32();\n },\n 2(r, msg) {\n msg.cols.push(r.message(Col));\n }\n};\nconst StepEndEntry = {\n default() {\n return {\n type: \"step_end\",\n affectedRowCount: 0,\n lastInsertRowid: undefined\n };\n },\n 1(r, msg) {\n msg.affectedRowCount = r.uint32();\n },\n 2(r, msg) {\n msg.lastInsertRowid = r.uint64();\n }\n};\nconst StepErrorEntry = {\n default() {\n return {\n type: \"step_error\",\n step: 0,\n error: exports.Error.default()\n };\n },\n 1(r, msg) {\n msg.step = r.uint32();\n },\n 2(r, msg) {\n msg.error = r.message(exports.Error);\n }\n};\nexports.DescribeResult = {\n default() {\n return {\n params: [],\n cols: [],\n isExplain: false,\n isReadonly: false\n };\n },\n 1(r, msg) {\n msg.params.push(r.message(DescribeParam));\n },\n 2(r, msg) {\n msg.cols.push(r.message(DescribeCol));\n },\n 3(r, msg) {\n msg.isExplain = r.bool();\n },\n 4(r, msg) {\n msg.isReadonly = r.bool();\n }\n};\nconst DescribeParam = {\n default() {\n return {\n name: undefined\n };\n },\n 1(r, msg) {\n msg.name = r.string();\n }\n};\nconst DescribeCol = {\n default() {\n return {\n name: \"\",\n decltype: undefined\n };\n },\n 1(r, msg) {\n msg.name = r.string();\n },\n 2(r, msg) {\n msg.decltype = r.string();\n }\n};\nconst Value = {\n default() {\n return undefined;\n },\n 1(r) {\n return null;\n },\n 2(r) {\n return r.sint64();\n },\n 3(r) {\n
|