1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FNoException.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_connectivity.hxx"
33 #include "file/FCatalog.hxx"
34 #include "file/fcomp.hxx"
35 #include "file/fanalyzer.hxx"
36 #include "file/FResultSet.hxx"
37 #include "file/FPreparedStatement.hxx"
38 #include <connectivity/FValue.hxx>
39 #include <tools/debug.hxx>
40 #include "TKeyValue.hxx"
41 #include <rtl/logfile.hxx>
43 using namespace connectivity
;
44 using namespace connectivity::file
;
45 // -----------------------------------------------------------------------------
46 void OFileCatalog::refreshViews()
48 void OFileCatalog::refreshGroups()
50 void OFileCatalog::refreshUsers()
53 // -----------------------------------------------------------------------------
54 OPredicateInterpreter::~OPredicateInterpreter()
56 while(!m_aStack
.empty())
58 delete m_aStack
.top();
63 // -----------------------------------------------------------------------------
64 void OPredicateCompiler::Clean()
66 for(OCodeList::reverse_iterator aIter
= m_aCodeList
.rbegin(); aIter
!= m_aCodeList
.rend();++aIter
)
72 // -----------------------------------------------------------------------------
73 void OSQLAnalyzer::clean()
77 // -----------------------------------------------------------------------------
78 void OSQLAnalyzer::bindParameterRow(OValueRefRow
& _pRow
)
80 OCodeList
& rCodeList
= m_aCompiler
->m_aCodeList
;
81 for(OCodeList::iterator aIter
= rCodeList
.begin(); aIter
!= rCodeList
.end();++aIter
)
83 OOperandParam
* pParam
= PTR_CAST(OOperandParam
,(*aIter
));
85 pParam
->bindValue(_pRow
);
88 // -----------------------------------------------------------------------------
89 void OPreparedStatement::scanParameter(OSQLParseNode
* pParseNode
,::std::vector
< OSQLParseNode
*>& _rParaNodes
)
91 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "file", "Ocke.Janssen@sun.com", "OPreparedStatement::scanParameter" );
92 DBG_ASSERT(pParseNode
!= NULL
,"OResultSet: interner Fehler: ungueltiger ParseNode");
94 // Parameter Name-Regel gefunden?
95 if (SQL_ISRULE(pParseNode
,parameter
))
97 DBG_ASSERT(pParseNode
->count() >= 1,"OResultSet: Parse Tree fehlerhaft");
98 DBG_ASSERT(pParseNode
->getChild(0)->getNodeType() == SQL_NODE_PUNCTUATION
,"OResultSet: Parse Tree fehlerhaft");
100 _rParaNodes
.push_back(pParseNode
);
101 // Weiterer Abstieg nicht erforderlich
105 // Weiter absteigen im Parse Tree
106 for (UINT32 i
= 0; i
< pParseNode
->count(); i
++)
107 scanParameter(pParseNode
->getChild(i
),_rParaNodes
);
109 // -----------------------------------------------------------------------------
110 OKeyValue
* OResultSet::GetOrderbyKeyValue(OValueRefRow
& _rRow
)
112 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger
, "file", "Ocke.Janssen@sun.com", "OResultSet::GetOrderbyKeyValue" );
113 UINT32 nBookmarkValue
= Abs((sal_Int32
)(_rRow
->get())[0]->getValue());
115 OKeyValue
* pKeyValue
= OKeyValue::createKeyValue((UINT32
)nBookmarkValue
);
117 ::std::vector
<sal_Int32
>::iterator aIter
= m_aOrderbyColumnNumber
.begin();
118 for (;aIter
!= m_aOrderbyColumnNumber
.end(); ++aIter
)
120 OSL_ENSURE(*aIter
< static_cast<sal_Int32
>(_rRow
->get().size()),"Invalid index for orderkey values!");
121 pKeyValue
->pushKey(new ORowSetValueDecorator((_rRow
->get())[*aIter
]->getValue()));
126 // -----------------------------------------------------------------------------