Files
libreoffice/connectivity/source/parse/sqliterator.cxx

2250 lines
97 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 15:18:56 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 15:18:56 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 15:18:56 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 15:18:56 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 15:18:56 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 15:18:56 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 15:18:56 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 15:18:56 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
2000-09-18 15:18:56 +00:00
#include "connectivity/sqliterator.hxx"
#include "connectivity/sdbcx/VTable.hxx"
2000-09-18 15:18:56 +00:00
#include <connectivity/sqlparse.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/sqlerror.hxx>
2000-09-18 15:18:56 +00:00
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdb/ErrorCondition.hpp>
2000-09-18 15:18:56 +00:00
#ifdef SQL_TEST_PARSETREEITERATOR
#include <iostream>
2000-09-18 15:18:56 +00:00
#endif
#include "connectivity/PColumn.hxx"
2001-02-01 12:10:17 +00:00
#include "connectivity/dbtools.hxx"
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
#include <tools/diagnose_ex.h>
2001-05-14 10:42:44 +00:00
#include "TConnection.hxx"
2001-05-18 07:33:49 +00:00
#include <comphelper/types.hxx>
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
#include <connectivity/dbmetadata.hxx>
#include <com/sun/star/sdb/SQLFilterOperator.hpp>
#include "diagnose_ex.h"
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
#include <rtl/logfile.hxx>
2000-09-18 15:18:56 +00:00
#define SQL_ISRULEOR2(pParseNode, e1,e2) ((pParseNode)->isRule() && (\
(pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e1) || \
(pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e2)))
2001-05-18 07:33:49 +00:00
using namespace ::comphelper;
2001-02-01 12:10:17 +00:00
using namespace ::connectivity;
using namespace ::connectivity::sdbcx;
using namespace ::dbtools;
2001-02-01 12:10:17 +00:00
using namespace ::connectivity::parse;
using namespace ::com::sun::star;
2000-09-18 15:18:56 +00:00
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
2000-09-18 15:18:56 +00:00
namespace connectivity
{
struct OSQLParseTreeIteratorImpl
{
::std::vector< TNodePair > m_aJoinConditions;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
Reference< XConnection > m_xConnection;
Reference< XDatabaseMetaData > m_xDatabaseMetaData;
Reference< XNameAccess > m_xTableContainer;
Reference< XNameAccess > m_xQueryContainer;
::boost::shared_ptr< OSQLTables > m_pTables; /// all tables which participate in the SQL statement
::boost::shared_ptr< OSQLTables > m_pSubTables; /// all tables from sub queries not the tables from the select tables
::boost::shared_ptr< QueryNameSet > m_pForbiddenQueryNames;
sal_uInt32 m_nIncludeMask;
bool m_bIsCaseSensitive;
OSQLParseTreeIteratorImpl( const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxTables )
:m_xConnection( _rxConnection )
,m_nIncludeMask( OSQLParseTreeIterator::All )
,m_bIsCaseSensitive( true )
{
OSL_PRECOND( m_xConnection.is(), "OSQLParseTreeIteratorImpl::OSQLParseTreeIteratorImpl: invalid connection!" );
m_xDatabaseMetaData = m_xConnection->getMetaData();
m_bIsCaseSensitive = m_xDatabaseMetaData.is() && m_xDatabaseMetaData->supportsMixedCaseQuotedIdentifiers();
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
m_pTables.reset( new OSQLTables( m_bIsCaseSensitive ) );
m_pSubTables.reset( new OSQLTables( m_bIsCaseSensitive ) );
m_xTableContainer = _rxTables;
DatabaseMetaData aMetaData( m_xConnection );
if ( aMetaData.supportsSubqueriesInFrom() )
{
// connections might support the XQueriesSupplier interface, if they implement the css.sdb.Connection
// service
Reference< XQueriesSupplier > xSuppQueries( m_xConnection, UNO_QUERY );
if ( xSuppQueries.is() )
m_xQueryContainer = xSuppQueries->getQueries();
}
}
public:
inline bool isQueryAllowed( const ::rtl::OUString& _rQueryName )
{
if ( !m_pForbiddenQueryNames.get() )
return true;
if ( m_pForbiddenQueryNames->find( _rQueryName ) == m_pForbiddenQueryNames->end() )
return true;
return false;
}
};
//-------------------------------------------------------------------------
/** helper class for temporarily adding a query name to a list of forbidden query names
*/
class ForbidQueryName
{
::boost::shared_ptr< QueryNameSet >& m_rpAllForbiddenNames;
::rtl::OUString m_sForbiddenQueryName;
public:
ForbidQueryName( OSQLParseTreeIteratorImpl& _rIteratorImpl, const ::rtl::OUString _rForbiddenQueryName )
:m_rpAllForbiddenNames( _rIteratorImpl.m_pForbiddenQueryNames )
,m_sForbiddenQueryName( _rForbiddenQueryName )
{
if ( !m_rpAllForbiddenNames.get() )
m_rpAllForbiddenNames.reset( new QueryNameSet );
m_rpAllForbiddenNames->insert( m_sForbiddenQueryName );
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
~ForbidQueryName()
{
m_rpAllForbiddenNames->erase( m_sForbiddenQueryName );
}
};
}
2000-09-18 15:18:56 +00:00
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSQLParseTreeIterator::OSQLParseTreeIterator(const Reference< XConnection >& _rxConnection,
const Reference< XNameAccess >& _rxTables,
const OSQLParser& _rParser,
const OSQLParseNode* pRoot )
:m_rParser( _rParser )
,m_pImpl( new OSQLParseTreeIteratorImpl( _rxConnection, _rxTables ) )
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::OSQLParseTreeIterator" );
2000-09-18 15:18:56 +00:00
setParseTree(pRoot);
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
//-----------------------------------------------------------------------------
OSQLParseTreeIterator::OSQLParseTreeIterator( const OSQLParseTreeIterator& _rParentIterator, const OSQLParser& _rParser, const OSQLParseNode* pRoot )
:m_rParser( _rParser )
,m_pImpl( new OSQLParseTreeIteratorImpl( _rParentIterator.m_pImpl->m_xConnection, _rParentIterator.m_pImpl->m_xTableContainer ) )
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::OSQLParseTreeIterator" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
m_pImpl->m_pForbiddenQueryNames = _rParentIterator.m_pImpl->m_pForbiddenQueryNames;
setParseTree( pRoot );
}
2000-09-18 15:18:56 +00:00
//-----------------------------------------------------------------------------
OSQLParseTreeIterator::~OSQLParseTreeIterator()
{
dispose();
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
// -----------------------------------------------------------------------------
const OSQLTables& OSQLParseTreeIterator::getTables() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getTables" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return *m_pImpl->m_pTables;
}
// -----------------------------------------------------------------------------
bool OSQLParseTreeIterator::isCaseSensitive() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::isCaseSensitive" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return m_pImpl->m_bIsCaseSensitive;
}
2000-11-03 12:31:35 +00:00
// -----------------------------------------------------------------------------
void OSQLParseTreeIterator::dispose()
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::dispose" );
m_aSelectColumns = NULL;
m_aGroupColumns = NULL;
m_aOrderColumns = NULL;
m_aParameters = NULL;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
m_pImpl->m_xTableContainer = NULL;
m_pImpl->m_xDatabaseMetaData = NULL;
m_aCreateColumns = NULL;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
m_pImpl->m_pTables->clear();
m_pImpl->m_pSubTables->clear();
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::setParseTree(const OSQLParseNode * pNewParseTree)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::setParseTree" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
m_pImpl->m_pTables->clear();
m_pImpl->m_pSubTables->clear();
2000-09-18 15:18:56 +00:00
m_aSelectColumns = new OSQLColumns();
m_aGroupColumns = new OSQLColumns();
m_aOrderColumns = new OSQLColumns();
m_aParameters = new OSQLColumns();
m_aCreateColumns = new OSQLColumns();
2000-09-18 15:18:56 +00:00
m_pParseTree = pNewParseTree;
if (!m_pParseTree)
{
m_eStatementType = SQL_STATEMENT_UNKNOWN;
return;
}
// falls m_pParseTree aber keine Connection, dann Fehler
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( !m_pImpl->m_xTableContainer.is() )
2000-09-18 15:18:56 +00:00
return;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
m_aErrors = SQLException();
2000-09-18 15:18:56 +00:00
// Statement-Typ ermitteln ...
if (SQL_ISRULE(m_pParseTree,select_statement) || SQL_ISRULE(m_pParseTree,union_statement) )
{
m_eStatementType = SQL_STATEMENT_SELECT;
}
else if (SQL_ISRULE(m_pParseTree,insert_statement))
{
m_eStatementType = SQL_STATEMENT_INSERT;
}
else if (SQL_ISRULE(m_pParseTree,update_statement_searched))
{
m_eStatementType = SQL_STATEMENT_UPDATE;
}
else if (SQL_ISRULE(m_pParseTree,delete_statement_searched))
{
m_eStatementType = SQL_STATEMENT_DELETE;
}
else if (m_pParseTree->count() == 3 && SQL_ISRULE(m_pParseTree->getChild(1),odbc_call_spec))
{
m_eStatementType = SQL_STATEMENT_ODBC_CALL;
}
else if (SQL_ISRULE(m_pParseTree->getChild(0),base_table_def))
{
m_eStatementType = SQL_STATEMENT_CREATE_TABLE;
m_pParseTree = m_pParseTree->getChild(0);
}
2000-09-18 15:18:56 +00:00
else
{
m_eStatementType = SQL_STATEMENT_UNKNOWN;
//aIteratorStatus.setInvalidStatement();
return;
}
}
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
namespace
2000-09-18 15:18:56 +00:00
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
//.........................................................................
static void impl_getRowString( const Reference< XRow >& _rxRow, const sal_Int32 _nColumnIndex, ::rtl::OUString& _out_rString )
{
_out_rString = _rxRow->getString( _nColumnIndex );
if ( _rxRow->wasNull() )
_out_rString= ::rtl::OUString();
}
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
//.........................................................................
static ::rtl::OUString lcl_findTableInMetaData(
const Reference< XDatabaseMetaData >& _rxDBMeta, const ::rtl::OUString& _rCatalog,
const ::rtl::OUString& _rSchema, const ::rtl::OUString& _rTableName )
{
::rtl::OUString sComposedName;
static const ::rtl::OUString s_sTableTypeView(RTL_CONSTASCII_USTRINGPARAM("VIEW"));
static const ::rtl::OUString s_sTableTypeTable(RTL_CONSTASCII_USTRINGPARAM("TABLE"));
static const ::rtl::OUString s_sWildcard( RTL_CONSTASCII_USTRINGPARAM( "%" ));
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
// we want all catalogues, all schemas, all tables
Sequence< ::rtl::OUString > sTableTypes(3);
sTableTypes[0] = s_sTableTypeView;
sTableTypes[1] = s_sTableTypeTable;
sTableTypes[2] = s_sWildcard; // just to be sure to include anything else ....
if ( _rxDBMeta.is() )
{
sComposedName = ::rtl::OUString();
Reference< XResultSet> xRes = _rxDBMeta->getTables(
_rCatalog.getLength() ? makeAny( _rCatalog ) : Any(), _rSchema.getLength() ? _rSchema : s_sWildcard, _rTableName, sTableTypes );
Reference< XRow > xCurrentRow( xRes, UNO_QUERY );
if ( xCurrentRow.is() && xRes->next() )
{
::rtl::OUString sCatalog, sSchema, sName;
impl_getRowString( xCurrentRow, 1, sCatalog );
impl_getRowString( xCurrentRow, 2, sSchema );
impl_getRowString( xCurrentRow, 3, sName );
sComposedName = ::dbtools::composeTableName(
_rxDBMeta,
sCatalog,
sSchema,
sName,
sal_False,
::dbtools::eInDataManipulation
);
}
}
return sComposedName;
}
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::impl_getQueryParameterColumns( const OSQLTable& _rQuery )
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::impl_getQueryParameterColumns" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( ( m_pImpl->m_nIncludeMask & Parameters ) != Parameters )
// parameters not to be included in the traversal
return;
2010-10-15 12:10:06 -05:00
::rtl::Reference< OSQLColumns > pSubQueryParameterColumns( new OSQLColumns() );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
// get the command and the EscapeProcessing properties from the sub query
::rtl::OUString sSubQueryCommand;
sal_Bool bEscapeProcessing = sal_False;
try
{
Reference< XPropertySet > xQueryProperties( _rQuery, UNO_QUERY_THROW );
OSL_VERIFY( xQueryProperties->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_COMMAND ) ) >>= sSubQueryCommand );
OSL_VERIFY( xQueryProperties->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_ESCAPEPROCESSING ) ) >>= bEscapeProcessing );
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
// parse the sub query
do {
if ( !bEscapeProcessing || ( sSubQueryCommand.getLength() == 0 ) )
break;
::rtl::OUString sError;
::std::auto_ptr< OSQLParseNode > pSubQueryNode( const_cast< OSQLParser& >( m_rParser ).parseTree( sError, sSubQueryCommand, sal_False ) );
if ( !pSubQueryNode.get() )
break;
OSQLParseTreeIterator aSubQueryIterator( *this, m_rParser, pSubQueryNode.get() );
aSubQueryIterator.traverseSome( Parameters | SelectColumns );
// SelectColumns might also contain parameters
// #i77635# - 2007-07-23 / frank.schoenheit@sun.com
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
pSubQueryParameterColumns = aSubQueryIterator.getParameters();
aSubQueryIterator.dispose();
} while ( false );
// copy the parameters of the sub query to our own parameter array
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
::std::copy( pSubQueryParameterColumns->get().begin(), pSubQueryParameterColumns->get().end(),
::std::insert_iterator< OSQLColumns::Vector >( m_aParameters->get(), m_aParameters->get().end() ) );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
//-----------------------------------------------------------------------------
OSQLTable OSQLParseTreeIterator::impl_locateRecordSource( const ::rtl::OUString& _rComposedName )
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::impl_locateRecordSource" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( !_rComposedName.getLength() )
{
OSL_FAIL( "OSQLParseTreeIterator::impl_locateRecordSource: no object name at all?" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return OSQLTable();
}
OSQLTable aReturn;
::rtl::OUString sComposedName( _rComposedName );
try
{
::rtl::OUString sCatalog, sSchema, sName;
qualifiedNameComponents( m_pImpl->m_xDatabaseMetaData, sComposedName, sCatalog, sSchema, sName, ::dbtools::eInDataManipulation );
// check whether there is a query with the given name
bool bQueryDoesExist = m_pImpl->m_xQueryContainer.is() && m_pImpl->m_xQueryContainer->hasByName( sComposedName );
// check whether the table container contains an object with the given name
if ( !bQueryDoesExist && !m_pImpl->m_xTableContainer->hasByName( sComposedName ) )
sComposedName = lcl_findTableInMetaData( m_pImpl->m_xDatabaseMetaData, sCatalog, sSchema, sName );
bool bTableDoesExist = m_pImpl->m_xTableContainer->hasByName( sComposedName );
// now obtain the object
// if we're creating a table, and there already is a table or query with the same name,
// this is worth an error
if ( SQL_STATEMENT_CREATE_TABLE == m_eStatementType )
{
if ( bQueryDoesExist )
impl_appendError( IParseContext::ERROR_INVALID_QUERY_EXIST, &sName );
else if ( bTableDoesExist )
impl_appendError( IParseContext::ERROR_INVALID_TABLE_EXIST, &sName );
else
aReturn = impl_createTableObject( sName, sCatalog, sSchema );
}
else
{
// queries win over tables, so if there's a query with this name, take this, no matter if
// there's a table, too
if ( bQueryDoesExist )
{
if ( !m_pImpl->isQueryAllowed( sComposedName ) )
{
impl_appendError( m_rParser.getErrorHelper().getSQLException( sdb::ErrorCondition::PARSER_CYCLIC_SUB_QUERIES, NULL ) );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return NULL;
}
m_pImpl->m_xQueryContainer->getByName( sComposedName ) >>= aReturn;
// collect the parameters from the sub query
ForbidQueryName aForbidName( *m_pImpl, sComposedName );
impl_getQueryParameterColumns( aReturn );
}
else if ( bTableDoesExist )
m_pImpl->m_xTableContainer->getByName( sComposedName ) >>= aReturn;
else
{
if ( m_pImpl->m_xQueryContainer.is() )
// the connection on which we're working supports sub queries in from (else
// m_xQueryContainer would not have been set), so emit a better error message
impl_appendError( IParseContext::ERROR_INVALID_TABLE_OR_QUERY, &sName );
else
impl_appendError( IParseContext::ERROR_INVALID_TABLE, &sName );
}
}
}
catch(Exception&)
{
impl_appendError( IParseContext::ERROR_INVALID_TABLE, &sComposedName );
}
return aReturn;
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQLParseNode * pTableName, const ::rtl::OUString & rTableRange )
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseOneTableName" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( ( m_pImpl->m_nIncludeMask & TableNames ) != TableNames )
// tables should not be included in the traversal
return;
2000-09-18 15:18:56 +00:00
2001-03-21 12:52:43 +00:00
OSL_ENSURE(pTableName != NULL,"OSQLParseTreeIterator::traverseOneTableName: pTableName == NULL");
2000-10-19 10:47:14 +00:00
2001-01-09 12:11:07 +00:00
Any aCatalog;
::rtl::OUString aSchema,aTableName,aComposedName;
2000-10-19 10:47:14 +00:00
::rtl::OUString aTableRange(rTableRange);
2000-09-18 15:18:56 +00:00
// Tabellenname abholen
OSQLParseNode::getTableComponents(pTableName,aCatalog,aSchema,aTableName,m_pImpl->m_xDatabaseMetaData);
2001-01-09 12:11:07 +00:00
// create the composed name like DOMAIN.USER.TABLE1
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
aComposedName = ::dbtools::composeTableName(m_pImpl->m_xDatabaseMetaData,
2001-01-09 12:11:07 +00:00
aCatalog.hasValue() ? ::comphelper::getString(aCatalog) : ::rtl::OUString(),
aSchema,
aTableName,
sal_False,
::dbtools::eInDataManipulation);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
2001-01-09 12:11:07 +00:00
// if there is no alias for the table name assign the orignal name to it
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( !aTableRange.getLength() )
2001-01-09 12:11:07 +00:00
aTableRange = aComposedName;
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
// get the object representing this table/query
OSQLTable aTable = impl_locateRecordSource( aComposedName );
if ( aTable.is() )
_rTables[ aTableRange ] = aTable;
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoinCondition)
{
if (i_pJoinCondition->count() == 3 && // Ausdruck is geklammert
SQL_ISPUNCTUATION(i_pJoinCondition->getChild(0),"(") &&
SQL_ISPUNCTUATION(i_pJoinCondition->getChild(2),")"))
{
impl_fillJoinConditions(i_pJoinCondition->getChild(1));
}
else if (SQL_ISRULEOR2(i_pJoinCondition,search_condition,boolean_term) && // AND/OR-Verknuepfung:
i_pJoinCondition->count() == 3)
{
// nur AND Verkn<6B>pfung zulassen
if ( SQL_ISTOKEN(i_pJoinCondition->getChild(1),AND) )
{
impl_fillJoinConditions(i_pJoinCondition->getChild(0));
impl_fillJoinConditions(i_pJoinCondition->getChild(1));
}
}
else if (SQL_ISRULE(i_pJoinCondition,comparison_predicate))
{
// only the comparison of columns is allowed
OSL_ENSURE(i_pJoinCondition->count() == 3,"OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree");
if (SQL_ISRULE(i_pJoinCondition->getChild(0),column_ref) &&
SQL_ISRULE(i_pJoinCondition->getChild(2),column_ref) &&
i_pJoinCondition->getChild(1)->getNodeType() == SQL_NODE_EQUAL)
{
m_pImpl->m_aJoinConditions.push_back( TNodePair(i_pJoinCondition->getChild(0),i_pJoinCondition->getChild(2)) );
}
}
}
//-----------------------------------------------------------------------------
::std::vector< TNodePair >& OSQLParseTreeIterator::getJoinConditions() const
{
return m_pImpl->m_aJoinConditions;
}
2000-09-18 15:18:56 +00:00
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
void OSQLParseTreeIterator::getQualified_join( OSQLTables& _rTables, const OSQLParseNode *pTableRef, ::rtl::OUString& aTableRange )
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getQualified_join" );
OSL_PRECOND( SQL_ISRULE( pTableRef, cross_union ) || SQL_ISRULE( pTableRef, qualified_join ) ,
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
"OSQLParseTreeIterator::getQualified_join: illegal node!" );
2000-10-19 10:47:14 +00:00
aTableRange = ::rtl::OUString();
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
const OSQLParseNode* pNode = getTableNode(_rTables,pTableRef->getChild(0),aTableRange);
if ( isTableNode( pNode ) )
traverseOneTableName( _rTables, pNode, aTableRange );
2001-07-19 08:29:22 +00:00
2000-10-19 10:47:14 +00:00
sal_uInt32 nPos = 4;
if( SQL_ISRULE(pTableRef,cross_union) || pTableRef->getChild(1)->getTokenID() != SQL_TOKEN_NATURAL)
{
2000-09-18 15:18:56 +00:00
nPos = 3;
// join_condition,named_columns_join
if ( SQL_ISRULE( pTableRef, qualified_join ) )
{
const OSQLParseNode* pJoin_spec = pTableRef->getChild(4);
if ( SQL_ISRULE( pJoin_spec, join_condition ) )
{
impl_fillJoinConditions(pJoin_spec->getChild(1));
}
else
{
const OSQLParseNode* pColumnCommalist = pJoin_spec->getChild(2);
// Alle Columns in der column_commalist ...
for (sal_uInt32 i = 0; i < pColumnCommalist->count(); i++)
{
const OSQLParseNode * pCol = pColumnCommalist->getChild(i);
// add twice because the column must exists in both tables
m_pImpl->m_aJoinConditions.push_back( TNodePair(pCol,pCol) );
}
}
}
}
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
pNode = getTableNode(_rTables,pTableRef->getChild(nPos),aTableRange);
if ( isTableNode( pNode ) )
traverseOneTableName( _rTables, pNode, aTableRange );
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables, const OSQLParseNode *pTableRef,::rtl::OUString& rTableRange )
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getTableNode" );
OSL_PRECOND( SQL_ISRULE( pTableRef, table_ref ) || SQL_ISRULE( pTableRef, joined_table )
|| SQL_ISRULE( pTableRef, qualified_join ) || SQL_ISRULE( pTableRef, cross_union ),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
"OSQLParseTreeIterator::getTableNode: only to be called for table_ref nodes!" );
2000-10-19 10:47:14 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
const OSQLParseNode* pTableNameNode = NULL;
if ( SQL_ISRULE( pTableRef, joined_table ) )
{
getQualified_join( _rTables, pTableRef->getChild(1), rTableRange );
}
if ( SQL_ISRULE( pTableRef, qualified_join ) || SQL_ISRULE( pTableRef, cross_union ) )
2000-09-18 15:18:56 +00:00
{
getQualified_join( _rTables, pTableRef, rTableRange );
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
else
2000-09-18 15:18:56 +00:00
{
rTableRange = OSQLParseNode::getTableRange(pTableRef);
if ( ( pTableRef->count() == 4 ) // '{' SQL_TOKEN_OJ joined_table '}'
|| ( pTableRef->count() == 5 ) // '(' joined_table ')' range_variable op_column_commalist
)
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
{
getQualified_join( _rTables, pTableRef->getChild(6 - pTableRef->count()), rTableRange );
2000-09-18 15:18:56 +00:00
}
else if ( pTableRef->count() == 3 ) // subquery range_variable op_column_commalist || '(' joined_table ')'
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
const OSQLParseNode* pSubQuery = pTableRef->getChild(0);
if ( pSubQuery->isToken() )
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
{
getQualified_join( _rTables, pTableRef->getChild(1), rTableRange );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
else
{
OSL_ENSURE( pSubQuery->count() == 3, "sub queries should have 3 children!" );
const OSQLParseNode* pQueryExpression = pSubQuery->getChild(1);
if ( SQL_ISRULE( pQueryExpression, select_statement ) )
{
getSelect_statement( *m_pImpl->m_pSubTables, pQueryExpression );
}
else
{
OSL_FAIL( "OSQLParseTreeIterator::getTableNode: subquery which is no select_statement: not yet implemented!" );
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
}
else if ( pTableRef->count() == 2 ) // table_node table_primary_as_range_column
{
pTableNameNode = pTableRef->getChild(0);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
else
OSL_FAIL( "OSQLParseTreeIterator::getTableNode: unhandled case!" );
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return pTableNameNode;
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
void OSQLParseTreeIterator::getSelect_statement(OSQLTables& _rTables,const OSQLParseNode* pSelect)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getSelect_statement" );
2000-09-18 15:18:56 +00:00
if(SQL_ISRULE(pSelect,union_statement))
{
getSelect_statement(_rTables,pSelect->getChild(0));
2000-09-18 15:18:56 +00:00
//getSelect_statement(pSelect->getChild(3));
return;
}
OSQLParseNode * pTableRefCommalist = pSelect->getChild(3)->getChild(0)->getChild(1);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pTableRefCommalist != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableRefCommalist,table_ref_commalist),"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
const OSQLParseNode* pTableName = NULL;
2000-10-19 10:47:14 +00:00
::rtl::OUString aTableRange;
for (sal_uInt32 i = 0; i < pTableRefCommalist->count(); i++)
2000-09-18 15:18:56 +00:00
{ // from clause durchlaufen
2000-10-19 10:47:14 +00:00
aTableRange = ::rtl::OUString();
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
const OSQLParseNode* pTableListElement = pTableRefCommalist->getChild(i);
if ( isTableNode( pTableListElement ) )
2000-09-18 15:18:56 +00:00
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseOneTableName( _rTables, pTableListElement, aTableRange );
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
else if ( SQL_ISRULE( pTableListElement, table_ref ) )
2000-09-18 15:18:56 +00:00
{
// Tabellenreferenz kann aus Tabellennamen, Tabellennamen (+),'('joined_table')'(+) bestehen
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
pTableName = pTableListElement->getChild(0);
if( isTableNode( pTableName ) )
2000-09-18 15:18:56 +00:00
{ // Tabellennamen gefunden
aTableRange = OSQLParseNode::getTableRange(pTableListElement);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseOneTableName( _rTables, pTableName, aTableRange );
2000-09-18 15:18:56 +00:00
}
else if(SQL_ISPUNCTUATION(pTableName,"{"))
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
{ // '{' SQL_TOKEN_OJ joined_table '}'
getQualified_join( _rTables, pTableListElement->getChild(2), aTableRange );
}
else
{ // '(' joined_table ')' range_variable op_column_commalist
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
getTableNode( _rTables, pTableListElement, aTableRange );
}
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
else if (SQL_ISRULE( pTableListElement, qualified_join ) || SQL_ISRULE( pTableListElement, cross_union ) )
2000-09-18 15:18:56 +00:00
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
getQualified_join( _rTables, pTableListElement, aTableRange );
2000-09-18 15:18:56 +00:00
}
else if ( SQL_ISRULE( pTableListElement, joined_table ) )
{
getQualified_join( _rTables, pTableListElement->getChild(1), aTableRange );
}
2000-09-18 15:18:56 +00:00
// if (! aIteratorStatus.IsSuccessful()) break;
}
}
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
bool OSQLParseTreeIterator::traverseTableNames(OSQLTables& _rTables)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseTableNames" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( m_pParseTree == NULL )
return false;
2000-10-19 10:47:14 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSQLParseNode* pTableName = NULL;
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
switch ( m_eStatementType )
{
case SQL_STATEMENT_SELECT:
getSelect_statement( _rTables, m_pParseTree );
break;
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
case SQL_STATEMENT_CREATE_TABLE:
case SQL_STATEMENT_INSERT:
case SQL_STATEMENT_DELETE:
pTableName = m_pParseTree->getChild(2);
break;
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
case SQL_STATEMENT_UPDATE:
pTableName = m_pParseTree->getChild(1);
break;
default:
break;
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( pTableName )
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString sTableRange;
traverseOneTableName( _rTables, pTableName, sTableRange );
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return !hasErrors();
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
2002-07-15 11:34:56 +00:00
::rtl::OUString OSQLParseTreeIterator::getColumnAlias(const OSQLParseNode* _pDerivedColumn)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getColumnAlias" );
2002-07-15 11:34:56 +00:00
OSL_ENSURE(SQL_ISRULE(_pDerivedColumn,derived_column),"No derived column!");
::rtl::OUString sColumnAlias;
if(_pDerivedColumn->getChild(1)->count() == 2)
sColumnAlias = _pDerivedColumn->getChild(1)->getChild(1)->getTokenValue();
else if(!_pDerivedColumn->getChild(1)->isRule())
sColumnAlias = _pDerivedColumn->getChild(1)->getTokenValue();
return sColumnAlias;
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
// -----------------------------------------------------------------------------
namespace
{
void lcl_getColumnRange( const OSQLParseNode* _pColumnRef, const Reference< XConnection >& _rxConnection,
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString& _out_rColumnName, ::rtl::OUString& _out_rTableRange,
const OSQLColumns* _pSelectColumns, ::rtl::OUString& _out_rColumnAliasIfPresent )
{
_out_rColumnName = _out_rTableRange = _out_rColumnAliasIfPresent = ::rtl::OUString();
if ( SQL_ISRULE( _pColumnRef, column_ref ) )
{
if( _pColumnRef->count() > 1 )
{
for ( sal_Int32 i=0; i<((sal_Int32)_pColumnRef->count())-2; ++i )
_pColumnRef->getChild(i)->parseNodeToStr( _out_rTableRange, _rxConnection, NULL, sal_False, sal_False );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
_out_rColumnName = _pColumnRef->getChild( _pColumnRef->count()-1 )->getChild(0)->getTokenValue();
}
else
_out_rColumnName = _pColumnRef->getChild(0)->getTokenValue();
// look up the column in the select column, to find an possible alias
if ( _pSelectColumns )
{
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
for ( OSQLColumns::Vector::const_iterator lookupColumn = _pSelectColumns->get().begin();
lookupColumn != _pSelectColumns->get().end();
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
++lookupColumn
)
{
Reference< XPropertySet > xColumn( *lookupColumn );
try
{
::rtl::OUString sName, sTableName;
xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_REALNAME ) ) >>= sName;
xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_TABLENAME ) ) >>= sTableName;
if ( sName == _out_rColumnName && sTableName == _out_rTableRange )
xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_NAME ) ) >>= _out_rColumnAliasIfPresent;
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
}
}
else if(SQL_ISRULE(_pColumnRef,general_set_fct) || SQL_ISRULE(_pColumnRef,set_fct_spec))
{ // Funktion
_pColumnRef->parseNodeToStr( _out_rColumnName, _rxConnection );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
else if(_pColumnRef->getNodeType() == SQL_NODE_NAME)
_out_rColumnName = _pColumnRef->getTokenValue();
}
}
2002-07-15 11:34:56 +00:00
// -----------------------------------------------------------------------------
void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef,
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString& _rColumnName,
2002-07-15 11:34:56 +00:00
::rtl::OUString& _rTableRange) const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getColumnRange" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString sDummy;
lcl_getColumnRange( _pColumnRef, m_pImpl->m_xConnection, _rColumnName, _rTableRange, NULL, sDummy );
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
// -----------------------------------------------------------------------------
void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef,
::rtl::OUString& _rColumnName,
::rtl::OUString& _rTableRange,
::rtl::OUString& _out_rColumnAliasIfPresent ) const
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getColumnRange" );
lcl_getColumnRange( _pColumnRef, m_pImpl->m_xConnection, _rColumnName, _rTableRange, &*m_aSelectColumns, _out_rColumnAliasIfPresent );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
2000-10-19 10:47:14 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef,
const Reference< XConnection >& _rxConnection, ::rtl::OUString& _out_rColumnName, ::rtl::OUString& _out_rTableRange )
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getColumnRange" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString sDummy;
lcl_getColumnRange( _pColumnRef, _rxConnection, _out_rColumnName, _out_rTableRange, NULL, sDummy );
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
2000-10-19 10:47:14 +00:00
sal_Bool OSQLParseTreeIterator::getColumnTableRange(const OSQLParseNode* pNode, ::rtl::OUString &rTableRange) const
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getColumnTableRange" );
2000-09-18 15:18:56 +00:00
// Ermitteln ob alle Spalten zu einer Tabelle gehoeren
if (SQL_ISRULE(pNode,column_ref))
{
2000-10-19 10:47:14 +00:00
::rtl::OUString aColName, aTableRange;
2000-09-18 15:18:56 +00:00
getColumnRange(pNode, aColName, aTableRange);
2000-10-19 10:47:14 +00:00
if (!aTableRange.getLength()) // keinen gefunden
2000-09-18 15:18:56 +00:00
{
// dann die Spalte in den Tabellen suchen
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
for (ConstOSQLTablesIterator aIter = m_pImpl->m_pTables->begin(); aIter != m_pImpl->m_pTables->end(); ++aIter)
2000-09-18 15:18:56 +00:00
{
if (aIter->second.is())
{
try
{
Reference< XNameAccess > xColumns = aIter->second->getColumns();
if(xColumns->hasByName(aColName))
2000-09-18 15:18:56 +00:00
{
Reference< XPropertySet > xColumn;
if (xColumns->getByName(aColName) >>= xColumn)
{
OSL_ENSURE(xColumn.is(),"Column isn't a propertyset!");
aTableRange = aIter->first;
break;
}
2000-09-18 15:18:56 +00:00
}
}
catch(Exception&)
2000-09-18 15:18:56 +00:00
{
}
}
}
2000-10-19 10:47:14 +00:00
if (!aTableRange.getLength())
return sal_False;
2000-09-18 15:18:56 +00:00
}
2000-10-19 10:47:14 +00:00
if (!rTableRange.getLength())
2000-09-18 15:18:56 +00:00
rTableRange = aTableRange;
else if (rTableRange != aTableRange)
2000-10-19 10:47:14 +00:00
return sal_False;
2000-09-18 15:18:56 +00:00
}
else
{
2000-10-19 10:47:14 +00:00
for (sal_uInt32 i = 0, ncount = pNode->count(); i < ncount; i++)
2000-09-18 15:18:56 +00:00
{
if (!getColumnTableRange(pNode->getChild(i), rTableRange))
2000-10-19 10:47:14 +00:00
return sal_False;
2000-09-18 15:18:56 +00:00
}
}
2000-10-19 10:47:14 +00:00
return sal_True;
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNode)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseCreateColumns" );
// aIteratorStatus.Clear();
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if (!pSelectNode || m_eStatementType != SQL_STATEMENT_CREATE_TABLE || m_pImpl->m_pTables->empty())
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
impl_appendError( IParseContext::ERROR_GENERAL );
return;
}
if (!SQL_ISRULE(pSelectNode,base_table_element_commalist))
return ;
for (sal_uInt32 i = 0; i < pSelectNode->count(); i++)
{
OSQLParseNode *pColumnRef = pSelectNode->getChild(i);
if (SQL_ISRULE(pColumnRef,column_def))
{
::rtl::OUString aColumnName;
::rtl::OUString aTypeName;
::rtl::OUString aTableRange;
sal_Int32 nType = DataType::VARCHAR;
aColumnName = pColumnRef->getChild(0)->getTokenValue();
OSQLParseNode *pDatatype = pColumnRef->getChild(1);
if (pDatatype && SQL_ISRULE(pDatatype,character_string_type))
{
const OSQLParseNode *pType = pDatatype->getChild(0);
aTypeName = pType->getTokenValue();
if (pDatatype->count() == 2 && (pType->getTokenID() == SQL_TOKEN_CHAR || pType->getTokenID() == SQL_TOKEN_CHARACTER ))
nType = DataType::CHAR;
const OSQLParseNode *pParams = pDatatype->getChild(pDatatype->count()-1);
if ( pParams->count() )
{
2011-02-10 14:48:51 +01:00
sal_Int32 nLen = pParams->getChild(1)->getTokenValue().toInt32();
2011-02-03 13:17:05 +00:00
(void)nLen;
}
}
else if(pDatatype && pDatatype->getNodeType() == SQL_NODE_KEYWORD)
{
aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"));
}
if (aTypeName.getLength())
{
//TODO:Create a new class for create statement to handle field length
OParseColumn* pColumn = new OParseColumn(aColumnName,aTypeName,::rtl::OUString(),::rtl::OUString(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
ColumnValue::NULLABLE_UNKNOWN,0,0,nType,sal_False,sal_False,isCaseSensitive());
pColumn->setFunction(sal_False);
pColumn->setRealName(aColumnName);
Reference< XPropertySet> xCol = pColumn;
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
m_aCreateColumns->get().push_back(xCol);
}
}
}
}
2000-09-18 15:18:56 +00:00
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSelectNode)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseSelectColumnNames" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( ( m_pImpl->m_nIncludeMask & SelectColumns ) != SelectColumns )
return true;
2000-10-19 10:47:14 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if (!pSelectNode || m_eStatementType != SQL_STATEMENT_SELECT || m_pImpl->m_pTables->empty())
2000-09-18 15:18:56 +00:00
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
impl_appendError( IParseContext::ERROR_GENERAL );
return false;
2000-09-18 15:18:56 +00:00
}
if(SQL_ISRULE(pSelectNode,union_statement))
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return traverseSelectColumnNames( pSelectNode->getChild( 0 ) )
/*&& traverseSelectColumnNames( pSelectNode->getChild( 3 ) )*/;
2000-09-18 15:18:56 +00:00
}
static ::rtl::OUString aEmptyString;
2000-09-18 15:18:56 +00:00
// nyi: mehr Pruefung auf korrekte Struktur!
if (pSelectNode->getChild(2)->isRule() && SQL_ISPUNCTUATION(pSelectNode->getChild(2)->getChild(0),"*"))
{
// SELECT * ...
setSelectColumnName(m_aSelectColumns,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")), aEmptyString,aEmptyString);
2000-09-18 15:18:56 +00:00
}
else if (SQL_ISRULE(pSelectNode->getChild(2),scalar_exp_commalist))
{
2001-01-09 12:11:07 +00:00
// SELECT column[,column] oder SELECT COUNT(*) ...
2000-09-18 15:18:56 +00:00
OSQLParseNode * pSelection = pSelectNode->getChild(2);
2000-10-19 10:47:14 +00:00
for (sal_uInt32 i = 0; i < pSelection->count(); i++)
2000-09-18 15:18:56 +00:00
{
OSQLParseNode *pColumnRef = pSelection->getChild(i);
2001-01-09 12:11:07 +00:00
//if (SQL_ISRULE(pColumnRef,select_sublist))
if (SQL_ISRULE(pColumnRef,derived_column) &&
SQL_ISRULE(pColumnRef->getChild(0),column_ref) &&
pColumnRef->getChild(0)->count() == 3 &&
SQL_ISPUNCTUATION(pColumnRef->getChild(0)->getChild(2),"*"))
2000-09-18 15:18:56 +00:00
{
// alle Spalten der Tabelle
2000-10-19 10:47:14 +00:00
::rtl::OUString aTableRange;
pColumnRef->getChild(0)->parseNodeToStr( aTableRange, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
setSelectColumnName(m_aSelectColumns,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")), aEmptyString,aTableRange);
2000-09-18 15:18:56 +00:00
continue;
}
else if (SQL_ISRULE(pColumnRef,derived_column))
2000-09-18 15:18:56 +00:00
{
2000-10-19 10:47:14 +00:00
::rtl::OUString aColumnAlias(getColumnAlias(pColumnRef)); // kann leer sein
::rtl::OUString sColumnName;
2000-10-19 10:47:14 +00:00
::rtl::OUString aTableRange;
sal_Int32 nType = DataType::VARCHAR;
2000-10-19 10:47:14 +00:00
sal_Bool bFkt(sal_False);
2000-09-18 15:18:56 +00:00
pColumnRef = pColumnRef->getChild(0);
if (
pColumnRef->count() == 3 &&
SQL_ISPUNCTUATION(pColumnRef->getChild(0),"(") &&
SQL_ISPUNCTUATION(pColumnRef->getChild(2),")")
)
pColumnRef = pColumnRef->getChild(1);
2000-09-18 15:18:56 +00:00
if (SQL_ISRULE(pColumnRef,column_ref))
{
getColumnRange(pColumnRef,sColumnName,aTableRange);
OSL_ENSURE(sColumnName.getLength(),"Columnname darf nicht leer sein");
2000-09-18 15:18:56 +00:00
}
else /*if (SQL_ISRULE(pColumnRef,general_set_fct) || SQL_ISRULE(pColumnRef,set_fct_spec) ||
SQL_ISRULE(pColumnRef,position_exp) || SQL_ISRULE(pColumnRef,extract_exp) ||
SQL_ISRULE(pColumnRef,length_exp) || SQL_ISRULE(pColumnRef,char_value_fct)||
SQL_ISRULE(pColumnRef,num_value_exp) || SQL_ISRULE(pColumnRef,term))*/
{
/* Funktionsaufruf vorhanden */
pColumnRef->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_True );
::rtl::OUString sTableRange;
// check if the column is also a parameter
traverseORCriteria(pColumnRef); // num_value_exp
2000-09-18 15:18:56 +00:00
// gehoeren alle beteiligten Spalten der Funktion zu einer Tabelle
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if (m_pImpl->m_pTables->size() == 1)
2000-09-18 15:18:56 +00:00
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
aTableRange = m_pImpl->m_pTables->begin()->first;
2000-09-18 15:18:56 +00:00
}
else
{
getColumnTableRange(pColumnRef,aTableRange);
}
if ( pColumnRef->isRule() )
{
bFkt = sal_True;
nType = getFunctionReturnType(pColumnRef);
}
2000-09-18 15:18:56 +00:00
}
/*
else
{
aIteratorStatus.setStatementTooComplex();
return;
}
*/
2000-10-19 10:47:14 +00:00
if(!aColumnAlias.getLength())
aColumnAlias = sColumnName;
setSelectColumnName(m_aSelectColumns,sColumnName,aColumnAlias,aTableRange,bFkt,nType,SQL_ISRULE(pColumnRef,general_set_fct) || SQL_ISRULE(pColumnRef,set_fct_spec));
2000-09-18 15:18:56 +00:00
}
}
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return !hasErrors();
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
bool OSQLParseTreeIterator::traverseOrderByColumnNames(const OSQLParseNode* pSelectNode)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseOrderByColumnNames" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseByColumnNames( pSelectNode, sal_True );
return !hasErrors();
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNode,sal_Bool _bOrder)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseByColumnNames" );
2000-09-18 15:18:56 +00:00
// aIteratorStatus.Clear();
if (pSelectNode == NULL)
{
//aIteratorStatus.setInvalidStatement();
return;
}
if (m_eStatementType != SQL_STATEMENT_SELECT)
{
//aIteratorStatus.setInvalidStatement();
return;
}
if(SQL_ISRULE(pSelectNode,union_statement))
{
traverseByColumnNames(pSelectNode->getChild(0),_bOrder);
2000-09-18 15:18:56 +00:00
return;
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pSelectNode->count() >= 4,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
OSQLParseNode * pTableExp = pSelectNode->getChild(3);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator:table_exp error in parse tree!");
OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
sal_uInt32 nPos = ( _bOrder ? 4 : 2 );
OSQLParseNode * pOptByClause = pTableExp->getChild(nPos);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pOptByClause != NULL,"OSQLParseTreeIterator: error in parse tree!");
if ( pOptByClause->count() == 0 )
2000-09-18 15:18:56 +00:00
return;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pOptByClause->count() == 3,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
OSQLParseNode * pOrderingSpecCommalist = pOptByClause->getChild(2);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pOrderingSpecCommalist != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(!_bOrder || SQL_ISRULE(pOrderingSpecCommalist,ordering_spec_commalist),"OSQLParseTreeIterator:ordering_spec_commalist error in parse tree!");
OSL_ENSURE(pOrderingSpecCommalist->count() > 0,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
::rtl::OUString sColumnName,aColumnAlias;
2000-10-19 10:47:14 +00:00
::rtl::OUString aTableRange;
sal_uInt32 nCount = pOrderingSpecCommalist->count();
for (sal_uInt32 i = 0; i < nCount; ++i)
2000-09-18 15:18:56 +00:00
{
OSQLParseNode* pColumnRef = pOrderingSpecCommalist->getChild(i);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pColumnRef != NULL,"OSQLParseTreeIterator: error in parse tree!");
if ( _bOrder )
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(SQL_ISRULE(pColumnRef,ordering_spec),"OSQLParseTreeIterator:ordering_spec error in parse tree!");
OSL_ENSURE(pColumnRef->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pColumnRef = pColumnRef->getChild(0);
}
2000-10-19 10:47:14 +00:00
aTableRange = ::rtl::OUString();
sColumnName = ::rtl::OUString();
if ( SQL_ISRULE(pColumnRef,column_ref) )
2000-09-18 15:18:56 +00:00
{
// Column-Name (und TableRange):
if(SQL_ISRULE(pColumnRef,column_ref))
getColumnRange(pColumnRef,sColumnName,aTableRange);
2000-09-18 15:18:56 +00:00
else // eine Expression
pColumnRef->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
2000-09-18 15:18:56 +00:00
OSL_ENSURE(sColumnName.getLength(),"sColumnName darf nicht leer sein");
2000-09-18 15:18:56 +00:00
}
else
{ // here I found a predicate
pColumnRef->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pColumnRef != NULL,"OSQLParseTreeIterator: error in parse tree!");
if ( _bOrder )
2000-09-18 15:18:56 +00:00
{
// Ascending/Descending
OSQLParseNode * pOptAscDesc = pColumnRef->getParent()->getChild(1);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pOptAscDesc != NULL,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
sal_Bool bAscending = pOptAscDesc && SQL_ISTOKEN(pOptAscDesc,ASC);
setOrderByColumnName(sColumnName, aTableRange,bAscending);
}
else
setGroupByColumnName(sColumnName, aTableRange);
2000-09-18 15:18:56 +00:00
}
}
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
bool OSQLParseTreeIterator::traverseGroupByColumnNames(const OSQLParseNode* pSelectNode)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseGroupByColumnNames" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseByColumnNames( pSelectNode, sal_False );
return !hasErrors();
}
// -----------------------------------------------------------------------------
namespace
{
::rtl::OUString lcl_generateParameterName( const OSQLParseNode& _rParentNode, const OSQLParseNode& _rParamNode )
{
::rtl::OUString sColumnName( RTL_CONSTASCII_USTRINGPARAM( "param" ) );
const sal_Int32 nCount = (sal_Int32)_rParentNode.count();
for ( sal_Int32 i = 0; i < nCount; ++i )
{
if ( _rParentNode.getChild(i) == &_rParamNode )
{
sColumnName += ::rtl::OUString::valueOf( i+1 );
break;
}
}
return sColumnName;
}
}
// -----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseParameters" );
if ( _pNode == NULL )
return;
::rtl::OUString sColumnName, sTableRange, aColumnAlias;
const OSQLParseNode* pParent = _pNode->getParent();
if ( pParent != NULL )
{
if ( SQL_ISRULE(pParent,comparison_predicate) ) // x = X
{
sal_uInt32 nPos = 0;
if ( pParent->getChild(nPos) == _pNode )
nPos = 2;
const OSQLParseNode* pOther = pParent->getChild(nPos);
if ( SQL_ISRULE( pOther, column_ref ) )
getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias);
else
pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
} // if ( SQL_ISRULE(pParent,comparison_predicate) ) // x = X
else if ( SQL_ISRULE(pParent,other_like_predicate_part_2) )
{
const OSQLParseNode* pOther = pParent->getParent()->getChild(0);
if ( SQL_ISRULE( pOther, column_ref ) )
getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias);
else
pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
}
else if ( SQL_ISRULE(pParent,between_predicate_part_2) )
{
const OSQLParseNode* pOther = pParent->getParent()->getChild(0);
if ( SQL_ISRULE( pOther, column_ref ) )
getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias);
else
{
pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
lcl_generateParameterName( *pParent, *_pNode );
}
}
else if ( pParent->getNodeType() == SQL_NODE_COMMALISTRULE )
{
lcl_generateParameterName( *pParent, *_pNode );
}
}
traverseParameter( _pNode, pParent, sColumnName, sTableRange, aColumnAlias );
const sal_uInt32 nCount = _pNode->count();
for (sal_uInt32 i = 0; i < nCount; ++i)
{
const OSQLParseNode* pChild = _pNode->getChild(i);
traverseParameters( pChild );
}
}
2000-09-18 15:18:56 +00:00
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSelectNode)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseSelectionCriteria" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( pSelectNode == NULL )
return false;
2000-09-18 15:18:56 +00:00
// Parse Tree analysieren (je nach Statement-Typ)
// und Zeiger auf WHERE-Klausel setzen:
OSQLParseNode * pWhereClause = NULL;
if (m_eStatementType == SQL_STATEMENT_SELECT)
{
if(SQL_ISRULE(pSelectNode,union_statement))
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return traverseSelectionCriteria( pSelectNode->getChild( 0 ) )
&& traverseSelectionCriteria( pSelectNode->getChild( 3 ) );
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pSelectNode->count() >= 4,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
OSQLParseNode * pTableExp = pSelectNode->getChild(3);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pWhereClause = pTableExp->getChild(1);
} else if (SQL_ISRULE(pSelectNode,update_statement_searched)) {
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pSelectNode->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pWhereClause = pSelectNode->getChild(4);
} else if (SQL_ISRULE(pSelectNode,delete_statement_searched)) {
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pSelectNode->count() == 4,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pWhereClause = pSelectNode->getChild(3);
} else if (SQL_ISRULE(pSelectNode,delete_statement_positioned)) {
// nyi
OSL_FAIL("OSQLParseTreeIterator::getSelectionCriteria: positioned nyi");
2000-09-18 15:18:56 +00:00
} else {
// Anderes Statement. Keine Selektionskriterien.
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return false;
2000-09-18 15:18:56 +00:00
}
if (! SQL_ISRULE(pWhereClause,where_clause)) {
// Die Where Clause ist meistens optional, d. h. es koennte sich auch
// um "optional_where_clause" handeln.
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(SQL_ISRULE(pWhereClause,opt_where_clause),"OSQLParseTreeIterator: error in parse tree!");
return false;
2000-09-18 15:18:56 +00:00
}
// Wenn es aber eine where_clause ist, dann darf sie nicht leer sein:
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pWhereClause->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
OSQLParseNode * pComparisonPredicate = pWhereClause->getChild(1);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pComparisonPredicate != NULL,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
//
// Und nun die Vergleichskriterien abarbeiten (rekursiv, alles ist erstmal ein OR-Kriterium):
//
traverseORCriteria(pComparisonPredicate);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
return !hasErrors();
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseORCriteria(OSQLParseNode * pSearchCondition)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseORCriteria" );
2000-10-19 10:47:14 +00:00
2000-09-18 15:18:56 +00:00
if (
pSearchCondition->count() == 3 &&
SQL_ISPUNCTUATION(pSearchCondition->getChild(0),"(") &&
SQL_ISPUNCTUATION(pSearchCondition->getChild(2),")")
)
{
// Runde Klammern um den Ausdruck
traverseORCriteria(pSearchCondition->getChild(1));
} else if (SQL_ISRULE(pSearchCondition,search_condition) &&
pSearchCondition->count() == 3 &&
SQL_ISTOKEN(pSearchCondition->getChild(1),OR))
{
// OR-Verknuepfung:
for (int i = 0; i < 3; i++) {
if (i == 1) continue; // Schluesselwort OR ueberspringen
// Ist das erste Element wieder eine OR-Verknuepfung?
if (i == 0 &&
SQL_ISRULE(pSearchCondition->getChild(0),search_condition) &&
pSearchCondition->getChild(0)->count() == 3 &&
SQL_ISTOKEN(pSearchCondition->getChild(0)->getChild(1),OR))
{
// Dann rekursiv absteigen ...
traverseORCriteria(pSearchCondition->getChild(0));
} else {
// AND-Kriterien ...
traverseANDCriteria(pSearchCondition->getChild(i));
// if (! aIteratorStatus.IsSuccessful()) break;
}
// if (! aIteratorStatus.IsSuccessful()) break;
}
} else {
// Nur *ein* Kriterium oder eine AND-Verknuepfung von Kriterien.
// Direkt die AND-Kriterien behandeln.
traverseANDCriteria(pSearchCondition);
// if (! aIteratorStatus.IsSuccessful()) return;
}
// Fehler einfach weiterreichen.
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseANDCriteria(OSQLParseNode * pSearchCondition)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseANDCriteria" );
2000-10-19 10:47:14 +00:00
2000-09-18 15:18:56 +00:00
if (
SQL_ISRULE(pSearchCondition,boolean_primary) &&
pSearchCondition->count() == 3 &&
SQL_ISPUNCTUATION(pSearchCondition->getChild(0),"(") &&
SQL_ISPUNCTUATION(pSearchCondition->getChild(2),")")
)
{
// Runde Klammern
traverseANDCriteria(pSearchCondition->getChild(1));
}
// Das erste Element ist eine OR-Verknuepfung
else if ( SQL_ISRULE(pSearchCondition,search_condition) && pSearchCondition->count() == 3 )
{
// Dann rekursiv absteigen (dieselbe Row benutzen) ...
traverseORCriteria(pSearchCondition->getChild(0));
// if (! aIteratorStatus.IsSuccessful())
// return;
// Und mit dem rechten Child weitermachen:
traverseANDCriteria(pSearchCondition->getChild(2));
}
// Das erste Element ist (wieder) eine AND-Verknuepfung
else if ( SQL_ISRULE(pSearchCondition,boolean_term) && pSearchCondition->count() == 3 )
{
// Dann rekursiv absteigen (dieselbe Row benutzen) ...
traverseANDCriteria(pSearchCondition->getChild(0));
// if (! aIteratorStatus.IsSuccessful())
// return;
// Und mit dem rechten Child weitermachen:
traverseANDCriteria(pSearchCondition->getChild(2));
}
// Sonst einzelne Suchkriterien wie =, !=, ..., LIKE, IS NULL usw. behandeln:
else if (SQL_ISRULE(pSearchCondition,comparison_predicate) )
{
2000-10-19 10:47:14 +00:00
::rtl::OUString aValue;
pSearchCondition->getChild(2)->parseNodeToStr( aValue, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseOnePredicate(pSearchCondition->getChild(0),aValue,pSearchCondition->getChild(2));
impl_fillJoinConditions(pSearchCondition);
2000-09-18 15:18:56 +00:00
// if (! aIteratorStatus.IsSuccessful())
// return;
}
else if (SQL_ISRULE(pSearchCondition,like_predicate) /*&& SQL_ISRULE(pSearchCondition->getChild(0),column_ref)*/)
{
OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
const OSQLParseNode* pPart2 = pSearchCondition->getChild(1);
2000-09-18 15:18:56 +00:00
sal_Int32 nCurentPos = pPart2->count()-2;
2000-09-29 14:13:06 +00:00
OSQLParseNode * pNum_value_exp = pPart2->getChild(nCurentPos);
OSQLParseNode * pOptEscape = pPart2->getChild(nCurentPos+1);
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pNum_value_exp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pOptEscape != NULL,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
if (pOptEscape->count() != 0)
{
// aIteratorStatus.setStatementTooComplex();
return;
}
2000-10-19 10:47:14 +00:00
::rtl::OUString aValue;
2000-09-18 15:18:56 +00:00
OSQLParseNode * pParam = NULL;
if (SQL_ISRULE(pNum_value_exp,parameter))
pParam = pNum_value_exp;
else if(pNum_value_exp->isToken())
// Normaler Wert
aValue = pNum_value_exp->getTokenValue();
else
{
pNum_value_exp->parseNodeToStr( aValue, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
2000-09-18 15:18:56 +00:00
pParam = pNum_value_exp;
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseOnePredicate(pSearchCondition->getChild(0),aValue,pParam);
2000-09-18 15:18:56 +00:00
// if (! aIteratorStatus.IsSuccessful())
// return;
}
else if (SQL_ISRULE(pSearchCondition,in_predicate))
{
OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
const OSQLParseNode* pPart2 = pSearchCondition->getChild(1);
traverseORCriteria(pSearchCondition->getChild(0));
// if (! aIteratorStatus.IsSuccessful()) return;
OSQLParseNode* pChild = pPart2->getChild(2);
if ( SQL_ISRULE(pChild->getChild(0),subquery) )
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseTableNames( *m_pImpl->m_pSubTables );
traverseSelectionCriteria(pChild->getChild(0)->getChild(1));
}
else
{ // '(' value_exp_commalist ')'
pChild = pChild->getChild(1);
sal_Int32 nCount = pChild->count();
for (sal_Int32 i=0; i < nCount; ++i)
{
traverseANDCriteria(pChild->getChild(i));
}
}
}
2000-09-18 15:18:56 +00:00
else if (SQL_ISRULE(pSearchCondition,test_for_null) /*&& SQL_ISRULE(pSearchCondition->getChild(0),column_ref)*/)
{
OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!");
const OSQLParseNode* pPart2 = pSearchCondition->getChild(1);
2010-04-19 14:09:15 +02:00
(void)pPart2;
OSL_ENSURE(SQL_ISTOKEN(pPart2->getChild(0),IS),"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
2000-10-19 10:47:14 +00:00
::rtl::OUString aString;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseOnePredicate(pSearchCondition->getChild(0),aString,NULL);
2000-09-18 15:18:56 +00:00
// if (! aIteratorStatus.IsSuccessful()) return;
2001-04-30 08:59:56 +00:00
}
else if (SQL_ISRULE(pSearchCondition,num_value_exp) || SQL_ISRULE(pSearchCondition,term))
{
::rtl::OUString aString;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseOnePredicate(pSearchCondition->getChild(0),aString,pSearchCondition->getChild(0));
traverseOnePredicate(pSearchCondition->getChild(2),aString,pSearchCondition->getChild(2));
2000-09-18 15:18:56 +00:00
}
// Fehler einfach weiterreichen.
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
,const OSQLParseNode* _pColumnRef
,const ::rtl::OUString& _aColumnName
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
,const ::rtl::OUString& _aTableRange
,const ::rtl::OUString& _rColumnAlias)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseParameter" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( !SQL_ISRULE( _pParseNode, parameter ) )
return;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( ( m_pImpl->m_nIncludeMask & Parameters ) != Parameters )
// parameters not to be included in the traversal
return;
OSL_ENSURE(_pParseNode->count() > 0,"OSQLParseTreeIterator: error in parse tree!");
OSQLParseNode * pMark = _pParseNode->getChild(0);
::rtl::OUString sParameterName;
if (SQL_ISPUNCTUATION(pMark,"?"))
{
sParameterName = _rColumnAlias.getLength()
? _rColumnAlias
: _aColumnName.getLength()
? _aColumnName
: ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?"));
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
else if (SQL_ISPUNCTUATION(pMark,":"))
{
sParameterName = _pParseNode->getChild(1)->getTokenValue();
}
else if (SQL_ISPUNCTUATION(pMark,"["))
{
sParameterName = _pParseNode->getChild(1)->getTokenValue();
}
else
{
OSL_FAIL("OSQLParseTreeIterator: error in parse tree!");
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
// found a parameter
if ( _pColumnRef && (SQL_ISRULE(_pColumnRef,general_set_fct) || SQL_ISRULE(_pColumnRef,set_fct_spec)) )
{// found a function as column_ref
::rtl::OUString sFunctionName;
_pColumnRef->getChild(0)->parseNodeToStr( sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
const sal_uInt32 nCount = _pColumnRef->count();
sal_uInt32 i = 0;
for(; i < nCount;++i)
{
if ( _pColumnRef->getChild(i) == _pParseNode )
break;
}
sal_Int32 nType = ::connectivity::OSQLParser::getFunctionParameterType( _pColumnRef->getParent()->getChild(0)->getTokenID(), i+1);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OParseColumn* pColumn = new OParseColumn( sParameterName,
::rtl::OUString(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString(),
::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,
0,
0,
nType,
sal_False,
sal_False,
isCaseSensitive());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(sal_True);
pColumn->setRealName(sFunctionName);
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
m_aParameters->get().push_back(pColumn);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
else
{
sal_Bool bNotFound = sal_True;
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
OSQLColumns::Vector::const_iterator aIter = ::connectivity::find(
m_aSelectColumns->get().begin(),
m_aSelectColumns->get().end(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
_aColumnName,::comphelper::UStringMixEqual( isCaseSensitive() )
);
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
if(aIter != m_aSelectColumns->get().end())
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OParseColumn* pNewColumn = new OParseColumn(*aIter,isCaseSensitive());
pNewColumn->setName(sParameterName);
pNewColumn->setRealName(_aColumnName);
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
m_aParameters->get().push_back(pNewColumn);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
bNotFound = sal_False;
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
else if(_aColumnName.getLength())// search in the tables for the right one
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
Reference<XPropertySet> xColumn = findColumn( _aColumnName, _aTableRange, true );
if ( xColumn.is() )
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OParseColumn* pNewColumn = new OParseColumn(xColumn,isCaseSensitive());
pNewColumn->setName(sParameterName);
pNewColumn->setRealName(_aColumnName);
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
m_aParameters->get().push_back(pNewColumn);
bNotFound = sal_False;
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
if ( bNotFound )
{
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
sal_Int32 nType = DataType::VARCHAR;
OSQLParseNode* pParent = _pColumnRef ? _pColumnRef->getParent() : NULL;
if ( pParent && (SQL_ISRULE(pParent,general_set_fct) || SQL_ISRULE(pParent,set_fct_spec)) )
{
const sal_uInt32 nCount = _pColumnRef->count();
sal_uInt32 i = 0;
for(; i < nCount;++i)
{
if ( _pColumnRef->getChild(i) == _pParseNode )
break;
}
nType = ::connectivity::OSQLParser::getFunctionParameterType( pParent->getChild(0)->getTokenID(), i+1);
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString aNewColName( getUniqueColumnName( sParameterName ) );
OParseColumn* pColumn = new OParseColumn(aNewColName,
::rtl::OUString(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString(),
::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,
0,
0,
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
nType,
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
sal_False,
sal_False,
isCaseSensitive() );
pColumn->setName(aNewColName);
pColumn->setRealName(sParameterName);
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
m_aParameters->get().push_back(pColumn);
}
}
}
2000-09-18 15:18:56 +00:00
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseOnePredicate(
OSQLParseNode * pColumnRef,
2000-10-19 10:47:14 +00:00
::rtl::OUString& rValue,
2000-09-18 15:18:56 +00:00
OSQLParseNode * pParseNode)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseOnePredicate" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( !pParseNode )
return;
2000-09-18 15:18:56 +00:00
// Column-Name (und TableRange):
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString aColumnName, aTableRange, sColumnAlias;
getColumnRange( pColumnRef, aColumnName, aTableRange, sColumnAlias);
2000-09-18 15:18:56 +00:00
2000-10-19 10:47:14 +00:00
::rtl::OUString aName;
2001-04-30 08:59:56 +00:00
/*if (SQL_ISRULE(pParseNode,parameter))
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
traverseParameter( pParseNode, pColumnRef, aColumnName, aTableRange, sColumnAlias );
else */if (SQL_ISRULE(pParseNode,column_ref))// Column-Name (und TableRange):
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
getColumnRange(pParseNode,aName,rValue);
else
{
traverseORCriteria(pParseNode);
// if (! aIteratorStatus.IsSuccessful()) return;
2000-09-18 15:18:56 +00:00
}
}
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
void OSQLParseTreeIterator::traverseSome( sal_uInt32 _nIncludeMask )
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseSome" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
impl_traverse( _nIncludeMask );
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::traverseAll()
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::traverseAll" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
impl_traverse( All );
}
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::impl_traverse( sal_uInt32 _nIncludeMask )
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::impl_traverse" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
impl_resetErrors();
m_pImpl->m_nIncludeMask = _nIncludeMask;
if ( !traverseTableNames( *m_pImpl->m_pTables ) )
return;
switch ( m_eStatementType )
{
case SQL_STATEMENT_SELECT:
2000-09-18 15:18:56 +00:00
{
const OSQLParseNode* pSelectNode = m_pParseTree;
traverseParameters( pSelectNode );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( !traverseSelectColumnNames( pSelectNode )
|| !traverseOrderByColumnNames( pSelectNode )
|| !traverseGroupByColumnNames( pSelectNode )
|| !traverseSelectionCriteria( pSelectNode )
)
return;
}
break;
case SQL_STATEMENT_CREATE_TABLE:
{
//0 | 1 | 2 |3| 4 |5
//create table sc.foo ( a char(20), b char )
const OSQLParseNode* pCreateNode = m_pParseTree->getChild(4);
traverseCreateColumns(pCreateNode);
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
break;
case SQL_STATEMENT_INSERT:
break;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
default:
break;
}
2000-09-18 15:18:56 +00:00
}
// Dummy-Implementationen:
//-----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSQLTable OSQLParseTreeIterator::impl_createTableObject( const ::rtl::OUString& rTableName,
const ::rtl::OUString& rCatalogName, const ::rtl::OUString& rSchemaName )
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::impl_createTableObject" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_PRECOND( m_eStatementType == SQL_STATEMENT_CREATE_TABLE,
"OSQLParseTreeIterator::impl_createTableObject: only to be called for CREATE TABLE statements!" );
// (in all other cases, m_pTables is to contain the table objects as obtained from the tables
// container of the connection (m_xTablesContainer)
OSQLTable aReturnTable = new OTable(
NULL,
sal_False,
rTableName,
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Table")),
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New Created Table")),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
rSchemaName,
rCatalogName
);
return aReturnTable;
2000-09-18 15:18:56 +00:00
}
//-----------------------------------------------------------------------------
2010-10-15 12:10:06 -05:00
void OSQLParseTreeIterator::appendColumns(::rtl::Reference<OSQLColumns>& _rColumns,const ::rtl::OUString& _rTableAlias,const OSQLTable& _rTable)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::appendColumns" );
2000-10-19 10:47:14 +00:00
2000-09-18 15:18:56 +00:00
if (!_rTable.is())
return;
Reference<XNameAccess> xColumns = _rTable->getColumns();
if ( !xColumns.is() )
return;
2000-09-18 15:18:56 +00:00
Sequence< ::rtl::OUString > aColNames = xColumns->getElementNames();
const ::rtl::OUString* pBegin = aColNames.getConstArray();
const ::rtl::OUString* pEnd = pBegin + aColNames.getLength();
for(;pBegin != pEnd;++pBegin)
{
2001-02-01 12:10:17 +00:00
::rtl::OUString aName(getUniqueColumnName(*pBegin));
2000-10-30 06:47:10 +00:00
Reference< XPropertySet > xColumn;
if(xColumns->hasByName(*pBegin) && (xColumns->getByName(*pBegin) >>= xColumn) && xColumn.is())
2000-09-18 15:18:56 +00:00
{
2001-02-01 12:10:17 +00:00
OParseColumn* pColumn = new OParseColumn(aName
2001-05-14 10:42:44 +00:00
, getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)))
, getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)))
, getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)))
2001-05-14 10:42:44 +00:00
, getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)))
, getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)))
, getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)))
, getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)))
, getBOOL(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)))
, getBOOL(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
, isCaseSensitive() );
2001-02-01 12:10:17 +00:00
pColumn->setTableName(_rTableAlias);
pColumn->setRealName(*pBegin);
2000-10-30 06:47:10 +00:00
Reference< XPropertySet> xCol = pColumn;
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
_rColumns->get().push_back(xCol);
2000-09-18 15:18:56 +00:00
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
else
impl_appendError( IParseContext::ERROR_INVALID_COLUMN, pBegin, &_rTableAlias );
2000-09-18 15:18:56 +00:00
}
}
//-----------------------------------------------------------------------------
2010-10-15 12:10:06 -05:00
void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _rColumns,const ::rtl::OUString & rColumnName,const ::rtl::OUString & rColumnAlias, const ::rtl::OUString & rTableRange,sal_Bool bFkt,sal_Int32 _nType,sal_Bool bAggFkt)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::setSelectColumnName" );
2000-10-19 10:47:14 +00:00
if(rColumnName.toChar() == '*' && !rTableRange.getLength())
{ // SELECT * ...
OSL_ENSURE(_rColumns == m_aSelectColumns,"Invalid columns used here!");
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
for(ConstOSQLTablesIterator aIter = m_pImpl->m_pTables->begin(); aIter != m_pImpl->m_pTables->end();++aIter)
appendColumns(_rColumns,aIter->first,aIter->second);
2000-09-18 15:18:56 +00:00
}
else if( rColumnName.toChar() == '*' && rTableRange.getLength() )
{ // SELECT <table>.*
OSL_ENSURE(_rColumns == m_aSelectColumns,"Invalid columns used here!");
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
ConstOSQLTablesIterator aFind = m_pImpl->m_pTables->find(rTableRange);
2000-09-18 15:18:56 +00:00
if(aFind != m_pImpl->m_pTables->end())
appendColumns(_rColumns,rTableRange,aFind->second);
2000-09-18 15:18:56 +00:00
}
else if ( !rTableRange.getLength() )
{ // SELECT <something> ...
// without table specified
if ( !bFkt )
2000-09-18 15:18:56 +00:00
{
Reference< XPropertySet> xNewColumn;
2000-09-18 15:18:56 +00:00
for ( OSQLTablesIterator aIter = m_pImpl->m_pTables->begin(); aIter != m_pImpl->m_pTables->end(); ++aIter )
2000-09-18 15:18:56 +00:00
{
if ( !aIter->second.is() )
continue;
2000-09-18 15:18:56 +00:00
Reference<XNameAccess> xColumns = aIter->second->getColumns();
Reference< XPropertySet > xColumn;
if ( !xColumns->hasByName( rColumnName )
|| !( xColumns->getByName( rColumnName ) >>= xColumn )
)
continue;
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
OParseColumn* pColumn = new OParseColumn(xColumn,isCaseSensitive());
xNewColumn = pColumn;
pColumn->setTableName(aIter->first);
pColumn->setName(aNewColName);
pColumn->setRealName(rColumnName);
break;
2000-09-18 15:18:56 +00:00
}
if ( !xNewColumn.is() )
2000-09-18 15:18:56 +00:00
{
// no function (due to the above !bFkt), no existing column
// => assume an expression
::rtl::OUString aNewColName( getUniqueColumnName( rColumnAlias ) );
// did not find a column with this name in any of the tables
OParseColumn* pColumn = new OParseColumn(
aNewColName,
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")),
// TODO: does this match with _nType?
// Or should be fill this from the getTypeInfo of the connection?
::rtl::OUString(),
::rtl::OUString(),
ColumnValue::NULLABLE_UNKNOWN,
0,
0,
_nType,
sal_False,
sal_False,
isCaseSensitive()
);
xNewColumn = pColumn;
pColumn->setRealName( rColumnName );
2000-09-18 15:18:56 +00:00
}
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
_rColumns->get().push_back( xNewColumn );
2000-09-18 15:18:56 +00:00
}
else
{
2000-10-19 10:47:14 +00:00
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
2000-09-18 15:18:56 +00:00
OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
2000-09-18 15:18:56 +00:00
pColumn->setRealName(rColumnName);
2000-10-30 06:47:10 +00:00
Reference< XPropertySet> xCol = pColumn;
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
_rColumns->get().push_back(xCol);
2000-09-18 15:18:56 +00:00
}
}
else // ColumnName und Tablename vorhanden
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
ConstOSQLTablesIterator aFind = m_pImpl->m_pTables->find(rTableRange);
2000-09-18 15:18:56 +00:00
2000-10-19 10:47:14 +00:00
sal_Bool bError = sal_False;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if (aFind != m_pImpl->m_pTables->end() && aFind->second.is())
2000-09-18 15:18:56 +00:00
{
if (bFkt)
{
2000-10-19 10:47:14 +00:00
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
2000-09-18 15:18:56 +00:00
OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive());
2000-09-18 15:18:56 +00:00
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
2000-09-18 15:18:56 +00:00
pColumn->setRealName(rColumnName);
pColumn->setTableName(aFind->first);
2000-10-30 06:47:10 +00:00
Reference< XPropertySet> xCol = pColumn;
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
_rColumns->get().push_back(xCol);
2000-09-18 15:18:56 +00:00
}
else
{
2000-10-30 06:47:10 +00:00
Reference< XPropertySet > xColumn;
if (aFind->second->getColumns()->hasByName(rColumnName) && (aFind->second->getColumns()->getByName(rColumnName) >>= xColumn))
2000-09-18 15:18:56 +00:00
{
2000-10-19 10:47:14 +00:00
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
2000-09-18 15:18:56 +00:00
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OParseColumn* pColumn = new OParseColumn(xColumn,isCaseSensitive());
2000-09-18 15:18:56 +00:00
pColumn->setName(aNewColName);
pColumn->setRealName(rColumnName);
pColumn->setTableName(aFind->first);
2000-10-30 06:47:10 +00:00
Reference< XPropertySet> xCol = pColumn;
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
_rColumns->get().push_back(xCol);
2000-09-18 15:18:56 +00:00
}
else
2000-10-19 10:47:14 +00:00
bError = sal_True;
2000-09-18 15:18:56 +00:00
}
}
else
2000-10-19 10:47:14 +00:00
bError = sal_True;
2000-09-18 15:18:56 +00:00
// Tabelle existiert nicht oder Feld nicht vorhanden
if (bError)
{
2000-10-19 10:47:14 +00:00
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
2000-09-18 15:18:56 +00:00
OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
ColumnValue::NULLABLE_UNKNOWN,0,0,DataType::VARCHAR,sal_False,sal_False,isCaseSensitive());
2000-09-18 15:18:56 +00:00
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
2000-09-18 15:18:56 +00:00
2000-10-30 06:47:10 +00:00
Reference< XPropertySet> xCol = pColumn;
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
_rColumns->get().push_back(xCol);
2000-09-18 15:18:56 +00:00
}
}
}
//-----------------------------------------------------------------------------
2000-10-19 10:47:14 +00:00
::rtl::OUString OSQLParseTreeIterator::getUniqueColumnName(const ::rtl::OUString & rColumnName) const
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getUniqueColumnName" );
2000-09-18 15:18:56 +00:00
::rtl::OUString aAlias(rColumnName);
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
OSQLColumns::Vector::const_iterator aIter = find(
m_aSelectColumns->get().begin(),
m_aSelectColumns->get().end(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
aAlias,
::comphelper::UStringMixEqual( isCaseSensitive() )
);
2000-09-18 15:18:56 +00:00
sal_Int32 i=1;
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
while(aIter != m_aSelectColumns->get().end())
2000-09-18 15:18:56 +00:00
{
(aAlias = rColumnName) += ::rtl::OUString::valueOf(i++);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
aIter = find(
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
m_aSelectColumns->get().begin(),
m_aSelectColumns->get().end(),
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
aAlias,
::comphelper::UStringMixEqual( isCaseSensitive() )
);
2000-09-18 15:18:56 +00:00
}
return aAlias;
}
//-----------------------------------------------------------------------------
2000-10-19 10:47:14 +00:00
void OSQLParseTreeIterator::setOrderByColumnName(const ::rtl::OUString & rColumnName, const ::rtl::OUString & rTableRange,sal_Bool bAscending)
2000-09-18 15:18:56 +00:00
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::setOrderByColumnName" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
Reference<XPropertySet> xColumn = findColumn( rColumnName, rTableRange, false );
if ( xColumn.is() )
m_aOrderColumns->get().push_back(new OOrderColumn( xColumn, rTableRange, isCaseSensitive(), bAscending ) );
else
{
sal_Int32 nId = rColumnName.toInt32();
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
if ( nId > 0 && nId < static_cast<sal_Int32>(m_aSelectColumns->get().size()) )
m_aOrderColumns->get().push_back( new OOrderColumn( ( m_aSelectColumns->get() )[nId-1], isCaseSensitive(), bAscending ) );
}
2000-09-18 15:18:56 +00:00
#ifdef SQL_TEST_PARSETREEITERATOR
cout << "OSQLParseTreeIterator::setOrderByColumnName: "
<< (const char *) rColumnName << ", "
<< (const char *) rTableRange << ", "
<< (bAscending ? "true" : "false")
2000-09-18 15:18:56 +00:00
<< "\n";
#endif
}
//-----------------------------------------------------------------------------
void OSQLParseTreeIterator::setGroupByColumnName(const ::rtl::OUString & rColumnName, const ::rtl::OUString & rTableRange)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::setGroupByColumnName" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
Reference<XPropertySet> xColumn = findColumn( rColumnName, rTableRange, false );
if ( xColumn.is() )
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
m_aGroupColumns->get().push_back(new OParseColumn(xColumn,isCaseSensitive()));
else
{
sal_Int32 nId = rColumnName.toInt32();
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 13:32:01 +00:00
if ( nId > 0 && nId < static_cast<sal_Int32>(m_aSelectColumns->get().size()) )
m_aGroupColumns->get().push_back(new OParseColumn((m_aSelectColumns->get())[nId-1],isCaseSensitive()));
}
2000-09-18 15:18:56 +00:00
#ifdef SQL_TEST_PARSETREEITERATOR
cout << "OSQLParseTreeIterator::setOrderByColumnName: "
<< (const char *) rColumnName << ", "
<< (const char *) rTableRange << ", "
<< (bAscending ? "true" : "false")
<< "\n";
#endif
}
2000-09-18 15:18:56 +00:00
//-----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getWhereTree() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getWhereTree" );
2000-10-19 10:47:14 +00:00
2000-09-18 15:18:56 +00:00
if (!m_pParseTree)
return NULL;
// Parse Tree analysieren (je nach Statement-Typ)
// und Zeiger auf WHERE-Klausel setzen:
OSQLParseNode * pWhereClause = NULL;
if(getStatementType() == SQL_STATEMENT_SELECT)
{
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pWhereClause = pTableExp->getChild(1);
}
else if (SQL_ISRULE(m_pParseTree,update_statement_searched) ||
SQL_ISRULE(m_pParseTree,delete_statement_searched))
{
pWhereClause = m_pParseTree->getChild(m_pParseTree->count()-1);
}
if(pWhereClause->count() != 2)
pWhereClause = NULL;
return pWhereClause;
}
//-----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getOrderTree() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getOrderTree" );
2000-10-19 10:47:14 +00:00
2000-09-18 15:18:56 +00:00
if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT)
return NULL;
// Parse Tree analysieren (je nach Statement-Typ)
// und Zeiger auf ORDER-Klausel setzen:
OSQLParseNode * pOrderClause = NULL;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pOrderClause = pTableExp->getChild(4);
// Wenn es aber eine order_by ist, dann darf sie nicht leer sein:
if(pOrderClause->count() != 3)
pOrderClause = NULL;
return pOrderClause;
}
//-----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getGroupByTree() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getGroupByTree" );
2000-09-18 15:18:56 +00:00
if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT)
return NULL;
// Parse Tree analysieren (je nach Statement-Typ)
// und Zeiger auf ORDER-Klausel setzen:
OSQLParseNode * pGroupClause = NULL;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
2001-10-26 07:04:06 +00:00
pGroupClause = pTableExp->getChild(2);
2000-09-18 15:18:56 +00:00
// Wenn es aber eine order_by ist, dann darf sie nicht leer sein:
if(pGroupClause->count() != 3)
pGroupClause = NULL;
return pGroupClause;
}
//-----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getHavingTree() const
{
if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT)
return NULL;
// Parse Tree analysieren (je nach Statement-Typ)
// und Zeiger auf ORDER-Klausel setzen:
OSQLParseNode * pHavingClause = NULL;
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(m_pParseTree->count() >= 4,"ParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
OSQLParseNode * pTableExp = m_pParseTree->getChild(3);
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
OSL_ENSURE(pTableExp != NULL,"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(SQL_ISRULE(pTableExp,table_exp),"OSQLParseTreeIterator: error in parse tree!");
OSL_ENSURE(pTableExp->count() == 5,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pHavingClause = pTableExp->getChild(3);
// Wenn es aber eine order_by ist, dann darf sie nicht leer sein:
if(pHavingClause->count() < 1)
pHavingClause = NULL;
return pHavingClause;
}
2001-01-09 12:11:07 +00:00
// -----------------------------------------------------------------------------
sal_Bool OSQLParseTreeIterator::isTableNode(const OSQLParseNode* _pTableNode) const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::isTableNode" );
2001-01-09 12:11:07 +00:00
return _pTableNode && (SQL_ISRULE(_pTableNode,catalog_name) ||
SQL_ISRULE(_pTableNode,schema_name) ||
SQL_ISRULE(_pTableNode,table_name));
}
2001-02-23 13:54:11 +00:00
// -----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getSimpleWhereTree() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getSimpleWhereTree" );
const OSQLParseNode* pNode = getWhereTree();
return pNode ? pNode->getChild(1) : NULL;
}
// -----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getSimpleOrderTree() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getSimpleOrderTree" );
const OSQLParseNode* pNode = getOrderTree();
return pNode ? pNode->getChild(2) : NULL;
}
// -----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getSimpleGroupByTree() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getSimpleGroupByTree" );
const OSQLParseNode* pNode = getGroupByTree();
return pNode ? pNode->getChild(2) : NULL;
}
// -----------------------------------------------------------------------------
const OSQLParseNode* OSQLParseTreeIterator::getSimpleHavingTree() const
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::getSimpleHavingTree" );
const OSQLParseNode* pNode = getHavingTree();
return pNode ? pNode->getChild(1) : NULL;
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
// -----------------------------------------------------------------------------
Reference< XPropertySet > OSQLParseTreeIterator::findColumn( const ::rtl::OUString & rColumnName, const ::rtl::OUString & rTableRange, bool _bLookInSubTables )
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::findColumn" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
Reference< XPropertySet > xColumn = findColumn( *m_pImpl->m_pTables, rColumnName, rTableRange );
if ( !xColumn.is() && _bLookInSubTables )
xColumn = findColumn( *m_pImpl->m_pSubTables, rColumnName, rTableRange );
return xColumn;
}
// -----------------------------------------------------------------------------
Reference< XPropertySet > OSQLParseTreeIterator::findColumn(const OSQLTables& _rTables,const ::rtl::OUString & rColumnName, const ::rtl::OUString & rTableRange)
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::findColumn" );
Reference< XPropertySet > xColumn;
if ( rTableRange.getLength() )
{
ConstOSQLTablesIterator aFind = _rTables.find(rTableRange);
2000-10-19 10:47:14 +00:00
if ( aFind != _rTables.end()
&& aFind->second.is()
&& aFind->second->getColumns().is()
&& aFind->second->getColumns()->hasByName(rColumnName) )
aFind->second->getColumns()->getByName(rColumnName) >>= xColumn;
}
if ( !xColumn.is() )
{
OSQLTables::const_iterator aEnd = _rTables.end();
for(OSQLTables::const_iterator aIter = _rTables.begin(); aIter != aEnd; ++aIter)
{
if ( aIter->second.is() )
{
Reference<XNameAccess> xColumns = aIter->second->getColumns();
if( xColumns.is() && xColumns->hasByName(rColumnName) && (xColumns->getByName(rColumnName) >>= xColumn) )
{
OSL_ENSURE(xColumn.is(),"Column isn't a propertyset!");
break; // diese Column darf nur einmal vorkommen
}
}
}
}
return xColumn;
}
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
// -----------------------------------------------------------------------------
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode _eError, const ::rtl::OUString* _pReplaceToken1, const ::rtl::OUString* _pReplaceToken2 )
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::impl_appendError" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
::rtl::OUString sErrorMessage = m_rParser.getContext().getErrorMessage( _eError );
if ( _pReplaceToken1 )
{
bool bTwoTokens = ( _pReplaceToken2 != NULL );
const sal_Char* pPlaceHolder1 = bTwoTokens ? "#1" : "#";
const ::rtl::OUString sPlaceHolder1 = ::rtl::OUString::createFromAscii( pPlaceHolder1 );
sErrorMessage = sErrorMessage.replaceAt( sErrorMessage.indexOf( sPlaceHolder1 ), sPlaceHolder1.getLength(), *_pReplaceToken1 );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( _pReplaceToken2 )
sErrorMessage = sErrorMessage.replaceAt( sErrorMessage.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#2")) ), 2, *_pReplaceToken2 );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
}
impl_appendError( SQLException(
sErrorMessage, NULL, getStandardSQLState( SQL_GENERAL_ERROR ), 1000, Any() ) );
}
// -----------------------------------------------------------------------------
void OSQLParseTreeIterator::impl_appendError( const SQLException& _rError )
{
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::impl_appendError" );
INTEGRATION: CWS qiq (1.46.78); FILE MERGED 2006/07/04 07:16:34 fs 1.46.78.17: #i10000# 2006/06/30 14:55:36 fs 1.46.78.16: corected parameter in sub query parsing 2006/06/30 13:34:08 fs 1.46.78.15: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:32:39 fs 1.46.78.14: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:19:37 fs 1.46.78.13: #i51143# localize the error message about cyclic sub queries 2006/06/30 13:06:25 fs 1.46.78.12: #i51143# protect against cyclic references in the query names 2006/06/28 08:40:40 fs 1.46.78.11: #i10000# 2006/06/28 07:39:19 fs 1.46.78.10: #i10000# 2006/06/27 15:10:24 fs 1.46.78.9: RESYNC: (1.46-1.47); FILE MERGED 2006/06/26 21:11:50 fs 1.46.78.8: layout 2006/06/09 13:05:40 fs 1.46.78.7: corrected an assertion 2006/06/07 12:18:06 fs 1.46.78.6: #i51143# allow subqueries in FROM / getTableRef -> getTableNode 2006/05/23 13:54:37 fs 1.46.78.5: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# 2006/05/19 08:15:57 fs 1.46.78.4: #i51143# more fine grained error messages about existing tables/queries 2006/05/16 20:09:21 fs 1.46.78.3: #i51143# minor refactoring 2006/05/15 13:45:33 fs 1.46.78.2: #i51143# heavily extended the heuristics to allow queries in queries - still need a better indicator for allowing this feature 2006/05/10 10:53:22 fs 1.46.78.1: primary change: #i51143# allow the iterator to also recognize queries secondary change: some code cleanup: - removed unused code - "warnings" replaced with "errors" (since this is what they are)
2006-07-10 13:38:34 +00:00
if ( m_aErrors.Message.getLength() )
{
SQLException* pErrorChain = &m_aErrors;
while ( pErrorChain->NextException.hasValue() )
pErrorChain = static_cast< SQLException* >( pErrorChain->NextException.pData );
pErrorChain->NextException <<= _rError;
}
else
m_aErrors = _rError;
}
// -----------------------------------------------------------------------------
sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNode )
{
sal_Int32 nType = DataType::OTHER;
::rtl::OUString sFunctionName;
if ( SQL_ISRULE(_pNode,length_exp) )
{
_pNode->getChild(0)->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() );
}
else if ( SQL_ISRULE(_pNode,num_value_exp) || SQL_ISRULE(_pNode,term) || SQL_ISRULE(_pNode,factor) )
{
nType = DataType::DOUBLE;
}
else
{
_pNode->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
// MIN and MAX have another return type, we have to check the expression itself.
// @see http://qa.openoffice.org/issues/show_bug.cgi?id=99566
if ( SQL_ISRULE(_pNode,general_set_fct) && (SQL_ISTOKEN(_pNode->getChild(0),MIN) || SQL_ISTOKEN(_pNode->getChild(0),MAX) ))
{
const OSQLParseNode* pValueExp = _pNode->getChild(3);
if (SQL_ISRULE(pValueExp,column_ref))
{
::rtl::OUString sColumnName;
::rtl::OUString aTableRange;
getColumnRange(pValueExp,sColumnName,aTableRange);
OSL_ENSURE(sColumnName.getLength(),"Columnname darf nicht leer sein");
Reference<XPropertySet> xColumn = findColumn( sColumnName, aTableRange, true );
if ( xColumn.is() )
{
xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_TYPE)) >>= nType;
}
}
else
{
if ( SQL_ISRULE(pValueExp,num_value_exp) || SQL_ISRULE(pValueExp,term) || SQL_ISRULE(pValueExp,factor) )
{
nType = DataType::DOUBLE;
}
else if ( SQL_ISRULE(pValueExp,datetime_primary) )
{
switch(pValueExp->getChild(0)->getTokenID() )
{
case SQL_TOKEN_CURRENT_DATE:
nType = DataType::DATE;
break;
case SQL_TOKEN_CURRENT_TIME:
nType = DataType::TIME;
break;
case SQL_TOKEN_CURRENT_TIMESTAMP:
nType = DataType::TIMESTAMP;
break;
}
}
else if ( SQL_ISRULE(pValueExp,value_exp_primary) )
{
nType = getFunctionReturnType(pValueExp->getChild(1));
}
else if ( SQL_ISRULE(pValueExp,concatenation)
|| SQL_ISRULE(pValueExp,char_factor)
|| SQL_ISRULE(pValueExp,bit_value_fct)
|| SQL_ISRULE(pValueExp,char_value_fct)
|| SQL_ISRULE(pValueExp,char_substring_fct)
|| SQL_ISRULE(pValueExp,fold)
|| SQL_ISTOKEN(pValueExp,STRING) )
{
nType = DataType::VARCHAR;
}
}
if ( nType == DataType::OTHER )
nType = DataType::DOUBLE;
}
else
nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() );
}
return nType;
2009-11-13 14:23:39 +01:00
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */