1 line
10 KiB
JSON
1 line
10 KiB
JSON
{"ast":null,"code":"import { Error, StmtResult, BatchResult, CursorEntry, DescribeResult } from \"../shared/protobuf_decode.js\";\nexport const ServerMsg = {\n default() {\n return {\n type: \"none\"\n };\n },\n 1(r) {\n return {\n type: \"hello_ok\"\n };\n },\n 2(r) {\n return r.message(HelloErrorMsg);\n },\n 3(r) {\n return r.message(ResponseOkMsg);\n },\n 4(r) {\n return r.message(ResponseErrorMsg);\n }\n};\nconst HelloErrorMsg = {\n default() {\n return {\n type: \"hello_error\",\n error: Error.default()\n };\n },\n 1(r, msg) {\n msg.error = r.message(Error);\n }\n};\nconst ResponseErrorMsg = {\n default() {\n return {\n type: \"response_error\",\n requestId: 0,\n error: Error.default()\n };\n },\n 1(r, msg) {\n msg.requestId = r.int32();\n },\n 2(r, msg) {\n msg.error = r.message(Error);\n }\n};\nconst ResponseOkMsg = {\n default() {\n return {\n type: \"response_ok\",\n requestId: 0,\n response: {\n type: \"none\"\n }\n };\n },\n 1(r, msg) {\n msg.requestId = r.int32();\n },\n 2(r, msg) {\n msg.response = {\n type: \"open_stream\"\n };\n },\n 3(r, msg) {\n msg.response = {\n type: \"close_stream\"\n };\n },\n 4(r, msg) {\n msg.response = r.message(ExecuteResp);\n },\n 5(r, msg) {\n msg.response = r.message(BatchResp);\n },\n 6(r, msg) {\n msg.response = {\n type: \"open_cursor\"\n };\n },\n 7(r, msg) {\n msg.response = {\n type: \"close_cursor\"\n };\n },\n 8(r, msg) {\n msg.response = r.message(FetchCursorResp);\n },\n 9(r, msg) {\n msg.response = {\n type: \"sequence\"\n };\n },\n 10(r, msg) {\n msg.response = r.message(DescribeResp);\n },\n 11(r, msg) {\n msg.response = {\n type: \"store_sql\"\n };\n },\n 12(r, msg) {\n msg.response = {\n type: \"close_sql\"\n };\n },\n 13(r, msg) {\n msg.response = r.message(GetAutocommitResp);\n }\n};\nconst ExecuteResp = {\n default() {\n return {\n type: \"execute\",\n result: StmtResult.default()\n };\n },\n 1(r, msg) {\n msg.result = r.message(StmtResult);\n }\n};\nconst BatchResp = {\n default() {\n return {\n type: \"batch\",\n result: BatchResult.default()\n };\n },\n 1(r, msg) {\n msg.result = r.message(BatchResult);\n }\n};\nconst FetchCursorResp = {\n default() {\n return {\n type: \"fetch_cursor\",\n entries: [],\n done: false\n };\n },\n 1(r, msg) {\n msg.entries.push(r.message(CursorEntry));\n },\n 2(r, msg) {\n msg.done = r.bool();\n }\n};\nconst DescribeResp = {\n default() {\n return {\n type: \"describe\",\n result: DescribeResult.default()\n };\n },\n 1(r, msg) {\n msg.result = r.message(DescribeResult);\n }\n};\nconst GetAutocommitResp = {\n default() {\n return {\n type: \"get_autocommit\",\n isAutocommit: false\n };\n },\n 1(r, msg) {\n msg.isAutocommit = r.bool();\n }\n};","map":{"version":3,"names":["Error","StmtResult","BatchResult","CursorEntry","DescribeResult","ServerMsg","default","type","r","message","HelloErrorMsg","ResponseOkMsg","ResponseErrorMsg","error","msg","requestId","int32","response","ExecuteResp","BatchResp","FetchCursorResp","DescribeResp","GetAutocommitResp","result","entries","done","push","bool","isAutocommit"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/hrana-client/lib-esm/ws/protobuf_decode.js"],"sourcesContent":["import { Error, StmtResult, BatchResult, CursorEntry, DescribeResult } from \"../shared/protobuf_decode.js\";\nexport const ServerMsg = {\n default() { return { type: \"none\" }; },\n 1(r) { return { type: \"hello_ok\" }; },\n 2(r) { return r.message(HelloErrorMsg); },\n 3(r) { return r.message(ResponseOkMsg); },\n 4(r) { return r.message(ResponseErrorMsg); },\n};\nconst HelloErrorMsg = {\n default() { return { type: \"hello_error\", error: Error.default() }; },\n 1(r, msg) { msg.error = r.message(Error); },\n};\nconst ResponseErrorMsg = {\n default() { return { type: \"response_error\", requestId: 0, error: Error.default() }; },\n 1(r, msg) { msg.requestId = r.int32(); },\n 2(r, msg) { msg.error = r.message(Error); },\n};\nconst ResponseOkMsg = {\n default() {\n return {\n type: \"response_ok\",\n requestId: 0,\n response: { type: \"none\" },\n };\n },\n 1(r, msg) { msg.requestId = r.int32(); },\n 2(r, msg) { msg.response = { type: \"open_stream\" }; },\n 3(r, msg) { msg.response = { type: \"close_stream\" }; },\n 4(r, msg) { msg.response = r.message(ExecuteResp); },\n 5(r, msg) { msg.response = r.message(BatchResp); },\n 6(r, msg) { msg.response = { type: \"open_cursor\" }; },\n 7(r, msg) { msg.response = { type: \"close_cursor\" }; },\n 8(r, msg) { msg.response = r.message(FetchCursorResp); },\n 9(r, msg) { msg.response = { type: \"sequence\" }; },\n 10(r, msg) { msg.response = r.message(DescribeResp); },\n 11(r, msg) { msg.response = { type: \"store_sql\" }; },\n 12(r, msg) { msg.response = { type: \"close_sql\" }; },\n 13(r, msg) { msg.response = r.message(GetAutocommitResp); },\n};\nconst ExecuteResp = {\n default() { return { type: \"execute\", result: StmtResult.default() }; },\n 1(r, msg) { msg.result = r.message(StmtResult); },\n};\nconst BatchResp = {\n default() { return { type: \"batch\", result: BatchResult.default() }; },\n 1(r, msg) { msg.result = r.message(BatchResult); },\n};\nconst FetchCursorResp = {\n default() { return { type: \"fetch_cursor\", entries: [], done: false }; },\n 1(r, msg) { msg.entries.push(r.message(CursorEntry)); },\n 2(r, msg) { msg.done = r.bool(); },\n};\nconst DescribeResp = {\n default() { return { type: \"describe\", result: DescribeResult.default() }; },\n 1(r, msg) { msg.result = r.message(DescribeResult); },\n};\nconst GetAutocommitResp = {\n default() { return { type: \"get_autocommit\", isAutocommit: false }; },\n 1(r, msg) { msg.isAutocommit = r.bool(); },\n};\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,UAAU,EAAEC,WAAW,EAAEC,WAAW,EAAEC,cAAc,QAAQ,8BAA8B;AAC1G,OAAO,MAAMC,SAAS,GAAG;EACrBC,OAAOA,CAAA,EAAG;IAAE,OAAO;MAAEC,IAAI,EAAE;IAAO,CAAC;EAAE,CAAC;EACtC,CAAC,CAACC,CAAC,EAAE;IAAE,OAAO;MAAED,IAAI,EAAE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