summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/qa/unit/embeddeddb_performancetest.cxx24
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx2
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx6
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx2
-rw-r--r--dbaccess/source/core/recovery/settingsimport.hxx2
-rw-r--r--dbaccess/source/filter/hsqldb/fbcreateparser.cxx14
-rw-r--r--dbaccess/source/filter/hsqldb/hsqlimport.cxx5
-rw-r--r--dbaccess/source/filter/hsqldb/hsqlimport.hxx2
8 files changed, 29 insertions, 28 deletions
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index e4119804d3b1..ec23226d4016 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -92,7 +92,7 @@ private:
void printTimes(const TimeValue* pTime1, const TimeValue* pTime2, const TimeValue* pTime3);
void doPerformanceTestOnODB(const OUString& rDriverURL,
- const OUString& rDBName,
+ std::u16string_view rDBName,
const bool bUsePreparedStatement);
void setupTestTable(uno::Reference< XConnection > const & xConnection);
@@ -102,13 +102,13 @@ private:
// Individual Tests
void performPreparedStatementInsertTest(
uno::Reference< XConnection > const & xConnection,
- const OUString& rDBName);
+ std::u16string_view rDBName);
void performStatementInsertTest(
uno::Reference< XConnection > const & xConnection,
- const OUString& rDBName);
+ std::u16string_view rDBName);
void performReadTest(
uno::Reference< XConnection > const & xConnection,
- const OUString& rDBName);
+ std::u16string_view rDBName);
// Perform all tests on a given DB.
void testFirebird();
@@ -173,17 +173,17 @@ void EmbeddedDBPerformanceTest::testFirebird()
{
m_aOutputBuffer.append("Standard Insert\n");
- doPerformanceTestOnODB("sdbc:embedded:firebird", "Firebird", false);
+ doPerformanceTestOnODB("sdbc:embedded:firebird", u"Firebird", false);
m_aOutputBuffer.append("PreparedStatement Insert\n");
- doPerformanceTestOnODB("sdbc:embedded:firebird", "Firebird", true);
+ doPerformanceTestOnODB("sdbc:embedded:firebird", u"Firebird", true);
}
void EmbeddedDBPerformanceTest::testHSQLDB()
{
m_aOutputBuffer.append("Standard Insert\n");
- doPerformanceTestOnODB("sdbc:embedded:hsqldb", "HSQLDB", false);
+ doPerformanceTestOnODB("sdbc:embedded:hsqldb", u"HSQLDB", false);
m_aOutputBuffer.append("PreparedStatement Insert\n");
- doPerformanceTestOnODB("sdbc:embedded:hsqldb", "HSQLDB", true);
+ doPerformanceTestOnODB("sdbc:embedded:hsqldb", u"HSQLDB", true);
}
/**
@@ -192,7 +192,7 @@ void EmbeddedDBPerformanceTest::testHSQLDB()
*/
void EmbeddedDBPerformanceTest::doPerformanceTestOnODB(
const OUString& rDriverURL,
- const OUString& rDBName,
+ std::u16string_view rDBName,
const bool bUsePreparedStatement)
{
::utl::TempFile aFile;
@@ -244,7 +244,7 @@ void EmbeddedDBPerformanceTest::setupTestTable(
void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
uno::Reference< XConnection > const & xConnection,
- const OUString& rDBName)
+ std::u16string_view rDBName)
{
uno::Reference< XPreparedStatement > xPreparedStatement =
xConnection->prepareStatement(
@@ -286,7 +286,7 @@ void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
void EmbeddedDBPerformanceTest::performStatementInsertTest(
uno::Reference< XConnection > const & xConnection,
- const OUString& rDBName)
+ std::u16string_view rDBName)
{
uno::Reference< XStatement > xStatement =
xConnection->createStatement();
@@ -324,7 +324,7 @@ void EmbeddedDBPerformanceTest::performStatementInsertTest(
void EmbeddedDBPerformanceTest::performReadTest(
uno::Reference< XConnection > const & xConnection,
- const OUString& rDBName)
+ std::u16string_view rDBName)
{
uno::Reference< XStatement > xStatement = xConnection->createStatement();
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 7db4ca08740b..ee05bd49d968 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -56,7 +56,7 @@ using namespace ::osl;
typedef std::map<OUString, OUStringBuffer> TSQLStatements;
namespace
{
- void lcl_fillKeyCondition(const OUString& i_sTableName,const OUString& i_sQuotedColumnName,const ORowSetValue& i_aValue,TSQLStatements& io_aKeyConditions)
+ void lcl_fillKeyCondition(const OUString& i_sTableName,std::u16string_view i_sQuotedColumnName,const ORowSetValue& i_aValue,TSQLStatements& io_aKeyConditions)
{
OUStringBuffer& rKeyCondition = io_aKeyConditions[i_sTableName];
if ( !rKeyCondition.isEmpty() )
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index f3f401b3cb99..6439941912dc 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -169,7 +169,7 @@ namespace
delete pSqlParseNode;
_rIterator.dispose();
}
- void lcl_addFilterCriteria_throw(sal_Int32 i_nFilterOperator,const OUString& i_sValue,OUStringBuffer& o_sRet)
+ void lcl_addFilterCriteria_throw(sal_Int32 i_nFilterOperator,std::u16string_view i_sValue,OUStringBuffer& o_sRet)
{
switch( i_nFilterOperator )
{
@@ -1647,7 +1647,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
if ( nType != DataType::BOOLEAN && DataType::BIT != nType )
{
- lcl_addFilterCriteria_throw(filterOperator,"",aSQL);
+ lcl_addFilterCriteria_throw(filterOperator,u"",aSQL);
}
switch(nType)
@@ -1716,7 +1716,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
sal_Int32 nFilterOp = filterOperator;
if ( filterOperator != SQLFilterOperator::SQLNULL && filterOperator != SQLFilterOperator::NOT_SQLNULL )
nFilterOp = SQLFilterOperator::SQLNULL;
- lcl_addFilterCriteria_throw(nFilterOp,"",aSQL);
+ lcl_addFilterCriteria_throw(nFilterOp,u"",aSQL);
}
// Attach filter
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index b64787aa82a4..2353202681c4 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -54,7 +54,7 @@ namespace dbaccess
{
}
- void SettingsImport::characters( const OUString& i_rCharacters )
+ void SettingsImport::characters( std::u16string_view i_rCharacters )
{
m_aCharacters.append( i_rCharacters );
}
diff --git a/dbaccess/source/core/recovery/settingsimport.hxx b/dbaccess/source/core/recovery/settingsimport.hxx
index 38bce0228e29..bc29bd727b8f 100644
--- a/dbaccess/source/core/recovery/settingsimport.hxx
+++ b/dbaccess/source/core/recovery/settingsimport.hxx
@@ -48,7 +48,7 @@ namespace dbaccess
const css::uno::Reference< css::xml::sax::XAttributeList >& i_rAttributes
);
virtual void endElement();
- void characters( const OUString& i_rCharacters );
+ void characters( std::u16string_view i_rCharacters );
protected:
virtual ~SettingsImport() override;
diff --git a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
index 4f8fb8667d1e..8ee1196a1618 100644
--- a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
+++ b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
@@ -29,7 +29,7 @@ using namespace css::sdbc;
namespace
{
-void lcl_appendWithSpace(OUStringBuffer& sBuff, const OUString& sStr)
+void lcl_appendWithSpace(OUStringBuffer& sBuff, std::u16string_view sStr)
{
sBuff.append(" ");
sBuff.append(sStr);
@@ -138,7 +138,7 @@ OUString FbCreateStmtParser::compose() const
sSql.append("CREATE TABLE ");
sSql.append(getTableName());
- lcl_appendWithSpace(sSql, "("); // column declaration
+ lcl_appendWithSpace(sSql, u"("); // column declaration
auto& rColumns = getColumnDef();
auto columnIter = rColumns.cbegin();
while (columnIter != rColumns.end())
@@ -178,7 +178,7 @@ OUString FbCreateStmtParser::compose() const
if (columnIter->isAutoIncremental())
{
- lcl_appendWithSpace(sSql, "GENERATED BY DEFAULT AS IDENTITY (START WITH ");
+ lcl_appendWithSpace(sSql, u"GENERATED BY DEFAULT AS IDENTITY (START WITH ");
// start with 0:
// HSQLDB: first value will be 0.
@@ -187,17 +187,17 @@ OUString FbCreateStmtParser::compose() const
sSql.append(")");
}
else if (!columnIter->isNullable())
- lcl_appendWithSpace(sSql, "NOT NULL");
+ lcl_appendWithSpace(sSql, u"NOT NULL");
if (columnIter->isCaseInsensitive())
- lcl_appendWithSpace(sSql, "COLLATE UNICODE_CI");
+ lcl_appendWithSpace(sSql, u"COLLATE UNICODE_CI");
const OUString& sDefaultVal = columnIter->getDefault();
if (!sDefaultVal.isEmpty())
{
- lcl_appendWithSpace(sSql, "DEFAULT");
+ lcl_appendWithSpace(sSql, u"DEFAULT");
if (sDefaultVal.equalsIgnoreAsciiCase("NOW"))
- lcl_appendWithSpace(sSql, "\'NOW\'"); // Fb likes it single quoted
+ lcl_appendWithSpace(sSql, u"\'NOW\'"); // Fb likes it single quoted
else
lcl_appendWithSpace(sSql, sDefaultVal);
}
diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
index f24ceb6f2ff0..045a32f93ce3 100644
--- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx
+++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
@@ -176,7 +176,7 @@ void lcl_setParams(const std::vector<Any>& row, Reference<XParameters> const& xP
}
}
-OUString lcl_createInsertStatement(const OUString& sTableName,
+OUString lcl_createInsertStatement(std::u16string_view sTableName,
const std::vector<dbahsql::ColumnDefinition>& rColTypes)
{
assert(rColTypes.size() > 0);
@@ -216,7 +216,8 @@ HsqlImporter::HsqlImporter(Reference<XConnection>& rConnection, const Reference<
m_xStorage.set(rStorage);
}
-void HsqlImporter::insertRow(const std::vector<css::uno::Any>& xRows, const OUString& sTableName,
+void HsqlImporter::insertRow(const std::vector<css::uno::Any>& xRows,
+ std::u16string_view sTableName,
const std::vector<ColumnDefinition>& rColTypes)
{
OUString sStatement = lcl_createInsertStatement(sTableName, rColTypes);
diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.hxx b/dbaccess/source/filter/hsqldb/hsqlimport.hxx
index f414d327565d..7bab53c24b88 100644
--- a/dbaccess/source/filter/hsqldb/hsqlimport.hxx
+++ b/dbaccess/source/filter/hsqldb/hsqlimport.hxx
@@ -30,7 +30,7 @@ private:
css::uno::Reference<css::embed::XStorage> m_xStorage;
protected:
- void insertRow(const std::vector<css::uno::Any>& xRows, const OUString& sTable,
+ void insertRow(const std::vector<css::uno::Any>& xRows, std::u16string_view sTable,
const std::vector<ColumnDefinition>& rColTypes);
void processTree(HsqlBinaryNode& rNode, HsqlRowInputStream& rStream,
const std::vector<ColumnDefinition>& rColTypes, const OUString& sTableName,