[CONJ-1085] Utility method to display configuration from url string Created: 2023-06-08  Updated: 2023-06-08  Resolved: 2023-06-08

Status: Closed
Project: MariaDB Connector/J
Component/s: configuration
Affects Version/s: None
Fix Version/s: 3.2.0

Type: New Feature Priority: Minor
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

New static method Configuration.toConf(String url) addition in order to display configuration from an url string.

Example:

Configuration.toConf("jdbc:mariadb:loadbalance://host1:3305,address=(host=host2)(port=3307)(type=replica)/db?nonExisting&nonExistingWithValue=tt&user=me&password=***&timezone=UTC&autocommit=false&createDatabaseIfNotExist=true&")

Will return a String like :

Configuration:
 * resulting Url : jdbc:mariadb:loadbalance://address=(host=host1)(port=3305)(type=primary),address=(host=host2)(port=3307)(type=replica)/db?user=me&password=***&nonExisting=&nonExistingWithValue=tt&timezone=UTC&autocommit=false&createDatabaseIfNotExist=true
Unknown options : 
 * nonExisting : 
 * nonExistingWithValue : tt
 
Non default options : 
 * addresses : [address=(host=host1)(port=3305)(type=primary), address=(host=host2)(port=3307)(type=replica)]
 * autocommit : false
 * createDatabaseIfNotExist : true
 * database : db
 * haMode : LOADBALANCE
 * password : ***
 * timezone : UTC
 * user : me
 
default options :
 * allowLocalInfile : true
 * allowMultiQueries : false
 * allowPublicKeyRetrieval : false
 * ...


Generated at Thu Feb 08 03:20:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.