From 1716b3a338b19b9d1be39696866b376aed216c9a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 12 Oct 2015 13:43:35 +0200 Subject: remove some useless comments found with git grep '// /' Change-Id: I948cf9ae61bbbf2ec706ca5b0572c4f27c58c745 --- .../source/drivers/postgresql/pq_xkeycolumns.cxx | 114 --------------------- 1 file changed, 114 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx index ae99c811b263..bfdfd24f1e8f 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx @@ -169,120 +169,6 @@ void KeyColumns::refresh() } -// void alterColumnByDescriptor( -// const OUString & schemaName, -// const OUString & tableName, -// rtl_TextEncoding encoding, -// const Reference< XStatement > &stmt, -// const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & past, -// const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & future) -// { -// Statics & st = getStatics(); - -// // if( past->getPropertyValue( st.TABLE_NAME ) != future->getPropertyValue( st.TABLE_NAME ) || -// // past->getPropertyValue( st.SCHEMA_NAME ) != future->getPropertyValue( st.SCHEMA_NAME )) -// // { -// // OUStringBuffer buf(128); -// // buf.append( "Can't move column " ); -// // buf.append( extractStringProperty( past, st.COLUMN_NAME ) ); -// // buf.append( " from table " ); -// // buf.append( extractStringProperty( past, st.TABLE_NAME ) ); -// // buf.append( " to table " ); -// // buf.append( extractStringProperty( past, st.TABLE_NAME ) ); -// // throw SQLException( buf.makeStringAndClear() ); -// // } - -// // OUString tableName = extractStringProperty( past, st.TABLE_NAME ); -// // OUString schemaName = extractStringProperty( past, st.SCHEMA_NAME ); -// OUString pastColumnName = extractStringProperty( past, st.NAME ); -// OUString futureColumnName = extractStringProperty( future, st.NAME ); -// OUString pastTypeName = sqltype2string( past ); -// OUString futureTypeName = sqltype2string( future ); - -// TransactionGuard transaction( stmt ); - -// OUStringBuffer buf( 128 ); -// if( ! pastColumnName.getLength()) -// { -// // create a new column -// buf.append( "ALTER TABLE" ); -// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName ); -// buf.append( "ADD COLUMN" ); -// bufferQuoteIdentifier( buf, futureColumnName ); -// buf.append( futureTypeName ); -// transaction.executeUpdate( buf.makeStringAndClear() ); -// } -// else -// { -// if( pastTypeName != futureTypeName ) -// { -// throw RuntimeException( -// "Can't modify column types, drop the column and create a new one" ); -// } - -// if( pastColumnName != futureColumnName ) -// { -// buf.append( "ALTER TABLE" ); -// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName ); -// buf.append( "RENAME COLUMN" ); -// bufferQuoteIdentifier( buf, pastColumnName ); -// buf.append( "TO" ); -// bufferQuoteIdentifier( buf, futureColumnName ); -// transaction.executeUpdate( buf.makeStringAndClear() ); -// } -// } - -// OUString futureDefaultValue = extractStringProperty( future, st.DEFAULT_VALUE ); -// OUString pastDefaultValue = extractStringProperty( past, st.DEFAULT_VALUE ); -// if( futureDefaultValue != pastDefaultValue ) -// { -// buf = OUStringBuffer( 128 ); -// buf.append( "ALTER TABLE" ); -// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName ); -// buf.append( "ALTER COLUMN" ); -// bufferQuoteIdentifier( buf, futureColumnName ); -// 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 ); -// // bufferQuoteConstant( buf, defaultValue, encoding ); -// transaction.executeUpdate( buf.makeStringAndClear() ); -// } - -// sal_Int32 futureNullable = extractIntProperty( future, st.IS_NULLABLE ); -// sal_Int32 pastNullable = extractIntProperty( past, st.IS_NULLABLE ); -// if( futureNullable != pastNullable ) -// { -// buf = OUStringBuffer( 128 ); -// buf.append( "ALTER TABLE" ); -// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName ); -// buf.append( "ALTER COLUMN" ); -// bufferQuoteIdentifier( buf, futureColumnName ); -// if( futureNullable == com::sun::star::sdbc::ColumnValue::NO_NULLS ) -// { -// buf.append( "SET" ); -// } -// else -// { -// buf.append( "DROP" ); -// } -// buf.append( " NOT NULL" ); -// transaction.executeUpdate( buf.makeStringAndClear() ); -// } - -// OUString futureComment = extractStringProperty( future, st.DESCRIPTION ); -// OUString pastComment = extractStringProperty( past, st.DESCRIPTION ); -// if( futureComment != pastComment ) -// { -// buf = OUStringBuffer( 128 ); -// buf.append( "COMMENT ON COLUMN" ); -// bufferQuoteQualifiedIdentifier( buf, schemaName, tableName , futureColumnName ); -// buf.append( "IS " ); -// bufferQuoteConstant( buf, futureComment,encoding); -// transaction.executeUpdate( buf.makeStringAndClear() ); -// } -// transaction.commit(); -// } void KeyColumns::appendByDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& future ) -- cgit