~zorba-coders/zorba/install_mysql_update

« back to all changes in this revision

Viewing changes to include/tables.h

  • Committer: Paul J. Lucas
  • Date: 2013-06-12 13:57:24 UTC
  • mfrom: (49.1.1 jdbc-module)
  • Revision ID: paul@lucasmail.org-20130612135724-8kxech0lnksm5269
Merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2006-2012 The FLWOR Foundation.
 
3
 * 
 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * You may obtain a copy of the License at
 
7
 * 
 
8
 * http://www.apache.org/licenses/LICENSE-2.0
 
9
 * 
 
10
 * Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
 
 
17
#include <zorba/empty_sequence.h>
 
18
#include <zorba/external_module.h>
 
19
#include <zorba/item_factory.h>
 
20
#include <zorba/zorba.h>
 
21
 
 
22
#include "JavaVMSingleton.h"
 
23
 
 
24
 
 
25
namespace zorba
 
26
{
 
27
namespace jdbc
 
28
{
 
29
 
 
30
class TablesFunction : public ContextualExternalFunction
 
31
{
 
32
  private:
 
33
    const ExternalModule* theModule;
 
34
    ItemFactory* theFactory;
 
35
    XmlDataManager* theDataManager;
 
36
 
 
37
  public:
 
38
    TablesFunction(const ExternalModule* aModule) :
 
39
      theModule(aModule),
 
40
      theFactory(Zorba::getInstance(0)->getItemFactory()),
 
41
      theDataManager(Zorba::getInstance(0)->getXmlDataManager())
 
42
    {}
 
43
 
 
44
    ~TablesFunction()
 
45
    {}
 
46
 
 
47
  public:
 
48
    virtual String getURI() const
 
49
    { return theModule->getURI(); }
 
50
 
 
51
    virtual String getLocalName() const
 
52
    { return "tables"; }
 
53
 
 
54
    virtual ItemSequence_t 
 
55
      evaluate(const ExternalFunction::Arguments_t& args,
 
56
               const zorba::StaticContext*,
 
57
               const zorba::DynamicContext*) const;
 
58
};
 
59
 
 
60
 
 
61
 
 
62
}}; // namespace zorba, jdbc
 
63