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

2247 lines
91 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-06-12 22:04:38 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
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"
2000-09-18 15:18:56 +00:00
#include <iterator>
#include <boost/scoped_ptr.hpp>
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;
2012-03-01 14:53:10 +05:30
::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
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
::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 OUString& _rQueryName )
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_pForbiddenQueryNames.get() )
return true;
if ( m_pForbiddenQueryNames->find( _rQueryName ) == m_pForbiddenQueryNames->end() )
return true;
return 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
/** helper class for temporarily adding a query name to a list of forbidden query names
*/
class ForbidQueryName
{
::boost::shared_ptr< QueryNameSet >& m_rpAllForbiddenNames;
OUString 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
public:
ForbidQueryName( OSQLParseTreeIteratorImpl& _rIteratorImpl, const OUString _rForbiddenQueryName )
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_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 );
}
};
}
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
{
SAL_INFO( "connectivity.parse", "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 ) )
{
SAL_INFO( "connectivity.parse", "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
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
{
SAL_INFO( "connectivity.parse", "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;
}
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::isCaseSensitive() const
{
SAL_INFO( "connectivity.parse", "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
{
SAL_INFO( "connectivity.parse", "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
}
2000-09-18 15:18:56 +00:00
void OSQLParseTreeIterator::setParseTree(const OSQLParseNode * pNewParseTree)
{
SAL_INFO( "connectivity.parse", "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;
}
2012-03-01 14:53:10 +05:30
// If m_pParseTree, but no connection then 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_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
2012-03-01 14:53:10 +05:30
// Determine statement type ...
2000-09-18 15:18:56 +00:00
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
{
static void impl_getRowString( const Reference< XRow >& _rxRow, const sal_Int32 _nColumnIndex, OUString& _out_rString )
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_rString = _rxRow->getString( _nColumnIndex );
if ( _rxRow->wasNull() )
_out_rString = "";
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-09-18 15:18:56 +00:00
static OUString lcl_findTableInMetaData(
const Reference< XDatabaseMetaData >& _rxDBMeta, const OUString& _rCatalog,
const OUString& _rSchema, const OUString& _rTableName )
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
{
OUString sComposedName;
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 const OUString s_sTableTypeView("VIEW");
static const OUString s_sTableTypeTable("TABLE");
static const OUString s_sWildcard( "%" );
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< OUString > sTableTypes(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
sTableTypes[0] = s_sTableTypeView;
sTableTypes[1] = s_sTableTypeTable;
sTableTypes[2] = s_sWildcard; // just to be sure to include anything else ....
if ( _rxDBMeta.is() )
{
sComposedName = "";
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< XResultSet> xRes = _rxDBMeta->getTables(
!_rCatalog.isEmpty() ? makeAny( _rCatalog ) : Any(), !_rSchema.isEmpty() ? _rSchema : s_sWildcard, _rTableName, sTableTypes );
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< XRow > xCurrentRow( xRes, UNO_QUERY );
if ( xCurrentRow.is() && xRes->next() )
{
OUString sCatalog, sSchema, sName;
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_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;
}
}
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_getQueryParameterColumns( const OSQLTable& _rQuery )
{
SAL_INFO( "connectivity.parse", "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
OUString sSubQueryCommand;
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_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.isEmpty() ) )
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;
OUString sError;
boost::scoped_ptr< OSQLParseNode > pSubQueryNode( const_cast< OSQLParser& >( m_rParser ).parseTree( sError, sSubQueryCommand, 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 ( !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 OUString& _rComposedName )
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_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::impl_locateRecordSource" );
if ( _rComposedName.isEmpty() )
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_WARN( "connectivity.parse", "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;
OUString sComposedName( _rComposedName );
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
try
{
OUString sCatalog, sSchema, sName;
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
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 OUString & 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
{
SAL_INFO( "connectivity.parse", "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;
OUString aSchema,aTableName,aComposedName;
OUString aTableRange(rTableRange);
2000-09-18 15:18:56 +00:00
2012-03-01 14:53:10 +05:30
// Get table name
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,
aCatalog.hasValue() ? ::comphelper::getString(aCatalog) : OUString(),
2001-01-09 12:11:07 +00:00
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
if ( aTableRange.isEmpty() )
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)
{
2012-03-01 14:53:10 +05:30
if (i_pJoinCondition->count() == 3 && // Expression with brackets
SQL_ISPUNCTUATION(i_pJoinCondition->getChild(0),"(") &&
SQL_ISPUNCTUATION(i_pJoinCondition->getChild(2),")"))
{
impl_fillJoinConditions(i_pJoinCondition->getChild(1));
}
2012-03-01 14:53:10 +05:30
else if (SQL_ISRULEOR2(i_pJoinCondition,search_condition,boolean_term) && // AND/OR logic operation:
i_pJoinCondition->count() == 3)
{
2012-03-01 14:53:10 +05:30
// Only allow AND logic operation
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
2012-03-01 14:53:10 +05:30
OSL_ENSURE(i_pJoinCondition->count() == 3,"OQueryDesignView::InsertJoinConnection: error in the 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;
}
void OSQLParseTreeIterator::getQualified_join( OSQLTables& _rTables, const OSQLParseNode *pTableRef, OUString& aTableRange )
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "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 = "";
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);
2012-03-01 14:53:10 +05:30
// All columns in the 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,OUString& rTableRange )
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "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 );
// LEM TODO: now, we need to setup a OSQLTable from pQueryExpression in some way
// and stick it in _rTables[rTableRange]. Probably fake it by
// setting up a full OSQLParseTreeIterator on pQueryExpression
// and using its m_aSelectColumns
// This is necessary in stuff like "SELECT * FROM tbl1 INNER JOIN (SELECT foo, bar FROM tbl2) AS tbl3"
// so that setSelectColumnName() can expand the "*" correctly.
// See e.g. R_UserAndLastSubscription query of https://bugs.libreoffice.org/attachment.cgi?id=71871
}
else
{
SAL_WARN( "connectivity.parse", "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
SAL_WARN( "connectivity.parse", "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
{
SAL_INFO( "connectivity.parse", "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;
OUString aTableRange;
2000-10-19 10:47:14 +00:00
for (sal_uInt32 i = 0; i < pTableRefCommalist->count(); i++)
2012-03-01 14:53:10 +05:30
{ // Process FROM clause
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
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
{
2012-03-01 14:53:10 +05:30
// Table refereneces can be made up of table names, table names (+),'('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
pTableName = pTableListElement->getChild(0);
if( isTableNode( pTableName ) )
2012-03-01 14:53:10 +05:30
{ // Found table names
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
{
SAL_INFO( "connectivity.parse", "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 )
{
OUString sTableRange;
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, 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
}
OUString OSQLParseTreeIterator::getColumnAlias(const OSQLParseNode* _pDerivedColumn)
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "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!");
OUString sColumnAlias;
2002-07-15 11:34:56 +00:00
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
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,
OUString& _out_rColumnName, OUString& _out_rTableRange,
const OSQLColumns* _pSelectColumns, OUString& _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
{
_out_rColumnName = _out_rTableRange = _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
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, false, 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
{
OUString sName, sTableName;
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
xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_REALNAME ) ) >>= sName;
xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_TABLENAME ) ) >>= sTableName;
if ( sName == _out_rColumnName && ( _out_rTableRange.isEmpty() || sTableName == _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
xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_NAME ) ) >>= _out_rColumnAliasIfPresent;
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
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
}
}
else if(SQL_ISRULE(_pColumnRef,general_set_fct) || SQL_ISRULE(_pColumnRef,set_fct_spec))
2012-03-01 14:53:10 +05:30
{ // Function
_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,
OUString& _rColumnName,
OUString& _rTableRange) const
2002-07-15 11:34:56 +00:00
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getColumnRange" );
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,
OUString& _rColumnName,
OUString& _rTableRange,
OUString& _out_rColumnAliasIfPresent ) const
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "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, OUString& _out_rColumnName, 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
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getColumnRange" );
OUString sDummy;
lcl_getColumnRange( _pColumnRef, _rxConnection, _out_rColumnName, _out_rTableRange, NULL, sDummy );
2000-09-18 15:18:56 +00:00
}
bool OSQLParseTreeIterator::getColumnTableRange(const OSQLParseNode* pNode, OUString &rTableRange) const
{
OUString tmp;
if(impl_getColumnTableRange(pNode, tmp))
{
rTableRange = tmp;
return true;
}
else
return false;
}
bool OSQLParseTreeIterator::impl_getColumnTableRange(const OSQLParseNode* pNode, OUString &rTableRange) const
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getColumnTableRange" );
2012-03-01 14:53:10 +05:30
// See if all columns belong to one table
2000-09-18 15:18:56 +00:00
if (SQL_ISRULE(pNode,column_ref))
{
OUString aColName, aTableRange;
2000-09-18 15:18:56 +00:00
getColumnRange(pNode, aColName, aTableRange);
if (aTableRange.isEmpty()) // None found
2000-09-18 15:18:56 +00:00
{
2012-03-01 14:53:10 +05:30
// Look for the columns in the tables
for (OSQLTables::const_iterator 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
{
}
}
}
if (aTableRange.isEmpty())
return false;
2000-09-18 15:18:56 +00:00
}
if (rTableRange.isEmpty())
2000-09-18 15:18:56 +00:00
rTableRange = aTableRange;
else if (rTableRange != aTableRange)
return 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))
return false;
2000-09-18 15:18:56 +00:00
}
}
return true;
2000-09-18 15:18:56 +00:00
}
void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNode)
{
SAL_INFO( "connectivity.parse", "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))
{
OUString aColumnName;
OUString aTypeName;
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 = "VARCHAR";
}
if (!aTypeName.isEmpty())
{
//TODO:Create a new class for create statement to handle field length
OParseColumn* pColumn = new OParseColumn(aColumnName,aTypeName,OUString(),OUString(),
ColumnValue::NULLABLE_UNKNOWN,0,0,nType,sal_False,sal_False,isCaseSensitive(),
OUString(),OUString(),OUString());
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);
}
}
}
}
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
{
SAL_INFO( "connectivity.parse", "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 OUString aEmptyString;
2012-03-01 14:53:10 +05:30
// nyi: more checks for correct structure!
2000-09-18 15:18:56 +00:00
if (pSelectNode->getChild(2)->isRule() && SQL_ISPUNCTUATION(pSelectNode->getChild(2)->getChild(0),"*"))
{
// SELECT * ...
setSelectColumnName(m_aSelectColumns,OUString("*"), 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
{
2012-03-01 14:53:10 +05:30
// All the table's columns
OUString aTableRange;
pColumnRef->getChild(0)->parseNodeToStr( aTableRange, m_pImpl->m_xConnection, NULL, false, false );
setSelectColumnName(m_aSelectColumns,OUString("*"), 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
{
OUString aColumnAlias(getColumnAlias(pColumnRef)); // can be empty
OUString sColumnName;
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);
while (
pColumnRef->getKnownRuleID() != OSQLParseNode::subquery &&
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);
2012-03-01 14:53:10 +05:30
OSL_ENSURE(!sColumnName.isEmpty(),"Column name must not be empty!");
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))*/
{
2012-03-01 14:53:10 +05:30
// Function call present
pColumnRef->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, false, true );
// check if the column is also a parameter
traverseSearchCondition(pColumnRef); // num_value_exp
2000-09-18 15:18:56 +00:00
if ( pColumnRef->isRule() )
{
// LEM FIXME: the if condition is not quite right
// many expressions are rules, e.g. "5+3"
// or even: "colName + 1"
bFkt = sal_True;
nType = getFunctionReturnType(pColumnRef);
}
2000-09-18 15:18:56 +00:00
}
/*
else
{
aIteratorStatus.setStatementTooComplex();
return;
}
*/
if(aColumnAlias.isEmpty())
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
{
SAL_INFO( "connectivity.parse", "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)
{
SAL_INFO( "connectivity.parse", "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() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
sal_uInt32 nPos = ( _bOrder ? ORDER_BY_CHILD_POS : 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
OUString sColumnName;
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);
}
OSL_ENSURE(pColumnRef != NULL,"OSQLParseTreeIterator: error in parse tree!");
aTableRange = "";
sColumnName = "";
if ( SQL_ISRULE(pColumnRef,column_ref) )
2000-09-18 15:18:56 +00:00
{
2012-03-01 14:53:10 +05:30
// Column name (and TableRange):
getColumnRange(pColumnRef,sColumnName,aTableRange);
2000-09-18 15:18:56 +00:00
}
else
{ // here I found a predicate
pColumnRef->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, false, false );
2000-09-18 15:18:56 +00:00
}
OSL_ENSURE(!sColumnName.isEmpty(),"sColumnName must not be empty!");
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,DESC));
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)
{
SAL_INFO( "connectivity.parse", "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
{
OUString lcl_generateParameterName( const OSQLParseNode& _rParentNode, const OSQLParseNode& _rParamNode )
{
OUString sColumnName( "param" );
const sal_Int32 nCount = (sal_Int32)_rParentNode.count();
for ( sal_Int32 i = 0; i < nCount; ++i )
{
if ( _rParentNode.getChild(i) == &_rParamNode )
{
sColumnName += OUString::number( i+1 );
break;
}
}
return sColumnName;
}
}
void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode)
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseParameters" );
if ( _pNode == NULL )
return;
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, false, 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, false, 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, false, 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 );
}
}
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
{
SAL_INFO( "connectivity.parse", "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
2012-03-01 14:53:10 +05:30
// Analyse parse tree (depending on statement type)
// and set pointer to WHERE clause:
2000-09-18 15:18:56 +00:00
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() == TABLE_EXPRESSION_CHILD_COUNT,"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
SAL_WARN( "connectivity.parse","OSQLParseTreeIterator::getSelectionCriteria: positioned nyi");
2000-09-18 15:18:56 +00:00
} else {
2012-03-01 14:53:10 +05:30
// Other statement, no selection criteria
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 (!pWhereClause || !SQL_ISRULE(pWhereClause,where_clause))
{
2012-03-01 14:53:10 +05:30
// The WHERE clause is optional most of the time; which means it could be a "optional_where_clause".
OSL_ENSURE(pWhereClause && SQL_ISRULE(pWhereClause,opt_where_clause),"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
return false;
2000-09-18 15:18:56 +00:00
}
2012-03-01 14:53:10 +05:30
// But if it's a where_clause, then it must not be 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
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
// Process the comparison criteria now
2000-09-18 15:18:56 +00:00
traverseSearchCondition(pComparisonPredicate);
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
}
void OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode * pSearchCondition)
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseSearchCondition" );
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),")")
)
{
2012-03-01 14:53:10 +05:30
// Round brackets
traverseSearchCondition(pSearchCondition->getChild(1));
2000-09-18 15:18:56 +00:00
}
2012-03-01 14:53:10 +05:30
// The first element is an OR logical operation
2000-09-18 15:18:56 +00:00
else if ( SQL_ISRULE(pSearchCondition,search_condition) && pSearchCondition->count() == 3 )
{
// if this assert fails, the SQL grammar has changed!
assert(SQL_ISTOKEN(pSearchCondition->getChild(1),OR));
2012-03-01 14:53:10 +05:30
// Then process recursively (use the same row) ...
traverseSearchCondition(pSearchCondition->getChild(0));
2000-09-18 15:18:56 +00:00
// if (! aIteratorStatus.IsSuccessful())
// return;
2012-03-01 14:53:10 +05:30
// Continue with the right child
traverseSearchCondition(pSearchCondition->getChild(2));
2000-09-18 15:18:56 +00:00
}
2012-03-01 14:53:10 +05:30
// The first element is an AND logical operation (again)
2000-09-18 15:18:56 +00:00
else if ( SQL_ISRULE(pSearchCondition,boolean_term) && pSearchCondition->count() == 3 )
{
2012-03-01 14:53:10 +05:30
// Then process recursively (use the same row)
traverseSearchCondition(pSearchCondition->getChild(0));
2000-09-18 15:18:56 +00:00
// if (! aIteratorStatus.IsSuccessful())
// return;
2012-03-01 14:53:10 +05:30
// Continue with the right child
traverseSearchCondition(pSearchCondition->getChild(2));
2000-09-18 15:18:56 +00:00
}
2012-03-01 14:53:10 +05:30
// Else, process single search criteria (like =, !=, ..., LIKE, IS NULL etc.)
2000-09-18 15:18:56 +00:00
else if (SQL_ISRULE(pSearchCondition,comparison_predicate) )
{
OUString aValue;
pSearchCondition->getChild(2)->parseNodeToStr( aValue, m_pImpl->m_xConnection, NULL, false, 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;
}
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())
2012-03-01 14:53:10 +05:30
// Normal value
2000-09-18 15:18:56 +00:00
aValue = pNum_value_exp->getTokenValue();
else
{
pNum_value_exp->parseNodeToStr( aValue, m_pImpl->m_xConnection, NULL, false, 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);
traverseSearchCondition(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)
{
traverseSearchCondition(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
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))
{
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
}
2012-03-01 14:53:10 +05:30
// Just pass on the error
2000-09-18 15:18:56 +00:00
}
void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
,const OSQLParseNode* _pParentNode
,const OUString& _aColumnName
,OUString& _aTableRange
,const OUString& _rColumnAlias)
{
SAL_INFO( "connectivity.parse", "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);
OUString sParameterName;
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_ISPUNCTUATION(pMark,"?"))
{
sParameterName = !_rColumnAlias.isEmpty()
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
? _rColumnAlias
: !_aColumnName.isEmpty()
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
: 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
}
else if (SQL_ISPUNCTUATION(pMark,":"))
{
sParameterName = _pParseNode->getChild(1)->getTokenValue();
}
else if (SQL_ISPUNCTUATION(pMark,"["))
{
sParameterName = _pParseNode->getChild(1)->getTokenValue();
}
else
{
SAL_WARN( "connectivity.parse","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 ( _pParentNode && (SQL_ISRULE(_pParentNode,general_set_fct) || SQL_ISRULE(_pParentNode,set_fct_spec)) )
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 function as column_ref
OUString sFunctionName;
_pParentNode->getChild(0)->parseNodeToStr( sFunctionName, m_pImpl->m_xConnection, NULL, false, false );
const sal_uInt32 nCount = _pParentNode->count();
sal_uInt32 i = 0;
for(; i < nCount;++i)
{
if ( _pParentNode->getChild(i) == _pParseNode )
break;
}
sal_Int32 nType = ::connectivity::OSQLParser::getFunctionParameterType( _pParentNode->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,
OUString(),
OUString(),
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(),
OUString(),
OUString(),
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
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;
}
else if(!_aColumnName.isEmpty())// 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 = _pParentNode ? _pParentNode->getParent() : NULL;
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
if ( pParent && (SQL_ISRULE(pParent,general_set_fct) || SQL_ISRULE(pParent,set_fct_spec)) )
{
const sal_uInt32 nCount = _pParentNode->count();
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_uInt32 i = 0;
for(; i < nCount;++i)
{
if ( _pParentNode->getChild(i) == _pParseNode )
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
break;
}
nType = ::connectivity::OSQLParser::getFunctionParameterType( pParent->getChild(0)->getTokenID(), i+1);
}
OUString aNewColName( getUniqueColumnName( sParameterName ) );
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(aNewColName,
OUString(),
OUString(),
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,
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(),
OUString(),
OUString(),
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
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,
OUString& rValue,
2000-09-18 15:18:56 +00:00
OSQLParseNode * pParseNode)
{
SAL_INFO( "connectivity.parse", "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
2012-03-01 14:53:10 +05:30
// Column name (and TableRange):
OUString aColumnName, aTableRange, 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
getColumnRange( pColumnRef, aColumnName, aTableRange, sColumnAlias);
2000-09-18 15:18:56 +00:00
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
{
traverseSearchCondition(pParseNode);
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 (! 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
{
SAL_INFO( "connectivity.parse", "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
}
2000-09-18 15:18:56 +00:00
void OSQLParseTreeIterator::traverseAll()
{
SAL_INFO( "connectivity.parse", "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 )
{
SAL_INFO( "connectivity.parse", "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
}
2012-03-01 14:53:10 +05:30
// Dummy implementations
2000-09-18 15:18:56 +00:00
OSQLTable OSQLParseTreeIterator::impl_createTableObject( const OUString& rTableName,
const OUString& rCatalogName, const OUString& rSchemaName )
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "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,
OUString("Table"),
OUString("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
}
void OSQLParseTreeIterator::appendColumns(::rtl::Reference<OSQLColumns>& _rColumns,const OUString& _rTableAlias,const OSQLTable& _rTable)
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "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< OUString > aColNames = xColumns->getElementNames();
const OUString* pBegin = aColNames.getConstArray();
const OUString* pEnd = pBegin + aColNames.getLength();
2000-09-18 15:18:56 +00:00
for(;pBegin != pEnd;++pBegin)
{
2001-02-01 12:10:17 +00:00
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)))
, isCaseSensitive()
, getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME)))
, getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME)))
, getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME))));
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
}
}
void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _rColumns,const OUString & rColumnName,const OUString & rColumnAlias, const OUString & rTableRange,sal_Bool bFkt,sal_Int32 _nType,sal_Bool bAggFkt)
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::setSelectColumnName" );
if(rColumnName.toChar() == '*' && rTableRange.isEmpty())
{ // SELECT * ...
OSL_ENSURE(_rColumns == m_aSelectColumns,"Invalid columns used here!");
for(OSQLTables::const_iterator 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.isEmpty() )
{ // SELECT <table>.*
OSL_ENSURE(_rColumns == m_aSelectColumns,"Invalid columns used here!");
OSQLTables::const_iterator 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.isEmpty() )
{ // 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 ( OSQLTables::iterator 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;
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
OUString aNewColName( getUniqueColumnName( rColumnAlias ) );
// did not find a column with this name in any of the tables
OParseColumn* pColumn = new OParseColumn(
aNewColName,
OUString("VARCHAR"),
// TODO: does this match with _nType?
// Or should be fill this from the getTypeInfo of the connection?
OUString(),
OUString(),
ColumnValue::NULLABLE_UNKNOWN,
0,
0,
_nType,
sal_False,
sal_False,
isCaseSensitive(),
OUString(),
OUString(),
OUString()
);
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
{
OUString aNewColName(getUniqueColumnName(rColumnAlias));
2000-09-18 15:18:56 +00:00
OParseColumn* pColumn = new OParseColumn(aNewColName,OUString(),OUString(),OUString(),
ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive(),
OUString(),OUString(),OUString());
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
}
}
2012-03-01 14:53:10 +05:30
else // ColumnName and TableName exist
2000-09-18 15:18:56 +00:00
{
OSQLTables::const_iterator 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)
{
OUString aNewColName(getUniqueColumnName(rColumnAlias));
2000-09-18 15:18:56 +00:00
OParseColumn* pColumn = new OParseColumn(aNewColName,OUString(),OUString(),OUString(),
ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive(),
OUString(),OUString(),OUString());
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);
SAL_WARN("connectivity.parse", "Trying to construct a column with Function==true and a TableName; this makes no sense.");
assert(false);
2000-09-18 15:18:56 +00:00
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
{
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
2012-03-01 14:53:10 +05:30
// Table does not exist or lacking field
2000-09-18 15:18:56 +00:00
if (bError)
{
OUString aNewColName(getUniqueColumnName(rColumnAlias));
2000-09-18 15:18:56 +00:00
OParseColumn* pColumn = new OParseColumn(aNewColName,OUString(),OUString(),OUString(),
ColumnValue::NULLABLE_UNKNOWN,0,0,DataType::VARCHAR,sal_False,sal_False,isCaseSensitive(),
OUString(),OUString(),OUString());
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
}
}
}
OUString OSQLParseTreeIterator::getUniqueColumnName(const OUString & rColumnName) const
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getUniqueColumnName" );
OUString aAlias(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
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) += OUString::number(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;
}
void OSQLParseTreeIterator::setOrderByColumnName(const OUString & rColumnName, OUString & rTableRange, sal_Bool bAscending)
2000-09-18 15:18:56 +00:00
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::setOrderByColumnName" );
Reference<XPropertySet> xColumn = findSelectColumn( rColumnName );
if ( !xColumn.is() )
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 OUString & rColumnName, OUString & rTableRange)
{
SAL_INFO( "connectivity.parse", "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::setGroupByColumnName: "
<< (const char *) rColumnName << ", "
<< (const char *) rTableRange << ", "
<< (bAscending ? "true" : "false")
<< "\n";
#endif
}
2000-09-18 15:18:56 +00:00
2000-09-18 15:18:56 +00:00
const OSQLParseNode* OSQLParseTreeIterator::getWhereTree() const
{
SAL_INFO( "connectivity.parse", "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;
2012-03-01 14:53:10 +05:30
// Analyse parse tree (depending on statement type)
// and set pointer to WHERE clause:
2000-09-18 15:18:56 +00:00
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() == TABLE_EXPRESSION_CHILD_COUNT,"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 && pWhereClause->count() != 2)
2000-09-18 15:18:56 +00:00
pWhereClause = NULL;
return pWhereClause;
}
2000-09-18 15:18:56 +00:00
const OSQLParseNode* OSQLParseTreeIterator::getOrderTree() const
{
SAL_INFO( "connectivity.parse", "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;
2012-03-01 14:53:10 +05:30
// Analyse parse tree (depending on statement type)
// and set pointer to ORDER clause:
2000-09-18 15:18:56 +00:00
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() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pOrderClause = pTableExp->getChild(ORDER_BY_CHILD_POS);
// If it is a order_by, it must not be empty
2000-09-18 15:18:56 +00:00
if(pOrderClause->count() != 3)
pOrderClause = NULL;
return pOrderClause;
}
2000-09-18 15:18:56 +00:00
const OSQLParseNode* OSQLParseTreeIterator::getGroupByTree() const
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getGroupByTree" );
2000-09-18 15:18:56 +00:00
if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT)
return NULL;
2012-03-01 14:53:10 +05:30
// Analyse parse tree (depending on statement type)
// and set pointer to ORDER clause:
2000-09-18 15:18:56 +00:00
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() == TABLE_EXPRESSION_CHILD_COUNT,"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);
// If it is an order_by, it must not be empty
2000-09-18 15:18:56 +00:00
if(pGroupClause->count() != 3)
pGroupClause = NULL;
return pGroupClause;
}
2000-09-18 15:18:56 +00:00
const OSQLParseNode* OSQLParseTreeIterator::getHavingTree() const
{
if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT)
return NULL;
2012-03-01 14:53:10 +05:30
// Analyse parse tree (depending on statement type)
// and set pointer to ORDER clause:
2000-09-18 15:18:56 +00:00
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() == TABLE_EXPRESSION_CHILD_COUNT,"OSQLParseTreeIterator: error in parse tree!");
2000-09-18 15:18:56 +00:00
pHavingClause = pTableExp->getChild(3);
2012-03-01 14:53:10 +05:30
// If it is an order_by, then it must not be empty
2000-09-18 15:18:56 +00:00
if(pHavingClause->count() < 1)
pHavingClause = NULL;
return pHavingClause;
}
2001-01-09 12:11:07 +00:00
sal_Bool OSQLParseTreeIterator::isTableNode(const OSQLParseNode* _pTableNode) const
{
SAL_INFO( "connectivity.parse", "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));
}
const OSQLParseNode* OSQLParseTreeIterator::getSimpleWhereTree() const
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getSimpleWhereTree" );
const OSQLParseNode* pNode = getWhereTree();
return pNode ? pNode->getChild(1) : NULL;
}
const OSQLParseNode* OSQLParseTreeIterator::getSimpleOrderTree() const
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getSimpleOrderTree" );
const OSQLParseNode* pNode = getOrderTree();
return pNode ? pNode->getChild(2) : NULL;
}
const OSQLParseNode* OSQLParseTreeIterator::getSimpleGroupByTree() const
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getSimpleGroupByTree" );
const OSQLParseNode* pNode = getGroupByTree();
return pNode ? pNode->getChild(2) : NULL;
}
const OSQLParseNode* OSQLParseTreeIterator::getSimpleHavingTree() const
{
SAL_INFO( "connectivity.parse", "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::findSelectColumn( const OUString & rColumnName )
{
SAL_INFO( "connectivity.parse", "parse lionel@mamane.lu OSQLParseTreeIterator::findSelectColumn" );
for ( OSQLColumns::Vector::const_iterator lookupColumn = m_aSelectColumns->get().begin();
lookupColumn != m_aSelectColumns->get().end();
++lookupColumn )
{
Reference< XPropertySet > xColumn( *lookupColumn );
try
{
OUString sName;
xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_NAME ) ) >>= sName;
if ( sName == rColumnName )
return xColumn;
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
return NULL;
}
Reference< XPropertySet > OSQLParseTreeIterator::findColumn( const OUString & rColumnName, OUString & rTableRange, bool _bLookInSubTables )
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_INFO( "connectivity.parse", "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 OUString & rColumnName, OUString & rTableRange)
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::findColumn" );
Reference< XPropertySet > xColumn;
if ( !rTableRange.isEmpty() )
{
OSQLTables::const_iterator 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() )
{
const 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!");
// Cannot take "rTableRange = aIter->first" because that is the fully composed name
// that is, catalogName.schemaName.tableName
rTableRange = getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME)));
2012-03-01 14:53:10 +05:30
break; // This column must only exits once
}
}
}
}
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
void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode _eError, const OUString* _pReplaceToken1, const OUString* _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
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::impl_appendError" );
OUString sErrorMessage = m_rParser.getContext().getErrorMessage( _eError );
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 ( _pReplaceToken1 )
{
bool bTwoTokens = ( _pReplaceToken2 != NULL );
const sal_Char* pPlaceHolder1 = bTwoTokens ? "#1" : "#";
const OUString sPlaceHolder1 = OUString::createFromAscii( pPlaceHolder1 );
sErrorMessage = sErrorMessage.replaceFirst( sPlaceHolder1, *_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.replaceFirst( "#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() ) );
}
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( const SQLException& _rError )
{
SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::impl_appendError" );
if ( !m_aErrors.Message.isEmpty() )
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
{
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;
OUString sFunctionName;
if ( SQL_ISRULE(_pNode,length_exp) )
{
_pNode->getChild(0)->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, NULL, false, 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, false, 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))
{
OUString sColumnName;
OUString aTableRange;
getColumnRange(pValueExp,sColumnName,aTableRange);
2012-03-01 14:53:10 +05:30
OSL_ENSURE(!sColumnName.isEmpty(),"Columnname must not be empty!");
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: */