summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-19 17:06:06 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 10:07:32 +0200
commit52bbd9cc00b5a1e15e4f96b5c5fa5e75855692c1 (patch)
tree72d0d1d16806f1c785a4f79ea2c0cdfe54bb8101 /connectivity
parent3af99e4d59d89c343965a928681a30f36b1007d2 (diff)
remove unnecessary RTL_CONSTASCII_STRINGPARAM in appendAscii calls
Convert code like: aStrBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ln(x)" )); to: aStrBuf.append( "ln(x)" ); which compiles down to the same code. Change-Id: I24c7cb45ceb32fd7cd6ec7ed203c2a5d746f1c5c
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/postgresql/pq_array.cxx6
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx14
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx68
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.cxx26
-rw-r--r--connectivity/source/drivers/postgresql/pq_xcolumns.cxx40
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexes.cxx16
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx36
8 files changed, 104 insertions, 104 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_array.cxx b/connectivity/source/drivers/postgresql/pq_array.cxx
index ca0d0ae50861..4f69d158c9cf 100644
--- a/connectivity/source/drivers/postgresql/pq_array.cxx
+++ b/connectivity/source/drivers/postgresql/pq_array.cxx
@@ -116,11 +116,11 @@ void Array::checkRange( sal_Int32 index, sal_Int32 count )
if( index >= 1 && index -1 + count <= m_data.getLength() )
return;
OUStringBuffer buf;
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Array::getArrayAtIndex(): allowed range for index + count " ) );
+ buf.append( "Array::getArrayAtIndex(): allowed range for index + count " );
buf.append( m_data.getLength() );
- buf.appendAscii( ", got " );
+ buf.append( ", got " );
buf.append( index );
- buf.appendAscii( " + " );
+ buf.append( " + " );
buf.append( count );
throw SQLException( buf.makeStringAndClear() , *this, OUString(), 1, Any());
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 69d764427945..9a502a07e7e4 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1431,7 +1431,7 @@ static void columnMetaData2DatabaseTypeDescription(
Reference< XRow > row( rs, UNO_QUERY_THROW );
int domains = 0;
OUStringBuffer queryBuf(128);
- queryBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SELECT oid,typtype,typname FROM pg_TYPE WHERE " ) );
+ queryBuf.append( "SELECT oid,typtype,typname FROM pg_TYPE WHERE " );
while( rs->next() )
{
if( row->getString( 9 ) == "d" && oidMap.find( row->getInt( 12 ) ) == oidMap.end() )
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index f8e25652eb97..47697d1990f5 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -749,12 +749,12 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
if( nLastOid && lastTableInserted.getLength() )
{
OUStringBuffer buf( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SELECT * FROM " ) );
+ buf.append( "SELECT * FROM " );
if( schemaName.getLength() )
bufferQuoteQualifiedIdentifier(buf, schemaName, tableName, pConnectionSettings );
else
bufferQuoteIdentifier( buf, lastTableInserted, pConnectionSettings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " WHERE oid = " ) );
+ buf.append( " WHERE oid = " );
buf.append( nLastOid , 10 );
query = buf.makeStringAndClear();
}
@@ -786,9 +786,9 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
if( keyColumnNames.getLength() )
{
OUStringBuffer buf( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SELECT * FROM " ) );
+ buf.append( "SELECT * FROM " );
bufferQuoteQualifiedIdentifier(buf, schemaName, tableName, pConnectionSettings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " WHERE " ) );
+ buf.append( " WHERE " );
bool additionalCondition = false;
String2StringMap autoValues;
for( int i = 0 ; i < keyColumnNames.getLength() ; i ++ )
@@ -829,7 +829,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
{
// retrieve current sequence value:
OUStringBuffer myBuf(128 );
- myBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SELECT currval(" ) );
+ myBuf.append( "SELECT currval(" );
myBuf.appendAscii( &(j->second.getStr()[8]));
value = querySingleValue( connection, myBuf.makeStringAndClear() );
}
@@ -846,9 +846,9 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
}
if( additionalCondition )
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " AND " ) );
+ buf.append( " AND " );
bufferQuoteIdentifier( buf, keyColumnNames[i], pConnectionSettings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ) );
+ buf.append( " = " );
buf.append( value );
additionalCondition = true;
}
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index ed7e514073c8..2b979b0240ae 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -87,7 +87,7 @@ OUString concatQualified( const OUString & a, const OUString &b)
{
OUStringBuffer buf( a.getLength() + 2 + b.getLength() );
buf.append( a );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "." ) );
+ buf.append( "." );
buf.append( b );
return buf.makeStringAndClear();
}
@@ -130,9 +130,9 @@ void bufferEscapeConstant( OUStringBuffer & buf, const OUString & value, Connect
static inline void ibufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "'" ) );
+ buf.append( "'" );
bufferEscapeConstant( buf, value, settings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "'" ) );
+ buf.append( "'" );
}
void bufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings )
@@ -149,7 +149,7 @@ void bufferQuoteAnyConstant( OUStringBuffer & buf, const Any &val, ConnectionSet
bufferQuoteConstant( buf, str, settings );
}
else
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "NULL" ) );
+ buf.append( "NULL" );
}
static inline void ibufferQuoteIdentifier( OUStringBuffer & buf, const OUString &toQuote, ConnectionSettings *settings )
@@ -182,7 +182,7 @@ void bufferQuoteQualifiedIdentifier(
OUStringBuffer & buf, const OUString &schema, const OUString &table, ConnectionSettings *settings )
{
ibufferQuoteIdentifier(buf, schema, settings);
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "." ) );
+ buf.append( "." );
ibufferQuoteIdentifier(buf, table, settings);
}
@@ -194,9 +194,9 @@ void bufferQuoteQualifiedIdentifier(
ConnectionSettings *settings)
{
ibufferQuoteIdentifier(buf, schema, settings);
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "." ) );
+ buf.append( "." );
ibufferQuoteIdentifier(buf, table, settings);
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "." ) );
+ buf.append( "." );
ibufferQuoteIdentifier(buf, col, settings);
}
@@ -575,28 +575,28 @@ OUString array2String( const com::sun::star::uno::Sequence< Any > &seq )
{
OUStringBuffer buf(128);
int len = seq.getLength();
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "{" ) );
+ buf.append( "{" );
for( int i = 0 ; i < len ; i ++ )
{
OUString element;
seq[i] >>= element;
if( i > 0 )
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(",") );
+ buf.append( "," );
int strLength = element.getLength();
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "\"") );
+ buf.append( "\"" );
for( int j = 0 ; j < strLength ; j ++ )
{
sal_Unicode c = element[j];
if( c == '\\' || c == '"' || c == '{' || c == '}' )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "\\" ) );
+ buf.append( "\\" );
}
buf.append( c );
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "\"" ) );
+ buf.append( "\"" );
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "}" ) );
+ buf.append( "}" );
return buf.makeStringAndClear();
}
@@ -932,19 +932,19 @@ OUString sqltype2string( const Reference< XPropertySet > & desc )
case com::sun::star::sdbc::DataType::VARCHAR:
case com::sun::star::sdbc::DataType::CHAR:
{
- typeName.appendAscii( RTL_CONSTASCII_STRINGPARAM( "(" ) );
+ typeName.append( "(" );
typeName.append( precision );
- typeName.appendAscii( RTL_CONSTASCII_STRINGPARAM( ")" ) );
+ typeName.append( ")" );
break;
}
case com::sun::star::sdbc::DataType::DECIMAL:
case com::sun::star::sdbc::DataType::NUMERIC:
{
- typeName.appendAscii( RTL_CONSTASCII_STRINGPARAM( "(" ) );
+ typeName.append( "(" );
typeName.append( precision );
- typeName.appendAscii( RTL_CONSTASCII_STRINGPARAM( "," ) );
+ typeName.append( "," );
typeName.append( extractIntProperty( desc, getStatics().SCALE ) );
- typeName.appendAscii( RTL_CONSTASCII_STRINGPARAM( ")" ) );
+ typeName.append( ")" );
break;
}
default:
@@ -961,23 +961,23 @@ static void keyType2String( OUStringBuffer & buf, sal_Int32 keyType )
{
if( com::sun::star::sdbc::KeyRule::CASCADE == keyType )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "CASCADE " ) );
+ buf.append( "CASCADE " );
}
else if( com::sun::star::sdbc::KeyRule::RESTRICT == keyType )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "RESTRICT " ) );
+ buf.append( "RESTRICT " );
}
else if( com::sun::star::sdbc::KeyRule::SET_DEFAULT == keyType )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SET DEFAULT " ) );
+ buf.append( "SET DEFAULT " );
}
else if( com::sun::star::sdbc::KeyRule::SET_NULL == keyType )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SET NULL " ) );
+ buf.append( "SET NULL " );
}
else //if( com::sun::star::sdbc::KeyRule::NO_ACTION == keyType )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "NO ACTION " ) );
+ buf.append( "NO ACTION " );
}
}
@@ -992,16 +992,16 @@ void bufferKey2TableConstraint(
bool foreign = false;
if( type == com::sun::star::sdbcx::KeyType::UNIQUE )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "UNIQUE( " ) );
+ buf.append( "UNIQUE( " );
}
else if( type == com::sun::star::sdbcx::KeyType::PRIMARY )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "PRIMARY KEY( " ) );
+ buf.append( "PRIMARY KEY( " );
}
else if( type == com::sun::star::sdbcx::KeyType::FOREIGN )
{
foreign = true;
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "FOREIGN KEY( " ) );
+ buf.append( "FOREIGN KEY( " );
}
Reference< XColumnsSupplier > columns( key, UNO_QUERY );
@@ -1020,18 +1020,18 @@ void bufferKey2TableConstraint(
}
else
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+ buf.append( ", " );
}
Reference< XPropertySet > keyColumn( colEnum->nextElement(), UNO_QUERY_THROW );
bufferQuoteIdentifier(buf, extractStringProperty( keyColumn, st.NAME ), settings );
}
}
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ") " ));
+ buf.append( ") " );
if( foreign )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "REFERENCES " ) );
+ buf.append( "REFERENCES " );
OUString schema;
OUString tableName;
splitConcatenatedIdentifier( referencedTable, &schema, &tableName );
@@ -1041,7 +1041,7 @@ void bufferKey2TableConstraint(
Reference< XEnumerationAccess > colEnumAccess( columns->getColumns(), UNO_QUERY);
if( colEnumAccess.is() )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) );
+ buf.append( " (" );
Reference< XEnumeration > colEnum(colEnumAccess->createEnumeration());
bool first = true;
while(colEnum.is() && colEnum->hasMoreElements() )
@@ -1052,19 +1052,19 @@ void bufferKey2TableConstraint(
}
else
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+ buf.append( ", " );
}
Reference< XPropertySet > keyColumn( colEnum->nextElement(), UNO_QUERY_THROW );
bufferQuoteIdentifier(
buf, extractStringProperty( keyColumn, st.RELATED_COLUMN ), settings );
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ") " ) );
+ buf.append( ") " );
}
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ON DELETE " ) );
+ buf.append( "ON DELETE " );
keyType2String( buf, deleteRule );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ON UPDATE " ) );
+ buf.append( " ON UPDATE " );
keyType2String( buf, updateRule );
}
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index b0d1c74a5629..f105d5c7d9bc 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -189,14 +189,14 @@ OUString UpdateableResultSet::buildWhereClause()
if( m_primaryKey.getLength() )
{
OUStringBuffer buf( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " WHERE " ) );
+ buf.append( " WHERE " );
for( int i = 0 ; i < m_primaryKey.getLength() ; i ++ )
{
if( i > 0 )
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " AND " ) );
+ buf.append( " AND " );
sal_Int32 index = findColumn( m_primaryKey[i] );
bufferQuoteIdentifier( buf, m_primaryKey[i], *m_ppSettings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ) );
+ buf.append( " = " );
bufferQuoteConstant( buf, getString( index ), *m_ppSettings );
}
ret = buf.makeStringAndClear();
@@ -218,9 +218,9 @@ void UpdateableResultSet::insertRow( ) throw (SQLException, RuntimeException)
*this, OUString(), 1, Any() );
OUStringBuffer buf( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "INSERT INTO " ) );
+ buf.append( "INSERT INTO " );
bufferQuoteQualifiedIdentifier( buf, m_schema, m_table, *m_ppSettings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ( " ) );
+ buf.append( " ( " );
int columns = 0;
for( UpdateableFieldVector::size_type i = 0 ; i < m_updateableField.size() ; i++ )
@@ -228,12 +228,12 @@ void UpdateableResultSet::insertRow( ) throw (SQLException, RuntimeException)
if( m_updateableField[i].isTouched )
{
if( columns > 0 )
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+ buf.append( ", " );
columns ++;
bufferQuoteIdentifier( buf, m_columnNames[i], *m_ppSettings);
}
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ) VALUES ( " ) );
+ buf.append( " ) VALUES ( " );
columns = 0;
for( UpdateableFieldVector::size_type i = 0 ; i < m_updateableField.size() ; i ++ )
@@ -241,7 +241,7 @@ void UpdateableResultSet::insertRow( ) throw (SQLException, RuntimeException)
if( m_updateableField[i].isTouched )
{
if( columns > 0 )
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " , " ) );
+ buf.append( " , " );
columns ++;
bufferQuoteAnyConstant( buf, m_updateableField[i].value, *m_ppSettings );
@@ -252,7 +252,7 @@ void UpdateableResultSet::insertRow( ) throw (SQLException, RuntimeException)
}
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " )" ) );
+ buf.append( " )" );
Reference< XStatement > stmt =
extractConnectionFromStatement(m_owner)->createStatement();
@@ -312,9 +312,9 @@ void UpdateableResultSet::updateRow( ) throw (SQLException, RuntimeException)
*this, OUString(), 1, Any() );
OUStringBuffer buf( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "UPDATE " ) );
+ buf.append( "UPDATE " );
bufferQuoteQualifiedIdentifier( buf, m_schema, m_table, *m_ppSettings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SET " ) );
+ buf.append( "SET " );
int columns = 0;
for( UpdateableFieldVector::size_type i = 0; i < m_updateableField.size() ; i ++ )
@@ -322,11 +322,11 @@ void UpdateableResultSet::updateRow( ) throw (SQLException, RuntimeException)
if( m_updateableField[i].isTouched )
{
if( columns > 0 )
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+ buf.append( ", " );
columns ++;
buf.append( m_columnNames[i] );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" = " ) );
+ buf.append( " = " );
bufferQuoteAnyConstant( buf, m_updateableField[i].value, *m_ppSettings );
// OUString val;
// m_updateableField[i].value >>= val;
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
index c1f2d4e14cc6..a3dccb4fc55f 100644
--- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx
@@ -271,9 +271,9 @@ OUString columnMetaData2SDBCX(
// OUStringBuffer buf( 128 );
// OUString comment;
// evt.NewValue >>= comment;
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "COMMENT ON COLUMN" ) );
+// buf.append( "COMMENT ON COLUMN" );
// bufferQuoteQualifiedIdentifier( buf, m_schema, m_table , m_column );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "IS " ) );
+// buf.append( "IS " );
// bufferQuoteConstant( buf, comment,m_pSettings->encoding);
// printf( "changing comment of column %s to %s\n",
@@ -362,11 +362,11 @@ void alterColumnByDescriptor(
// past->getPropertyValue( st.SCHEMA_NAME ) != future->getPropertyValue( st.SCHEMA_NAME ))
// {
// OUStringBuffer buf(128);
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Can't move column " ) );
+// buf.append( "Can't move column " );
// buf.append( extractStringProperty( past, st.COLUMN_NAME ) );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " from table " ) );
+// buf.append( " from table " );
// buf.append( extractStringProperty( past, st.TABLE_NAME ) );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " to table " ) );
+// buf.append( " to table " );
// buf.append( extractStringProperty( past, st.TABLE_NAME ) );
// throw SQLException( buf.makeStringAndClear(), Reference< XInterface > () );
// }
@@ -384,9 +384,9 @@ void alterColumnByDescriptor(
if( ! pastColumnName.getLength())
{
// create a new column
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER TABLE" ) );
+ buf.append( "ALTER TABLE" );
bufferQuoteQualifiedIdentifier( buf, schemaName, tableName, settings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ADD COLUMN" ) );
+ buf.append( "ADD COLUMN" );
bufferQuoteIdentifier( buf, futureColumnName, settings );
buf.append( futureTypeName );
transaction.executeUpdate( buf.makeStringAndClear() );
@@ -402,11 +402,11 @@ void alterColumnByDescriptor(
if( pastColumnName != futureColumnName )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER TABLE" ) );
+ buf.append( "ALTER TABLE" );
bufferQuoteQualifiedIdentifier( buf, schemaName, tableName, settings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "RENAME COLUMN" ) );
+ buf.append( "RENAME COLUMN" );
bufferQuoteIdentifier( buf, pastColumnName, settings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "TO" ) );
+ buf.append( "TO" );
bufferQuoteIdentifier( buf, futureColumnName, settings );
transaction.executeUpdate( buf.makeStringAndClear() );
}
@@ -417,11 +417,11 @@ void alterColumnByDescriptor(
if( futureDefaultValue != pastDefaultValue )
{
buf = OUStringBuffer( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER TABLE" ) );
+ buf.append( "ALTER TABLE" );
bufferQuoteQualifiedIdentifier( buf, schemaName, tableName, settings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER COLUMN" ) );
+ buf.append( "ALTER COLUMN" );
bufferQuoteIdentifier( buf, futureColumnName, settings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SET DEFAULT " ) );
+ buf.append( "SET DEFAULT " );
// LEM TODO: check out
// default value is not quoted, caller needs to quote himself (otherwise
// how to pass e.g. nextval('something' ) ????
@@ -435,19 +435,19 @@ void alterColumnByDescriptor(
if( futureNullable != pastNullable )
{
buf = OUStringBuffer( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER TABLE" ) );
+ buf.append( "ALTER TABLE" );
bufferQuoteQualifiedIdentifier( buf, schemaName, tableName, settings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER COLUMN" ) );
+ buf.append( "ALTER COLUMN" );
bufferQuoteIdentifier( buf, futureColumnName, settings );
if( futureNullable == com::sun::star::sdbc::ColumnValue::NO_NULLS )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SET" ) );
+ buf.append( "SET" );
}
else
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "DROP" ) );
+ buf.append( "DROP" );
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " NOT NULL" ) );
+ buf.append( " NOT NULL" );
transaction.executeUpdate( buf.makeStringAndClear() );
}
@@ -462,9 +462,9 @@ void alterColumnByDescriptor(
if( futureComment != pastComment )
{
buf = OUStringBuffer( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "COMMENT ON COLUMN" ) );
+ buf.append( "COMMENT ON COLUMN" );
bufferQuoteQualifiedIdentifier( buf, schemaName, tableName , futureColumnName, settings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "IS " ) );
+ buf.append( "IS " );
bufferQuoteConstant( buf, futureComment, settings );
transaction.executeUpdate( buf.makeStringAndClear() );
}
diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
index 5366230e46b0..5393b480da1c 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
@@ -209,15 +209,15 @@ void Indexes::appendByDescriptor(
OUStringBuffer buf( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "CREATE " ) );
+ buf.append( "CREATE " );
if( isUnique )
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "UNIQUE " ) );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "INDEX " ) );
+ buf.append( "UNIQUE " );
+ buf.append( "INDEX " );
bufferQuoteIdentifier( buf, name, m_pSettings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ON " ) );
+ buf.append( " ON " );
bufferQuoteQualifiedIdentifier( buf, m_schemaName, m_tableName, m_pSettings );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ( " ) );
+ buf.append( " ( " );
Reference< XColumnsSupplier > columns( descriptor, UNO_QUERY );
if( columns.is() )
@@ -236,13 +236,13 @@ void Indexes::appendByDescriptor(
}
else
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+ buf.append( ", " );
}
buf.append( extractStringProperty( column, st.NAME ) );
}
}
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ) " ) );
+ buf.append( " ) " );
m_origin->createStatement()->executeUpdate( buf.makeStringAndClear() );
refresh();
@@ -273,7 +273,7 @@ void Indexes::dropByIndex( sal_Int32 index )
Statics &st = getStatics();
OUStringBuffer buf( 128 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "DROP INDEX " ) );
+ buf.append( "DROP INDEX " );
bufferQuoteIdentifier( buf, extractStringProperty( set, st.NAME ), m_pSettings );
m_origin->createStatement()->executeUpdate( buf.makeStringAndClear() );
diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
index 4e062df79cc0..406b9b6e5425 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx
@@ -183,11 +183,11 @@ void KeyColumns::refresh()
// // past->getPropertyValue( st.SCHEMA_NAME ) != future->getPropertyValue( st.SCHEMA_NAME ))
// // {
// // OUStringBuffer buf(128);
-// // buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Can't move column " ) );
+// // buf.append( "Can't move column " );
// // buf.append( extractStringProperty( past, st.COLUMN_NAME ) );
-// // buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " from table " ) );
+// // buf.append( " from table " );
// // buf.append( extractStringProperty( past, st.TABLE_NAME ) );
-// // buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " to table " ) );
+// // buf.append( " to table " );
// // buf.append( extractStringProperty( past, st.TABLE_NAME ) );
// // throw SQLException( buf.makeStringAndClear(), Reference< XInterface > () );
// // }
@@ -205,9 +205,9 @@ void KeyColumns::refresh()
// if( ! pastColumnName.getLength())
// {
// // create a new column
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER TABLE" ) );
+// buf.append( "ALTER TABLE" );
// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ADD COLUMN" ) );
+// buf.append( "ADD COLUMN" );
// bufferQuoteIdentifier( buf, futureColumnName );
// buf.append( futureTypeName );
// transaction.executeUpdate( buf.makeStringAndClear() );
@@ -223,11 +223,11 @@ void KeyColumns::refresh()
// if( pastColumnName != futureColumnName )
// {
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER TABLE" ) );
+// buf.append( "ALTER TABLE" );
// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "RENAME COLUMN" ) );
+// buf.append( "RENAME COLUMN" );
// bufferQuoteIdentifier( buf, pastColumnName );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "TO" ) );
+// buf.append( "TO" );
// bufferQuoteIdentifier( buf, futureColumnName );
// transaction.executeUpdate( buf.makeStringAndClear() );
// }
@@ -238,11 +238,11 @@ void KeyColumns::refresh()
// if( futureDefaultValue != pastDefaultValue )
// {
// buf = OUStringBuffer( 128 );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER TABLE" ) );
+// buf.append( "ALTER TABLE" );
// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER COLUMN" ) );
+// buf.append( "ALTER COLUMN" );
// bufferQuoteIdentifier( buf, futureColumnName );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SET DEFAULT " ) );
+// buf.append( "SET DEFAULT " );
// // default value is not quoted, caller needs to quote himself (otherwise
// // how to pass e.g. nextval('something' ) ????
// buf.append( futureDefaultValue );
@@ -255,19 +255,19 @@ void KeyColumns::refresh()
// if( futureNullable != pastNullable )
// {
// buf = OUStringBuffer( 128 );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER TABLE" ) );
+// buf.append( "ALTER TABLE" );
// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ALTER COLUMN" ) );
+// buf.append( "ALTER COLUMN" );
// bufferQuoteIdentifier( buf, futureColumnName );
// if( futureNullable == com::sun::star::sdbc::ColumnValue::NO_NULLS )
// {
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SET" ) );
+// buf.append( "SET" );
// }
// else
// {
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "DROP" ) );
+// buf.append( "DROP" );
// }
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " NOT NULL" ) );
+// buf.append( " NOT NULL" );
// transaction.executeUpdate( buf.makeStringAndClear() );
// }
@@ -276,9 +276,9 @@ void KeyColumns::refresh()
// if( futureComment != pastComment )
// {
// buf = OUStringBuffer( 128 );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "COMMENT ON COLUMN" ) );
+// buf.append( "COMMENT ON COLUMN" );
// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName , futureColumnName );
-// buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "IS " ) );
+// buf.append( "IS " );
// bufferQuoteConstant( buf, futureComment,encoding);
// transaction.executeUpdate( buf.makeStringAndClear() );
// }