the-forest/client/node_modules/.cache/babel-loader/b1f1457492f98aea6aa0df217f648a424b180b2ac6c2f5d841e52c33ce1e4a5b.json

1 line
10 KiB
JSON
Raw Normal View History

2024-09-17 20:35:18 -04:00
{"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)