micronaut-sql icon indicating copy to clipboard operation
micronaut-sql copied to clipboard

Pass all uknown parameters to jdbc url string

Open rlconst opened this issue 2 years ago • 0 comments

Feature description

Not sure if bug or feature

I'm using hikari and postgresql. You can pass additional params via ugly jdbc URL:

datasources:
  default:
    url: jdbc:postgresql://localhost:5432/db?-c%20my.var=SOMEVAL%20-c%20pg_trgm.similarity_threshold=0.1

I assumed that I can do instead

datasources:
  default:
    url: jdbc:postgresql://localhost:5432/db
    options: -c my.var=SOMEVAL -c pg_trgm.similarity_threshold=0.1

or even better

datasources:
  default:
    url: jdbc:postgresql://localhost:5432/db
    options:
     - -c my.var=SOMEVAL
     - -c pg_trgm.similarity_threshold=0.1

and all unknown params will be url encoded and attached to jdbc url but It doesn't work.

rlconst avatar Feb 18 '23 06:02 rlconst