@devopifex/witty
v1.0.5
Published
Push your data to duckdb wasm and easily build queries with a basic query builder.
Downloads
3
Readme
Witty
Example
initialise()
.then((params) => {
const jsonRowContent = [
{ col1: 1, col2: "foo" },
{ col1: 2, col2: "bar" },
];
await params.db.registerFileText("rows.json", JSON.stringify(jsonRowContent));
await params.con.insertJSONFromPath("rows.json", { name: "rows" });
const w = new Witty(params)
emitEvent({
id: 1,
query: new Query().from("rows").select("col1", "col2"),
});
emitEvent({
id: 2,
query: new Query().from("rows").select("col1", "col2").where("col1", ">", 1),
});
w.on((data) => {
console.info(data);
});
})