denodrivers/postgres

Inconsistency between `client.queryArray` and `transaction.queryArray`

baoshan opened this issue · 1 comments

These two interfaces differ in treating the arguments. To be specific:

transaction.ts

query = new Query(
        query_template_or_config,
        ResultType.ARRAY,
        args as QueryArguments | undefined,
      );

client.ts

query = new Query(
        query_template_or_config,
        ResultType.OBJECT,
        args[0] as QueryArguments | undefined,
      );

I guest the latter is expected. Can the inconsistency be permanently avoided by removing the duplicated logic?

Thank you for your report, I can confirm I messed up

I will submit a fix soon