About parts in ODatabaseMetaData.cxx (connectivy module/odbc part)

julien2412 serval2412 at yahoo.fr
Thu Apr 3 13:28:24 PDT 2014


Hello,

Taking a look at connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
without particular reason, I noticed this:
   1044 sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated(  )
throw(SQLException, RuntimeException, std::exception)
   1045 {
   1046     OUString aValue;
   1047    
OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ORDER_BY_COLUMNS_IN_SELECT,aValue,*this,m_pConnection->getTextEncoding());
   1048     return aValue.toChar() == 'N';
   1049 }
See
http://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx#1044

Whereas all the other blocks compare to 'Y', I don't understand why it
should be compared to 'N' and not to 'Y' like the other blocks.


Also, I noticed in this same file:
   1252 sal_Int32 SAL_CALL
ODatabaseMetaData::getDefaultTransactionIsolation(  ) throw(SQLException,
RuntimeException, std::exception)
   1253 {
   1254     SQLUINTEGER nValue;
   1255    
OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this);
   1256     return nValue;
   1257 }

Searching about getDefaultTransactionIsolation, I found
SQL_DEFAULT_TXN_ISOLATION. But this attribute isn't in sqlext.h but in
isqlext.h (see
http://sourcecodebrowser.com/unixodbc/2.2.11/nn_2isqlext_8h.html)
Nevertheless, looking the number of locations where sqlext.h is used in LO,
I wonder what impact would be including isqlext.h
Still, the above code with SQL_SUBQUERIES seems weird.

Any idea?

Julien



--
View this message in context: http://nabble.documentfoundation.org/About-parts-in-ODatabaseMetaData-cxx-connectivy-module-odbc-part-tp4104005.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list