summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-20 10:05:20 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 10:07:32 +0200
commit1730df0127ff230cf6c89f4815f5b59c8603fa2b (patch)
tree4d5b32ea155c173fe3cfd905bb148e0998286d9a /connectivity
parent52bbd9cc00b5a1e15e4f96b5c5fa5e75855692c1 (diff)
remove unnecessary RTL_CONSTASCII_STRINGPARAM in OString::append
Convert code like: aOStringBuf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") ); to: aOStringBuf.append( " is missing )" ); which compiles down to the same code. Change-Id: I3d8ed0cbf96a881686524a167412d5f303c06b71
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx42
1 files changed, 17 insertions, 25 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 47697d1990f5..91272046b727 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -564,50 +564,42 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
else if( ! table.getLength() )
{
OStringBuffer buf( 128 );
- buf.append(
- RTL_CONSTASCII_STRINGPARAM(
- "can't support updateable resultset, because a single table in the "
- "WHERE part of the statement could not be identified (" ) );
+ buf.append( "can't support updateable resultset, because a single table in the "
+ "WHERE part of the statement could not be identified (" );
buf.append( cmd );
- buf.append( RTL_CONSTASCII_STRINGPARAM( "." ) );
+ buf.append( "." );
aReason = buf.makeStringAndClear();
}
else if( sourceTableKeys.getLength() )
{
OStringBuffer buf( 128 );
- buf.append(
- RTL_CONSTASCII_STRINGPARAM(
- "can't support updateable resultset for table " ) );
+ buf.append( "can't support updateable resultset for table " );
buf.append( OUStringToOString( schema, pSettings->encoding ) );
- buf.append( RTL_CONSTASCII_STRINGPARAM( "." ) );
+ buf.append( "." );
buf.append( OUStringToOString( table, pSettings->encoding ) );
- buf.append( RTL_CONSTASCII_STRINGPARAM( ", because resultset does not contain a part of the primary key ( column " ) );
+ buf.append( ", because resultset does not contain a part of the primary key ( column " );
buf.append( OUStringToOString( sourceTableKeys[i], pSettings->encoding ) );
- buf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") );
+ buf.append( " is missing )" );
aReason = buf.makeStringAndClear();
}
else
{
OStringBuffer buf( 128 );
- buf.append(
- RTL_CONSTASCII_STRINGPARAM(
- "can't support updateable resultset for table " ) );
+ buf.append( "can't support updateable resultset for table " );
buf.append( OUStringToOString( schema, pSettings->encoding ) );
- buf.append( RTL_CONSTASCII_STRINGPARAM( "." ) );
+ buf.append( "." );
buf.append( OUStringToOString( table, pSettings->encoding ) );
- buf.append( RTL_CONSTASCII_STRINGPARAM( ", because resultset table does not have a primary key " ) );
+ buf.append( ", because resultset table does not have a primary key " );
aReason = buf.makeStringAndClear();
}
}
else
{
OStringBuffer buf( 128 );
- buf.append(
- RTL_CONSTASCII_STRINGPARAM(
- "can't support updateable result for selects with multiple tables (" ) );
+ buf.append( "can't support updateable result for selects with multiple tables (" );
buf.append( cmd );
- buf.append( RTL_CONSTASCII_STRINGPARAM( ")" ) );
+ buf.append( ")" );
log( pSettings, LogLevel::SQL, buf.makeStringAndClear().getStr() );
}
if( ! (*(data->pLastResultset)).is() )
@@ -644,14 +636,14 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data )
if( isLog( pSettings, LogLevel::SQL ) )
{
OStringBuffer buf( 128 );
- buf.append( RTL_CONSTASCII_STRINGPARAM("executed query '") );
+ buf.append( "executed query '" );
buf.append( cmd );
- buf.append( RTL_CONSTASCII_STRINGPARAM("' successfully") );
- buf.append( RTL_CONSTASCII_STRINGPARAM(", duration=") );
+ buf.append( "' successfully" );
+ buf.append( ", duration=" );
buf.append( duration );
- buf.append( RTL_CONSTASCII_STRINGPARAM("ms, returnedRows=") );
+ buf.append( "ms, returnedRows=" );
buf.append( returnedRows );
- buf.append( RTL_CONSTASCII_STRINGPARAM("." ) );
+ buf.append( "." );
log( pSettings, LogLevel::SQL, buf.makeStringAndClear().getStr() );
}
break;