|
|
@ -109,14 +109,16 @@ export function jdbcToXcUrl(url: string): string { |
|
|
|
const extraParams = []; |
|
|
|
const extraParams = []; |
|
|
|
|
|
|
|
|
|
|
|
for (const [key, value] of Object.entries(extra)) { |
|
|
|
for (const [key, value] of Object.entries(extra)) { |
|
|
|
extraParams.push(`${key}=${value}`); |
|
|
|
extraParams.push(`${key}=${encodeURIComponent(value + '')}`); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const res = `${driverClientMapping[driver] || driver}://${host}${ |
|
|
|
const res = `${driverClientMapping[driver] || driver}://${host}${ |
|
|
|
port ? `:${port}` : '' |
|
|
|
port ? `:${port}` : '' |
|
|
|
}?${user ? `u=${user}&` : ''}${password ? `p=${password}&` : ''}${ |
|
|
|
}?${user ? `u=${encodeURIComponent(user)}&` : ''}${ |
|
|
|
database ? `d=${database}&` : '' |
|
|
|
password ? `p=${encodeURIComponent(password)}&` : '' |
|
|
|
}${extraParams.join('&')}`;
|
|
|
|
}${database ? `d=${encodeURIComponent(database)}&` : ''}${extraParams.join( |
|
|
|
|
|
|
|
'&', |
|
|
|
|
|
|
|
)}`;
|
|
|
|
|
|
|
|
|
|
|
|
return res; |
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
|