depyronick / nestjs-clickhouse

ClickHouse Client Module for Nest Framework (node.js)
https://clickhouse.js.org
MIT License
43 stars 6 forks source link

Add ClickHouseModule.registerAsync #7

Closed spiehdid closed 2 years ago

spiehdid commented 2 years ago

Is there an existing issue that is already proposing this?

Is your feature request related to a problem? Please describe it

At the moment, there is no way to do asynchronous client registration in order to transfer the config from ConfigService to it

Describe the solution you'd like

    ClickHouseModule.registerAsync({
      useFactory: (config: ConfigService) => config.get("chOptions"),
      inject: [ConfigService],
    })

Teachability, documentation, adoption, migration strategy

Not necessary

What is the motivation / use case for changing the behavior?

Not necessary

depyronick commented 2 years ago

Will be added as soon as possible.

spiehdid commented 2 years ago

@depyronick When will this feature be published?

depyronick commented 2 years ago

@spiehdid

Sorry for the delay, please check the readme & install the new version (1.0.16)

Also please let me know if it all works as expected. If there are any problems, please open a new issue. Thanks!