Skip to content

connection param in PostgreConfig doesn't accept a function #1141

@TheAdamGalloway

Description

@TheAdamGalloway

Package version

21.8.2

Describe the bug

The documentation states "The value of the connection property is same as the configuration object accepted by Knex.", however the knex library allows you to set the connection property to a function that returns config.

The use case for this is to be able to set the Postgres password dynamically to a token, to reduce credential use. I can't see another way of doing this that isn't hacky (it must handle refreshing once tokens are expired).

Reproduction repo

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions