diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-08-23 12:20:13 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-08-23 12:20:13 +0000 |
commit | c9ccac08f19c98da0f5e029ec16aab05ae819093 (patch) | |
tree | 947bb035dfd23dd3890ccd2c7f9cc2da9f3f4717 /connectivity/source/drivers/adabas/BConnection.cxx | |
parent | 9533236604ae938dbf275c6083e9f05975b75526 (diff) |
#97975# parse statement to correct column nullable property when asked for
Diffstat (limited to 'connectivity/source/drivers/adabas/BConnection.cxx')
-rw-r--r-- | connectivity/source/drivers/adabas/BConnection.cxx | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/connectivity/source/drivers/adabas/BConnection.cxx b/connectivity/source/drivers/adabas/BConnection.cxx index 30dae1cb5a..34c3740fe3 100644 --- a/connectivity/source/drivers/adabas/BConnection.cxx +++ b/connectivity/source/drivers/adabas/BConnection.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BConnection.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: hr $ $Date: 2001-10-17 16:13:51 $ + * last change: $Author: oj $ $Date: 2002-08-23 13:20:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,7 +92,12 @@ #ifndef _DBHELPER_DBCHARSET_HXX_ #include <connectivity/dbcharset.hxx> #endif - +#ifndef _CONNECTIVITY_PARSE_SQLITERATOR_HXX_ +#include "connectivity/sqliterator.hxx" +#endif +#ifndef _CONNECTIVITY_SQLPARSE_HXX +#include <connectivity/sqlparse.hxx> +#endif using namespace connectivity::adabas; using namespace connectivity; @@ -313,6 +318,25 @@ Sequence< sal_Int8 > OAdabasConnection::getUnoTunnelImplementationId() return new OAdabasConnection(m_pDriverHandleCopy,m_pDriver); } // ----------------------------------------------------------------------------- +::vos::ORef<OSQLColumns> OAdabasConnection::createSelectColumns(const ::rtl::OUString& _rSql) +{ + ::vos::ORef<OSQLColumns> aRet; + OSQLParser aParser(getDriver()->getORB()); + ::rtl::OUString sErrorMessage; + OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,_rSql); + if(pNode) + { + Reference< XTablesSupplier> xCata = createCatalog(); + OSQLParseTreeIterator aParseIter(xCata->getTables(), + getMetaData(), + pNode, + &aParser); + aParseIter.traverseAll(); + aRet = aParseIter.getSelectColumns(); + } + return aRet; +} +// ----------------------------------------------------------------------------- |