diff options
Diffstat (limited to 'connectivity/source/drivers/jdbc/JDriver.cxx')
-rw-r--r-- | connectivity/source/drivers/jdbc/JDriver.cxx | 92 |
1 files changed, 45 insertions, 47 deletions
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index 1d5424389ce7..f294d30b4937 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -71,7 +71,7 @@ Reference< XConnection > SAL_CALL java_sql_Driver::connect( const OUString& url, Reference< XConnection > xOut; if ( acceptsURL(url ) ) { - java_sql_Connection* pConnection = new java_sql_Connection( *this ); + rtl::Reference<java_sql_Connection> pConnection = new java_sql_Connection( *this ); xOut = pConnection; if ( !pConnection->construct(url,info) ) xOut.clear(); // an error occurred and the java driver didn't throw an exception @@ -108,104 +108,102 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const { if ( acceptsURL(url) ) { - std::vector< DriverPropertyInfo > aDriverInfo; + Sequence< OUString > aBooleanValues{ "false", "true" }; - Sequence< OUString > aBooleanValues(2); - aBooleanValues[0] = "false"; - aBooleanValues[1] = "true"; - - aDriverInfo.push_back(DriverPropertyInfo( + return + { + { "JavaDriverClass" ,"The JDBC driver class name." ,true ,OUString() - ,Sequence< OUString >()) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,Sequence< OUString >() + }, + { "JavaDriverClassPath" ,"The class path where to look for the JDBC driver." ,true , "" - ,Sequence< OUString >()) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,Sequence< OUString >() + }, + { "SystemProperties" ,"Additional properties to set at java.lang.System before loading the driver." ,true , "" - ,Sequence< OUString >()) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,Sequence< OUString >() + }, + { "ParameterNameSubstitution" ,"Change named parameters with '?'." ,false ,"false" - ,aBooleanValues) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,aBooleanValues + }, + { "IgnoreDriverPrivileges" ,"Ignore the privileges from the database driver." ,false , "false" - ,aBooleanValues) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,aBooleanValues + }, + { "IsAutoRetrievingEnabled" ,"Retrieve generated values." ,false ,"false" - ,aBooleanValues) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,aBooleanValues + }, + { "AutoRetrievingStatement" ,"Auto-increment statement." ,false ,OUString() - ,Sequence< OUString >()) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,Sequence< OUString >() + }, + { "GenerateASBeforeCorrelationName" ,"Generate AS before table correlation names." ,false ,"false" - ,aBooleanValues) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,aBooleanValues + }, + { "IgnoreCurrency" ,"Ignore the currency field from the ResultsetMetaData." ,false ,"false" - ,aBooleanValues) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,aBooleanValues + }, + { "EscapeDateTime" ,"Escape date time format." ,false ,"true" - ,aBooleanValues) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,aBooleanValues + }, + { "TypeInfoSettings" ,"Defines how the type info of the database metadata should be manipulated." ,false - ,OUString( ) - ,Sequence< OUString > ()) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,OUString() + ,Sequence< OUString > () + }, + { "ImplicitCatalogRestriction" ,"The catalog which should be used in getTables calls, when the caller passed NULL." ,false ,OUString( ) - ,Sequence< OUString > ()) - ); - aDriverInfo.push_back(DriverPropertyInfo( + ,Sequence< OUString > () + }, + { "ImplicitSchemaRestriction" ,"The schema which should be used in getTables calls, when the caller passed NULL." ,false ,OUString( ) - ,Sequence< OUString > ()) - ); - return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size()); + ,Sequence< OUString > () + } + }; } ::connectivity::SharedResources aResources; const OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR); |