/src/libreoffice/connectivity/source/drivers/file/FNoException.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
5 | | * This Source Code Form is subject to the terms of the Mozilla Public |
6 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
7 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
8 | | * |
9 | | * This file incorporates work covered by the following license notice: |
10 | | * |
11 | | * Licensed to the Apache Software Foundation (ASF) under one or more |
12 | | * contributor license agreements. See the NOTICE file distributed |
13 | | * with this work for additional information regarding copyright |
14 | | * ownership. The ASF licenses this file to you under the Apache |
15 | | * License, Version 2.0 (the "License"); you may not use this file |
16 | | * except in compliance with the License. You may obtain a copy of |
17 | | * the License at http://www.apache.org/licenses/LICENSE-2.0 . |
18 | | */ |
19 | | |
20 | | #include <file/FCatalog.hxx> |
21 | | #include <file/fcomp.hxx> |
22 | | #include <file/fanalyzer.hxx> |
23 | | #include <file/FResultSet.hxx> |
24 | | #include <file/FPreparedStatement.hxx> |
25 | | #include <connectivity/FValue.hxx> |
26 | | #include <tools/debug.hxx> |
27 | | #include <TKeyValue.hxx> |
28 | | |
29 | | using namespace connectivity; |
30 | | using namespace connectivity::file; |
31 | | |
32 | | void OFileCatalog::refreshViews() |
33 | 0 | {} |
34 | | void OFileCatalog::refreshGroups() |
35 | 0 | {} |
36 | | void OFileCatalog::refreshUsers() |
37 | 0 | { |
38 | 0 | } |
39 | | |
40 | | OPredicateInterpreter::~OPredicateInterpreter() |
41 | 31.4k | { |
42 | 31.4k | while(!m_aStack.empty()) |
43 | 0 | { |
44 | 0 | delete m_aStack.top(); |
45 | 0 | m_aStack.pop(); |
46 | 0 | } |
47 | | // m_aStack.clear(); |
48 | 31.4k | } |
49 | | |
50 | | void OPredicateCompiler::Clean() |
51 | 62.8k | { |
52 | 62.8k | m_aCodeList.clear(); |
53 | 62.8k | } |
54 | | |
55 | | void OSQLAnalyzer::bindParameterRow(OValueRefRow const & _pRow) |
56 | 0 | { |
57 | 0 | OCodeList& rCodeList = m_aCompiler->m_aCodeList; |
58 | 0 | for (auto const& code : rCodeList) |
59 | 0 | { |
60 | 0 | OOperandParam* pParam = dynamic_cast<OOperandParam*>(code.get()); |
61 | 0 | if ( pParam ) |
62 | 0 | pParam->bindValue(_pRow); |
63 | 0 | } |
64 | 0 | } |
65 | | |
66 | | void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,std::vector< OSQLParseNode*>& _rParaNodes) |
67 | 0 | { |
68 | 0 | assert(pParseNode && "OResultSet: internal error: invalid ParseNode"); |
69 | | |
70 | | // found parameter Name-Rule? |
71 | 0 | if (SQL_ISRULE(pParseNode,parameter)) |
72 | 0 | { |
73 | 0 | DBG_ASSERT(pParseNode->count() >= 1,"OResultSet: faulty Parse Tree"); |
74 | 0 | DBG_ASSERT(pParseNode->getChild(0)->getNodeType() == SQLNodeType::Punctuation,"OResultSet: faulty Parse Tree"); |
75 | |
|
76 | 0 | _rParaNodes.push_back(pParseNode); |
77 | | // Further descend not necessary |
78 | 0 | return; |
79 | 0 | } |
80 | | |
81 | | // Further descend in Parse Tree |
82 | 0 | for (size_t i = 0; i < pParseNode->count(); i++) |
83 | 0 | scanParameter(pParseNode->getChild(i),_rParaNodes); |
84 | 0 | } |
85 | | |
86 | | std::unique_ptr<OKeyValue> OResultSet::GetOrderbyKeyValue(OValueRefRow const & _rRow) |
87 | 0 | { |
88 | 0 | sal_uInt32 nBookmarkValue = std::abs((*_rRow)[0]->getValue().getInt32()); |
89 | |
|
90 | 0 | std::unique_ptr<OKeyValue> pKeyValue = OKeyValue::createKeyValue(nBookmarkValue); |
91 | |
|
92 | 0 | for (auto const& elem : m_aOrderbyColumnNumber) |
93 | 0 | { |
94 | 0 | OSL_ENSURE(elem < static_cast<sal_Int32>(_rRow->size()),"Invalid index for orderkey values!"); |
95 | 0 | pKeyValue->pushKey(new ORowSetValueDecorator((*_rRow)[elem]->getValue())); |
96 | 0 | } |
97 | |
|
98 | 0 | return pKeyValue; |
99 | 0 | } |
100 | | |
101 | | |
102 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |