dal/pkg/__test__/proto_test.ts
Anton Nesterov 07a61af8e5
[feat] test nodejs bindings
Signed-off-by: Anton Nesterov <anton@demiurg.io>
2024-08-20 03:36:41 +02:00

26 lines
441 B
TypeScript

//@ts-ignore
import { encode } from "https://deno.land/x/msgpack@v1.2/mod.ts";
const Query = {
id: 9,
db: "database.sqlite",
commands: [
{ method: "In", args: ["data"] },
{
method: "Find",
args: [
{
a: 1,
b: {
$gt: 2,
},
},
],
},
],
};
const encoded: Uint8Array = encode(Query);
//@ts-ignore
Deno.writeFileSync("proto_test.msgpack", encoded);