summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_driver.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumns.cxx2
4 files changed, 9 insertions, 9 deletions
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index 50d0e3a21d5b..10af859d0dcd 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -319,9 +319,9 @@ namespace connectivity
{
Sequence< PropertyValue > info;
- sal_Bool bOK = url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:odbc:" ) )
- || url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:jdbc:" ) )
- || ( url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:mysqlc:" ) )
+ sal_Bool bOK = url.startsWith( "sdbc:mysql:odbc:" )
+ || url.startsWith( "sdbc:mysql:jdbc:" )
+ || ( url.startsWith( "sdbc:mysql:mysqlc:" )
&& loadDriver( url, info ).is()
);
return bOK;
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 9a502a07e7e4..11e36b3851c6 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1235,16 +1235,16 @@ struct SortInternalSchemasLastAndPublicFirst
{
ret = false;
}
- else if( valueA.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "pg_" ) ) &&
- valueB.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "pg_" ) ) )
+ else if( valueA.startsWith( "pg_" ) &&
+ valueB.startsWith( "pg_" ) )
{
ret = valueA.compareTo( valueB ) < 0; // sorts equal !
}
- else if( valueA.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "pg_" ) ))
+ else if( valueA.startsWith( "pg_" ))
{
ret = false; // sorts last !
}
- else if( valueB.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "pg_" ) ) )
+ else if( valueB.startsWith( "pg_" ) )
{
ret = true; // sorts first !
}
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index 5f1fedb72e36..d2742ec251ab 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -119,7 +119,7 @@ Reference< XConnection > Driver::connect(
sal_Bool Driver::acceptsURL( const OUString& url )
throw (SQLException, RuntimeException)
{
- return url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:postgresql:" ) );
+ return url.startsWith( "sdbc:postgresql:" );
}
Sequence< DriverPropertyInfo > Driver::getPropertyInfo(
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index a3dccb4fc55f..a7ec8884a635 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -94,7 +94,7 @@ static Any isCurrency( const OUString & typeName )
static Any isAutoIncrement( const OUString & defaultValue )
{
- sal_Bool ret = defaultValue.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "nextval(" ) );
+ sal_Bool ret = defaultValue.startsWith( "nextval(" );
// printf( "%s %d\n",
// OUStringToOString(defaultValue, RTL_TEXTENCODING_ASCII_US).getStr(),
// ret );