Add snippets for datasource and Jaeger properties configuration#92
Add snippets for datasource and Jaeger properties configuration#92angelozerr merged 2 commits intoredhat-developer:masterfrom
Conversation
|
@lordofthejars since configuring datasource properties is not Panache-specific, I changed the description to a more generic "Configure Quarkus datasource" |
37f4adc to
b9e013a
Compare
| "prefix": "qds", | ||
| "body": [ | ||
| "quarkus.datasource.url=${1:jdbc:mariadb://localhost:3306/mydb}", | ||
| "quarkus.datasource.driver=${2:org.mariadb.jdbc.Driver}", |
There was a problem hiding this comment.
Why not using choice https://code.visualstudio.com/docs/editor/userdefinedsnippets#_choice to provide a list of JDBC driver?
| "Add datasource properties": { | ||
| "prefix": "qds", | ||
| "body": [ | ||
| "quarkus.datasource.url=${1:jdbc:mariadb://localhost:3306/mydb}", |
There was a problem hiding this comment.
Why not using choice https://code.visualstudio.com/docs/editor/userdefinedsnippets#_choice to provide a list of syntax URL (according JDBC driver)?
| "quarkus.datasource.driver=${2:org.mariadb.jdbc.Driver}", | ||
| "quarkus.datasource.username=${3:developer}", | ||
| "quarkus.datasource.password=${4:developer}", | ||
| "quarkus.hibernate-orm.database.generation=${5:update}" |
There was a problem hiding this comment.
Use choice to provide the list none, create, drop-and-create, drop, update
There was a problem hiding this comment.
excellent idea, this works well
Signed-off-by: Fred Bricon <fbricon@gmail.com>
|
included commit for Jaeger snippet |
Signed-off-by: Fred Bricon <fbricon@gmail.com>
| "prefix": "qds", | ||
| "body": [ | ||
| "quarkus.datasource.url=${1|jdbc:mariadb://localhost:3306/mydb,jdbc:mysql://localhost:3306/test,jdbc:h2:mem:mydb,jdbc:postgresql://localhost/mydb,jdbc:sqlserver://localhost:1433;databaseName=mydb|}", | ||
| "quarkus.datasource.driver=${2|org.mariadb.jdbc.Driver,org.mysql.jdbc.Driver,org.h2.Driver,org.postgresql.Driver,com.microsoft.sqlserver.jdbc.SQLServerDriver|}", |
There was a problem hiding this comment.
that's great it works! What about other JDBC driver like derby? Perhaps we will add another JDB driver according user feedback?
There was a problem hiding this comment.
I think Derby is not supported yet in Quarkus.
There was a problem hiding this comment.
Thanks @lordofthejars for your feedback! We will add another database according user feedback.
There was a problem hiding this comment.
I listed the drivers according to the quarkus extensions found in https://quarkus.io/guides/datasource-guide#jdbc-url-configurations


Fixes #90 (Datasource snippet)
Fixes #93 (Jaeger snippet)