denodrivers / postgres

PostgreSQL driver for Deno

Home Page:https://denodrivers.github.io/postgres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

calling createTransaction without a name creates an invalid transaction

groksrc opened this issue · comments

createTransaction does not validate the name parameter: https://github.com/denodrivers/postgres/blob/main/client.ts#L200

As a result on subsequent calls to the transaction an error is returned that the transaction is not open because the name is undefined: https://github.com/denodrivers/postgres/blob/main/query/transaction.ts#L157