Closed tmountain closed 1 month ago
Just illustrate the previous bug:
> const q = '(test2,f,t,"2024-09-18 08:48:41.85001+00")'
undefined
> const parts = q.substring(1, q.length - 1).split(",");
undefined
> parts
[ "test2", "f", "t", '"2024-09-18 08:48:41.85001+00"' ]
> {
name: parts[0],
createdAt: new Date(parts[1]),
isPartitioned: parts[2] === "t",
isUnlogged: parts[3] === "t",
}
{
name: "test2",
createdAt: Invalid Date,
isPartitioned: true,
isUnlogged: false
}
Thanks @tmountain. This is fixed by #6.
Hi Muhammad, I just wanted to give you a heads up that I created a derivative library using
pgmq-js
as the foundation. The library is custom tailored for Deno.https://github.com/tmountain/deno-pgmq
While I was porting the code, I found a bug in your
parseDbQueue
function. It was not reporting the is_unlogged flag properly. This is the implementation that I landed on:I updated my project's license to provide the proper attribution. Thank you for your work on this. It has been very helpful.