DataSource.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/dataaccess/datasource/DataSource.h
22 
23  \brief An abstract class for data providers like a DBMS, Web Services or a regular file.
24 */
25 
26 #ifndef __TERRALIB_DATAACCESS_DATASOURCE_INTERNAL_DATASOURCE_H
27 #define __TERRALIB_DATAACCESS_DATASOURCE_INTERNAL_DATASOURCE_H
28 
29 // TerraLib
30 #include "../../common/Enums.h"
31 #include "../../core/uri/URI.h"
32 #include "../../geometry/Enums.h"
33 #include "../dataset/CheckConstraint.h"
34 #include "../dataset/DataSet.h"
35 #include "../dataset/DataSetType.h"
36 #include "../dataset/ForeignKey.h"
37 #include "../dataset/Index.h"
38 #include "../dataset/PrimaryKey.h"
39 #include "../dataset/Sequence.h"
40 #include "../dataset/UniqueKey.h"
41 #include "../Config.h"
42 
43 // STL
44 #include <map>
45 #include <memory>
46 #include <string>
47 #include <vector>
48 #include <set>
49 
50 // Boost
51 #include <boost/ptr_container/ptr_vector.hpp>
52 #include <boost/cstdint.hpp>
53 #include <boost/noncopyable.hpp>
54 #include <boost/shared_ptr.hpp>
55 
56 namespace te
57 {
58  namespace dt
59  {
60  class Property;
61  }
62 
63  namespace gm
64  {
65  class Envelope;
66  class Geometry;
67  }
68 
69  namespace da
70  {
71  class DataSetTypeCapabilities;
72  class DataSourceCapabilities;
73  class DataSourceTransactor;
74  class ObjectIdSet;
75  class Query;
76  class Select;
77  class SQLDialect;
78  class CheckConstraint;
79  class ForeignKey;
80  class Index;
81  class PrimaryKey;
82  class Sequence;
83  class UniqueKey;
84 
85  /*!
86  \class DataSource
87 
88  \brief An abstract class for data providers like a DBMS, Web Services or a regular file.
89 
90  A data source is the fundamental class of the data access module and
91  it may represent a data repository. Among other things, a repository can be:
92  <ul>
93  <li>a PostgreSQL database</li>
94  <li>an Oracle database</li>
95  <li>an OGC Web Feature Service</li>
96  <li>a directory of ESRI shape-files</li>
97  <li>a data stream</li>
98  <li>
99 
100  A data source can be used to access data in a repository
101  and it requires a driver implementation that must register a
102  concrete factory for building data source objects
103  of the type of the driver (DataSourceFactory).
104 
105  Each data source is characterized by a set of parameters that can be used
106  to set up an access channel to its underlying repository. This information
107  is referred as the data source connection information.
108 
109  A data source exposes the data contained in it as a collection of datasets.
110  The information about the data stored in a data source may be retrieved.
111 
112  Besides the descriptive information about the underlying data repository,
113  each data source also provides information about their capabilities.
114 
115  \ingroup dataaccess
116 
117  \sa DataSourceManager, DataSourceFactory, DataSet, DataSetType
118  */
119  class TEDATAACCESSEXPORT DataSource : public boost::noncopyable
120  {
121  public:
122 
123  DataSource(const std::string& connInfo);
124 
125  /*! \brief Default constructor that can be called by subclasses. */
126  DataSource(const te::core::URI& uri);
127 
128  //DataSource(te::core::URI uri);
129 
130  /*! \brief Virtual destructor. */
131  virtual ~DataSource();
132 
133  /*!
134  \brief An identification value for the data source.
135 
136  \return The data source identification.
137  */
138  const std::string& getId() const;
139 
140  /*!
141  \brief It sets the data source identification.
142 
143  \param id An identification value.
144  */
145  void setId(const std::string& id);
146 
147  /*!
148  \brief An Uniform Resource Identifier used to describe the datasource connection.
149 
150  \return A reference to the URI of the datasource.
151  */
152  const te::core::URI& getConnectionInfo() const;
153 
154  /** @name Data Source Basic Methods
155  * Basic Methods for operating a data source.
156  */
157  //@{
158 
159  /*!
160  \brief It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL.
161 
162  \return The data source type name. Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL.
163 
164  \note Each data source driver must have a unique name.
165 
166  \note Thread-safe!
167  */
168  virtual std::string getType() const = 0;
169 
170  /*!
171  \brief It returns the set of parameters used to set up the access channel to the underlying repository.
172 
173  This is the connection information used by a data source in order to enter in an operational mode,
174  when the open method is called.
175 
176  The key-value-pairs (kvp) may contain information about: maximum number of accepted connections,
177  user name and password required for establishing a connection, the url of a service, or any other
178  information needed by the data source to operate. This information is dependent on the data source
179  driver, so check the driver documentation for any additional information about the kvp.
180 
181  \return An associative container (key-value-pair) with information about the data source.
182 
183  \note Thread-safe!
184  */
185  //virtual const te::core::URI& getConnectionInfo() const = 0;
186 
187  /*!
188  \brief It sets the connection information to be used when connecting to the data source.
189 
190  \param connInfo The connection information.
191  */
192  //virtual void setConnectionInfo(const std::string& connInfo) = 0;
193 
194  /*!
195  \brief It returns an object that can execute transactions in the context of a data source.
196 
197  Use this method to get an object that allows to retrieve a dataset, to insert or update data,
198  or to modify dataset types(schemas). You don't need to cache this kind of object because each
199  driver in TerraLib already keeps a connection pooling. So, as soon as you finish using
200  the transactor, destroy it.
201 
202  \return A pointer to an object that can execute transactions in the context of a data source.
203 
204  \exception Exception An exception can be thrown, if it is not possible to get a transactor;
205  for example, if there is no available connection.
206 
207  \note Thread-safe!
208  */
209  virtual std::auto_ptr<DataSourceTransactor> getTransactor() = 0;
210 
211  /*!
212  \brief It opens the data source and makes it ready for using.
213 
214  If the subclass needs to open a connection to a database server,
215  to open a file, or to get information from a Web Service, this
216  method can do this kind of job to prepare the data source to be
217  in an operational mode. It will use the connection information
218  provided by the setConnectionInfo methods.
219 
220  \exception Exception An exception can be thrown, if the data source cannot be opened.
221 
222  \note Not thread-safe!
223  */
224  virtual void open() = 0;
225 
226  /*!
227  \brief It closes the data source and clears all the resources used by its internal communication channel.
228 
229  This method closes any connection, any opened file, and releases any other resources.
230 
231  \exception Exception An exception can be thrown, if the data source cannot be closed.
232 
233  \note Not thread-safe!
234  */
235  virtual void close() = 0;
236 
237  /*!
238  \brief It returns true if the data source is opened, otherwise it returns false.
239 
240  This method will not check if the data source is available for using;
241  it will just answer if the data source has already been opened.
242  If you want to know if the data source is available for using,
243  check the isValid() method.
244 
245  \return It returns true if the data source is opened; otherwise, it returns false.
246 
247  \note Not thread-safe!
248  */
249  virtual bool isOpened() const = 0;
250 
251  /*!
252  \brief It checks if the data source is valid (available for using).
253 
254  For a DBMS, it will check the opened connections.
255  For a WFS client, it will check if the server is reachable.
256  For a file, it will check if it can be read.
257 
258  \return It returns true if the data source is available; otherwise, it returns false.
259 
260  \note Not thread-safe!
261  */
262  virtual bool isValid() const = 0;
263 
264  /*!
265  \brief It returns the known capabilities of the data source.
266 
267  The returned object has all the information about the operations the data source can perform.
268  Here you will find if the data source implementation supports primary keys,
269  foreign keys, if it can be used in a thread environment and much more information.
270 
271  \param capabilities The known capabilities of the data source.
272 
273  \note Thread-safe!
274  */
275  virtual const DataSourceCapabilities& getCapabilities() const = 0;
276 
277  /*!
278  \brief It returns the data source SQL dialect, if there is one.
279 
280  \return The data source SQL dialect.
281 
282  \note Thread-safe!
283  */
284  virtual const SQLDialect* getDialect() const = 0;
285  //@}
286 
287  /** @name Data Retrieval
288  * Methods for retrieving data from the data source.
289  */
290  //@{
291 
292  /*!
293  \brief It gets the dataset identified by the given name.
294  This method always returns a disconnected dataset, that is, a dataset that no more depends
295  of the data source that provided the connection for its creation. Therefore, the disconnected
296  dataset continues to live after the connection given by the data source has been released.
297 
298  \param name The dataset name.
299  \param accessPolicy Access policy.
300  \param travType The traverse type associated to the returned dataset.
301 
302  \exception Exception It can throw an exception if:
303  <ul>
304  <li>something goes wrong during the data retrieval</li>
305  <li>if the data source driver doesn't support the traversal type</li>
306  </ul>
307 
308  \note Thread-safe!
309  */
310  virtual std::auto_ptr<DataSet> getDataSet(const std::string& name,
312  const te::common::AccessPolicy accessPolicy = te::common::RAccess);
313 
314  /*!
315  \brief It gets the dataset identified by the given name using a spatial filter over the specified property.
316  This method always returns a disconnected dataset, that is, a dataset that no more depends
317  of the data source that provided the connection for its creation. Therefore, the disconnected
318  dataset continues to live after the connection given by the data source has been released.
319 
320  \param name The dataset name.
321  \param propertyName The name of the spatial property used to apply the spatial filter.
322  \param e A rectangle used as a spatial filter when retrieving the dataset.
323  \param r The spatial relation used during the filtering.
324  \param accessPolicy Access policy.
325  \param travType The traversal type associated to the returned dataset.
326 
327  \exception Exception It can throw an exception if:
328  <ul>
329  <li>something goes wrong during the data retrieval</li>
330  <li>if the data source driver doesn't support the traversal type</li>
331  </ul>
332 
333  \note The envelope coordinates should be in the same coordinate system as the dataset.
334 
335  \note Thread-safe!
336  */
337  virtual std::auto_ptr<DataSet> getDataSet(const std::string& name,
338  const std::string& propertyName,
339  const te::gm::Envelope* e,
342  const te::common::AccessPolicy accessPolicy = te::common::RAccess);
343 
344  /*!
345  \brief It gets the dataset identified by the given name using a spatial filter over the given geometric property.
346  This method always returns a disconnected dataset, that is, a dataset that no more depends
347  of the data source that provided the connection for its creation. Therefore, the disconnected
348  dataset continues to live after the connection given by the data source has been released.
349 
350  \param name The dataset name.
351  \param propertyName The name of the spatial property used to apply the spatial filter.
352  \param g The geometry used as a spatial filter when retrieving the dataset.
353  \param r The spatial relation used during the filtering.
354  \param accessPolicy Access policy.
355  \param travType The traverse type associated to the returned dataset.
356 
357  \note The geometry coordinates should be in the same coordinate system as the dataset.
358 
359  \note Thread-safe!
360  */
361  virtual std::auto_ptr<DataSet> getDataSet(const std::string& name,
362  const std::string& propertyName,
363  const te::gm::Geometry* g,
366  const te::common::AccessPolicy accessPolicy = te::common::RAccess);
367 
368  /*!
369  \brief It gets the dataset identified by the given name using the identification of the objects.
370  This method always returns a disconnected dataset, that is, a dataset that no more depends
371  of the data source that provided the connection for its creation. Therefore, the disconnected
372  dataset continues to live after the connection given by the data source has been released.
373 
374  \param name The dataset name.
375  \param oids A pointer to the set of objects. Do not pass a null pointer nor an empty set.
376  \param accessPolicy Access policy.
377  \param travType The traverse type associated to the returned dataset.
378 
379  \exception Exception It can throw an exception if:
380  <ul>
381  <li>something goes wrong during data retrieval</li>
382  <li>if the data source driver doesn't support the traversal type</li>
383  </ul>
384 
385  \note Thread-safe!
386  */
387  std::auto_ptr<te::da::DataSet> getDataSet(const std::string& name,
388  const te::da::ObjectIdSet* oids,
390  const te::common::AccessPolicy accessPolicy = te::common::RAccess);
391 
392  /*!
393  \brief It executes a query that may return some data using a generic query.
394  This method always returns a disconnected dataset, that is, a dataset that no more depends
395  of the data source that provided the connection for its creation. Therefore, the disconnected
396  dataset continues to live after the connection given by the data source has been released.
397 
398  This method is different of the method that accepts a dataset name and
399  a spatial filter; this method allows the retrieving of only a
400  subset of the attributes, since a query can include a property list.
401 
402  \param q A valid query object.
403  \param travType The traverse type associated to the returned dataset.
404  \param accessPolicy Access policy.
405 
406  \exception Exception It can throw an exception if:
407  <ul>
408  <li>something goes wrong during data retrieval</li>
409  <li>if the data source driver doesn't support the traversal type</li>
410  </ul>
411 
412  \note Thread-safe!
413  */
414  virtual std::auto_ptr<DataSet> query(const Select& q,
416  const te::common::AccessPolicy accessPolicy = te::common::RAccess);
417 
418  /*!
419  \brief It executes a query that may return some data using the data source native language.
420  This method always returns a disconnected dataset, that is, a dataset that is no more dependent
421  of the data source that provided the connection for its creation. Therefore, the disconnected
422  dataset continues to live after the connection given by the data source has been released.
423 
424  \param query A query string in the data source native language.
425  \param travType The traverse type associated to the returned dataset.
426  \param accessPolicy Access policy.
427 
428  \exception Exception It can throw an exception if:
429  <ul>
430  <li>something goes wrong during data retrieval</li>
431  <li>if the data source driver doesn't support the traversal type</li>
432  </ul>
433 
434  \note Don't use this method, if you want portability for your application.
435  \note Thread-safe!
436  */
437  virtual std::auto_ptr<DataSet> query(const std::string& query,
439  const te::common::AccessPolicy accessPolicy = te::common::RAccess);
440  //@}
441 
442  /** @name Command Execution Methods
443  * Methods for executing commands against the data source.
444  */
445  //@{
446  /*!
447  \brief It executes the specified command using a generic query representation.
448 
449  \param command A query like: CREATE, DROP, ALTER, INSERT, UPDATE, DELETE.
450 
451  \exception Exception An exception can be thrown if the query cannot be performed.
452 
453  \note Thread-safe!
454  */
455  virtual void execute(const Query& command);
456 
457  /*!
458  \brief It executes the specified command in the data source native language.
459 
460  \param command A query string in the data source native language (like: CREATE, DROP, ALTER, INSERT, UPDATE, DELETE).
461 
462  \exception Exception An exception can be thrown if the query can not be performed.
463 
464  \note Thread-safe!
465  */
466  virtual void execute(const std::string& command);
467  //@}
468 
469  /** @name Auxiliary Methods for Commands and Queries
470  * Auxiliary methods for commands and queries.
471  */
472  //@{
473  /*!
474  \brief It escapes a string for using in commands and queries.
475 
476  \param value Any string.
477 
478  \return A valid escaped string.
479 
480  \note Thread-safe!
481  */
482  virtual std::string escape(const std::string& value);
483 
484  /*!
485  \brief It checks if the given dataset name is valid.
486 
487  \param datasetName A dataset name whose validity will be checked.
488 
489  \return True, if the name is valid according to the data source rules.
490 
491  \note Thread-safe!
492  */
493  virtual bool isDataSetNameValid(const std::string& datasetName);
494 
495  /*!
496  \brief It checks if the given property name is valid.
497 
498  \param propertyName A property name whose validity will be checked.
499 
500  \return True, if the name is valid according to the data source rules.
501 
502  \note Thread-safe!
503  */
504  virtual bool isPropertyNameValid(const std::string& propertyName);
505  //@}
506 
507  /** @name Dataset Metadata Retrieval
508  * Methods for retrieving metadata about the datasets of the data source.
509  */
510  //@{
511  /*!
512  \brief It gets the dataset names available in the data source.
513 
514  \return The dataset names available in the data source.
515 
516  \exception Exception An exception can be thrown, if the dataset names could not be retrieved.
517 
518  \note Each dataset in the data source must have a unique name. For example, in a DBMS the name
519  may contain the schema name before the table name separated by a dot notation (".").
520 
521  \note Thread-safe!
522  */
523  virtual std::vector<std::string> getDataSetNames();
524 
525  /*!
526  \brief It retrieves the number of data sets available in the data source.
527 
528  \exception Exception An exception can be thrown, if the number of datasets could not be retrieved.
529 
530  \return The number of data sets available in the data source.
531 
532  \note Thread-safe!
533  */
534  virtual std::size_t getNumberOfDataSets();
535 
536  /*!
537  \brief It gets information about the given dataset.
538 
539  This method can provide the following information about a dataset:
540  <ul>
541  <li>the list of properties, including: name, data type, size, if the value is required or not, if it is an autoincrement</li>
542  <li>primary key</li>
543  <li>foreign keys</li>
544  <li>unique keys</li>
545  <li>check constraints</li>
546  <li>indexes</li>
547  </ul>
548 
549  \param name The name of the dataset we are looking information for.
550 
551  \exception Exception An exception can be thrown, if the information about the dataset could not be retrieved.
552 
553  \return The dataset schema.
554 
555  \note Thread-safe!
556  */
557  virtual std::auto_ptr<te::da::DataSetType> getDataSetType(const std::string& name);
558 
559  /*!
560  \brief It gets capabilities about a data set.
561 
562  \param name Name of the dataset.
563 
564  \return The capabilities of the data set.
565  */
566  std::auto_ptr<te::da::DataSetTypeCapabilities> getCapabilities(const std::string& name);
567 
568  /*!
569  \brief It retrieves the properties of the dataset.
570 
571  \param datasetName The dataset name.
572 
573  \exception Exception An exception can be thrown, if the dataset properties could not be retrieved.
574 
575  \return The dataset properties.
576 
577  \note Thread-safe!
578  */
579  virtual boost::ptr_vector<te::dt::Property> getProperties(const std::string& datasetName);
580 
581  /*!
582  \brief It retrieves the property with the given name from the dataset.
583 
584  \param datasetName The dataset name.
585  \param propertyName The property name.
586 
587  \exception Exception An exception can be thrown, if the dataset property could not be retrieved.
588 
589  \return The property with the given name from the dataset.
590 
591  \note Thread-safe!
592  */
593  virtual std::auto_ptr<te::dt::Property> getProperty(const std::string& datasetName, const std::string& name);
594 
595  /*!
596  \brief It retrieves the property lying in the given position from the dataset.
597 
598  \param datasetName The dataset name.
599  \param propertyPos The property position.
600 
601  \exception Exception An exception can be thrown, if the property lying in the given position could not be retrieved.
602 
603  \return The property in the given position.
604 
605  \note Thread-safe!
606  */
607  virtual std::auto_ptr<te::dt::Property> getProperty(const std::string& datasetName, std::size_t propertyPos);
608 
609  /*!
610  \brief It gets the property names of the given dataset.
611 
612  \param datasetName The dataset name.
613 
614  \exception Exception An exception can be thrown, if the property names of the dataset could not be retrieved.
615 
616  \return The property names of the dataset.
617 
618  \note Each dataset in the data source must have a unique name. For example, in a DBMS the name
619  may contain the schema name before the table name separated by a dot notation (".").
620 
621  \note Thread-safe!
622  */
623  virtual std::vector<std::string> getPropertyNames(const std::string& datasetName);
624 
625  /*!
626  \brief It gets the number of properties of the given dataset.
627 
628  \param datasetName The dataset name.
629 
630  \exception Exception An exception can be thrown, if the number of dataset properties could not be retrieved.
631 
632  \return The number of dataset properties.
633 
634  \note Thread-safe!
635  */
636  virtual std::size_t getNumberOfProperties(const std::string& datasetName);
637 
638  /*!
639  \brief It checks if a property with the given name exists in the dataset.
640 
641  \param datasetName The dataset name.
642  \param name The property name.
643 
644  \exception Exception An exception can be thrown, if the existence of the dataset property could not be obtained.
645 
646  \return True, if the property exists in the dataset; otherwise, it returns false.
647 
648  \note Thread-safe!
649  */
650  virtual bool propertyExists(const std::string& datasetName, const std::string& name);
651 
652  /*!
653  \brief It adds a new property to the dataset schema.
654 
655  \param datasetName The dataset where the property will be added.
656  \param p The new property to be added.
657 
658  \exception Exception An exception can be thrown, if the property could not be added to the dataset schema.
659 
660  \note Don't delete the given property, because the schema will take the ownership of it.
661  \note Thread-safe!
662  */
663  virtual void addProperty(const std::string& datasetName, te::dt::Property* p);
664 
665  /*!
666  \brief It removes a property from the given dataset.
667 
668  \param datasetName The dataset from where the given property will be removed.
669  \param name The property to be removed from the dataset.
670 
671  \exception Exception An exception can be thrown, if the dataset property could not be removed.
672 
673  \note Thread-safe!
674  */
675  virtual void dropProperty(const std::string& datasetName, const std::string& name);
676 
677  /*!
678  \brief It renames a property of the given dataset.
679 
680  \param datasetName The dataset containing the property to be renamed.
681  \param propertyName The property to be renamed from the dataset.
682  \param newPropertyName The new property name.
683 
684  \exception Exception An exception can be thrown, if the dataset property could not be renamed.
685 
686  \note Thread-safe!
687  */
688  virtual void renameProperty(const std::string& datasetName,
689  const std::string& propertyName,
690  const std::string& newPropertyName);
691 
692  virtual void changePropertyDefinition(const std::string& datasetName, const std::string& propName, te::dt::Property* newProp);
693 
694  virtual void changePropertiesDefinitions(const std::string& datasetName, const std::vector<std::string>& propsNames, const std::vector<te::dt::Property*> newProps);
695 
696  /*!
697  \brief It retrieves the primary key of the dataset.
698 
699  \param datasetName The dataset name.
700 
701  \exception Exception An exception can be thrown, if the primary key could not be retrieved.
702 
703  \return If a primary key exists in the dataset, it is returned; otherwise, a NULL is returned.
704 
705  \note Thread-safe!
706  */
707  virtual std::auto_ptr<te::da::PrimaryKey> getPrimaryKey(const std::string& datasetName);
708 
709  /*!
710  \brief It checks if a primary key exists in the dataset.
711 
712  \param datasetName The dataset name.
713  \param name The primary key name.
714 
715  \exception Exception An exception can be thrown, if the existence of the primary key could not be determined.
716 
717  \return True, if a primary key exists in the dataset; otherwise, it returns false.
718 
719  \note Thread-safe!
720  */
721  virtual bool primaryKeyExists(const std::string& datasetName, const std::string& name);
722 
723  /*!
724  \brief It adds a primary key constraint to the dataset schema.
725 
726  \param datasetName The name of the dataset where the primary key will be added.
727  \param pk The primary key constraint.
728 
729  \exception Exception An exception can be thrown, if the primary key could not be added to the dataset schema.
730 
731  \note Don't delete the given primary key, because the schema will take the ownership of it.
732  \note Thread-safe!
733  */
734  virtual void addPrimaryKey(const std::string& datasetName, PrimaryKey* pk);
735 
736  /*!
737  \brief It removes the primary key constraint from the dataset schema.
738 
739  \param datasetName The dataset from where the primary key will be removed.
740 
741  \exception Exception An exception can be thrown, if the primary key could not be dropped from the dataset schema.
742 
743  \note Thread-safe!
744  */
745  virtual void dropPrimaryKey(const std::string& datasetName);
746 
747  /*!
748  \brief It retrieves the foreign key from the given dataset.
749 
750  \param datasetName The dataset name.
751  \param name The foreign key name.
752 
753  \exception Exception An exception can be thrown, if the foreign key could not be retrieved.
754 
755  \return If the foreign key exists in the dataset, it is returned; otherwise, a NULL is returned.
756 
757  \note Thread-safe!
758  */
759  virtual std::auto_ptr<ForeignKey> getForeignKey(const std::string& datasetName, const std::string& name);
760 
761  /*!
762  \brief It gets the foreign key names of the given dataset.
763 
764  \param datasetName The dataset name.
765 
766  \exception Exception An exception can be thrown, if the foreign key names could not be retrieved.
767 
768  \return The foreign key names of the dataset.
769 
770  \note Thread-safe!
771  */
772  virtual std::vector<std::string> getForeignKeyNames(const std::string& datasetName);
773 
774  /*!
775  \brief It checks if a foreign key with the given name exists in the data source.
776 
777  \param datasetName The dataset name.
778  \param name The foreign key name.
779 
780  \exception Exception An exception can be thrown, if the existence of the foreign key could not be obtained.
781 
782  \return True, if the foreign key exists in the dataset; otherwise, it returns false.
783  */
784  virtual bool foreignKeyExists(const std::string& datasetName, const std::string& name);
785 
786  /*!
787  \brief It adds a foreign key constraint to a dataset.
788 
789  \param datasetName The dataset where the foreign key constraint will be added.
790  \param fk The foreign key constraint.
791 
792  \exception Exception An exception can be thrown, if the foreign key could not be added to the dataset schema.
793 
794  \note Don't delete the given foreign key, because the schema will take the ownership of it.
795  \note Thread-safe!
796  */
797  virtual void addForeignKey(const std::string& datasetName, ForeignKey* fk);
798 
799  /*!
800  \brief It removes the foreign key constraint from the dataset schema.
801 
802  \param datasetName The dataset where the foreign key will be removed.
803  \param fkName The foreign key to be removed.
804 
805  \exception Exception An exception can be thrown, if the foreign key could not be removed from the dataset schema.
806 
807  \note Thread-safe!
808  */
809  virtual void dropForeignKey(const std::string& datasetName, const std::string& fkName);
810 
811  /*!
812  \brief It gets the unique key in the dataset with the given name.
813 
814  \param datasetName The dataset name.
815  \param name The unique key name.
816 
817  \exception Exception An exception can be thrown, if the unique key could not be retrieved.
818 
819  \return The unique key with the given name in the dataset.
820 
821  \note Thread-safe!
822  */
823  virtual std::auto_ptr<te::da::UniqueKey> getUniqueKey(const std::string& datasetName, const std::string& name);
824 
825  /*!
826  \brief It gets the unique key names of the given dataset.
827 
828  \param datasetName The dataset name.
829 
830  \exception Exception An exception can be thrown, if the unique key names could not be obtained.
831 
832  \return The unique key names of the dataset.
833 
834  \note Thread-safe!
835  */
836  virtual std::vector<std::string> getUniqueKeyNames(const std::string& datasetName);
837 
838  /*!
839  \brief It checks if a unique key with the given name exists in the dataset.
840 
841  \param datasetName The dataset name.
842  \param name The unique key name.
843 
844  \exception Exception An exception can be thrown, if the existence of the unique key could not be determined.
845 
846  \return True, if the unique key exists in the dataset; otherwise, it returns false.
847 
848  \note Thread-safe!
849  */
850  virtual bool uniqueKeyExists(const std::string& datasetName, const std::string& name);
851 
852  /*!
853  \brief It adds a unique key constraint to the dataset.
854 
855  \param datasetName The dataset where the unique key will be added.
856  \param uk The unique key constraint.
857 
858  \exception Exception An exception can be thrown, if the unique key could not be added to the dataset schema.
859 
860  \note Don't delete the given unique key, because the schema will take the ownership of it.
861  \note Thread-safe!
862  */
863  virtual void addUniqueKey(const std::string& datasetName, UniqueKey* uk);
864 
865  /*!
866  \brief It removes the unique key constraint from the dataset.
867 
868  \param datasetName The dataset from where the unique key will be removed.
869  \param name The unique key constraint name.
870 
871  \exception Exception An exception can be thrown, if the unique key could not be removed from the dataset schema.
872 
873  \note Thread-safe!
874  */
875  virtual void dropUniqueKey(const std::string& datasetName, const std::string& name);
876 
877  /*!
878  \brief It gets the check constraint of the dataset with the given name.
879 
880  \param datasetName The dataset name.
881  \param name The check constraint name.
882 
883  \exception Exception An exception can be thrown, if the check constraint could not be retrieved.
884 
885  \return The check constraint with the given name.
886 
887  \note Thread-safe!
888  */
889  virtual std::auto_ptr<te::da::CheckConstraint> getCheckConstraint(const std::string& datasetName, const std::string& name);
890 
891  /*!
892  \brief It gets the check constraint names of the given dataset.
893 
894  \param datasetName The dataset name.
895 
896  \exception Exception An exception can be thrown, if the check constraint names could not be retrieved.
897 
898  \return The check constraint names of the dataset.
899 
900  \note Thread-safe!
901  */
902  virtual std::vector<std::string> getCheckConstraintNames(const std::string& datasetName);
903 
904  /*!
905  \brief It checks if a check-constraint with the given name exists in the data source.
906 
907  \param datasetName The dataset name.
908  \param name The check-constraint name.
909 
910  \exception Exception An exception can be thrown, if the existence of the check constraint could not be determined.
911 
912  \return True, if the check-constraint exists in the dataset; otherwise, it returns false.
913 
914  \note Thread-safe!
915  */
916  virtual bool checkConstraintExists(const std::string& datasetName, const std::string& name);
917 
918  /*!
919  \brief It adds a check constraint to the dataset.
920 
921  \param datasetName The dataset where the constraint will be added.
922  \param cc The check constraint to be added.
923 
924  \exception Exception An exception can be thrown, if the check constraint could not be added to the dataset schema.
925 
926  \note Don't delete the given check constraint, because the schema will take the ownership of it.
927  \note Thread-safe!
928  */
929  virtual void addCheckConstraint(const std::string& datasetName, CheckConstraint* cc);
930 
931  /*!
932  \brief It removes the check constraint from the dataset.
933 
934  \param datasetName The dataset from where the check constraint will be removed.
935  \param name The check constraint to be removed.
936 
937  \exception Exception An exception can be thrown, if the check constraint could not be removed from the dataset schema.
938 
939  \note Thread-safe!
940  */
941  virtual void dropCheckConstraint(const std::string& datasetName, const std::string& name);
942 
943  /*!
944  \brief It gets the index with the given name from the dataset.
945 
946  \param datasetName The dataset name.
947  \param name The index name.
948 
949  \exception Exception An exception can be thrown, if the index could not be retrieved.
950 
951  \return The index from the given dataset.
952 
953  \note Thread-safe!
954  */
955  virtual std::auto_ptr<te::da::Index> getIndex(const std::string& datasetName, const std::string& name);
956 
957  /*!
958  \brief It gets the index names of the given dataset.
959 
960  \param datasetName The dataset name.
961 
962  \exception Exception An exception can be thrown, if the index names could not be retrieved.
963 
964  \return The index names of the given dataset.
965 
966  \note Thread-safe!
967  */
968  virtual std::vector<std::string> getIndexNames(const std::string& datasetName);
969 
970  /*!
971  \brief It checks if an index with the given name exists in the dataset.
972 
973  \param datasetName The dataset name.
974  \param name The index name.
975 
976  \exception Exception An exception can be thrown, if the index existence could not be determined.
977 
978  \return True, if the index exists in the dataset; otherwise, it returns false.
979 
980  \note Thread-safe!
981  */
982  virtual bool indexExists(const std::string& datasetName, const std::string& name);
983 
984  /*!
985  \brief It adds an index to the dataset.
986 
987  \param datasetName The dataset where the index will be added.
988  \param idx The index to be added.
989  \param options A list of optional modifiers (driver specific).
990 
991  \exception Exception An exception can be thrown, if the index could not be added to the dataset schema.
992 
993  \note Don't delete the given index, because the schema will take the ownership of it.
994  \note Thread-safe!
995  */
996  virtual void addIndex(const std::string& datasetName, Index* idx,
997  const std::map<std::string, std::string>& options);
998 
999  /*!
1000  \brief It removes the index from the given dataset.
1001 
1002  \param datasetName The dataset where the index will be removed.
1003  \param idxName The index to be removed.
1004 
1005  \exception Exception An exception can be thrown, if the index could not be removed from the dataset schema.
1006 
1007  \note Thread-safe!
1008  */
1009  virtual void dropIndex(const std::string& datasetName, const std::string& idxName);
1010 
1011  /*!
1012  \brief It gets the sequence with the given name in the data source.
1013 
1014  \param name The sequence name.
1015 
1016  \exception Exception An exception can be thrown, if the sequence could not be retrieved from the data source.
1017 
1018  \return The sequence with the given name.
1019 
1020  \note Thread-safe!
1021  */
1022  virtual std::auto_ptr<Sequence> getSequence(const std::string& name);
1023 
1024  /*!
1025  \brief It gets the sequence names available in the data source.
1026 
1027  \note Each sequence in the data source must have a unique name. For example, in a DBMS the name
1028  may contain the schema name before the sequence name separated by a dot notation (".").
1029 
1030  \exception Exception An exception can be thrown, if the sequence names could not be retrieved.
1031 
1032  \return The sequence names of the data source.
1033 
1034  \note Thread-safe!
1035  */
1036  virtual std::vector<std::string> getSequenceNames();
1037 
1038  /*!
1039  \brief It checks if a sequence with the given name exists in the data source.
1040 
1041  \param name The sequence name.
1042 
1043  \exception Exception An exception can be thrown, if the index existence could not be determined.
1044 
1045  \return True, if the sequence exists in the data source; otherwise, it returns false.
1046 
1047  \note Thread-safe!
1048  */
1049  virtual bool sequenceExists(const std::string& name);
1050 
1051  /*!
1052  \brief It adds a new sequence in the data source.
1053 
1054  \exception Exception An exception can be thrown, if the sequence could not be added to the data source.
1055 
1056  \note Don't delete the given sequence, because the data source will take the ownership of it.
1057  \note Thread-safe!
1058  */
1059  virtual void addSequence(Sequence* sequence);
1060 
1061  /*!
1062  \brief It removes the sequence from the data source.
1063 
1064  \param name The sequence that will be removed.
1065 
1066  \exception Exception An exception can be thrown, if the sequence could not be removed from the data source.
1067 
1068  \note Thread-safe!
1069  */
1070  virtual void dropSequence(const std::string& name);
1071 
1072  /*!
1073  \brief It retrieves the bounding rectangle of the spatial property for the given dataset.
1074 
1075  \param datasetName The dataset name.
1076  \param propertyName The spatial property name.
1077 
1078  \exception Exception An exception can be thrown, if the extent of the geometry property could not be retrieved.
1079 
1080  \return The spatial property bounding rectangle, or NULL, if none can be retrieved.
1081 
1082  \note Thread-safe!
1083  */
1084  virtual std::auto_ptr<te::gm::Envelope> getExtent(const std::string& datasetName,
1085  const std::string& propertyName);
1086 
1087  /*!
1088  \brief It retrieves the bounding rectangle for the spatial property lying in the given position in the dataset.
1089 
1090  \param datasetName The dataset name.
1091  \param propertyPos The spatial property position.
1092 
1093  \exception Exception An exception can be thrown, if the extent of the geometry property lying in the given position could not be retrieved.
1094 
1095  \return The spatial property bounding rectangle, or NULL, if none can be retrieved.
1096 
1097  \note Thread-safe!
1098  */
1099  virtual std::auto_ptr<te::gm::Envelope> getExtent(const std::string& datasetName, std::size_t propertyPos);
1100 
1101  /*!
1102  \brief It retrieves the number of items of the given dataset.
1103 
1104  \param datasetName The dataset name.
1105 
1106  \exception Exception An exception can be thrown, if the number of items of the dataset could not be retrieved.
1107 
1108  \return The number of items of the given dataset.
1109 
1110  \note Thread-safe!
1111  */
1112  virtual std::size_t getNumberOfItems(const std::string& datasetName);
1113 
1114  /*!
1115  \brief It checks if the data source has any dataset.
1116 
1117  \exception Exception An exception can be thrown, if it is not possible to check if the data source has datasets .
1118 
1119  \return True, if the data source has datasets; otherwise, it returns false.
1120 
1121  \note Thread-safe!
1122  */
1123  virtual bool hasDataSets();
1124 
1125  /*!
1126  \brief It checks if a dataset with the given name exists in the data source.
1127 
1128  \param name The dataset name.
1129 
1130  \exception Exception An exception can be thrown, if the existence of a dataset in the data source could not be determined.
1131 
1132  \return True, if the dataset exists in the data source; otherwise, it returns false.
1133 
1134  \note Thread-safe!
1135  */
1136  virtual bool dataSetExists(const std::string& name);
1137  //@}
1138 
1139  /** @name Dataset Schema Persistence Methods
1140  * Methods for dealing with datasource and dataset schema changes.
1141  */
1142  //@{
1143 
1144  /*!
1145  \brief It creates the dataset schema definition in the target data source.
1146 
1147  If a dataset schema with the same name already exists in the target data source,
1148  this may throw an exception.
1149 
1150  After calling this method, the dataset schema may be updated.
1151 
1152  \param dt The dataset schema to be created. It may be changed during the operation.
1153  \param options A list of optional modifiers (driver specific).
1154 
1155  \pre The schema of a related dataset in a foreign key must be already in the data source.
1156 
1157  \post In some data sources, this method may output implicit indexes, sequences or constraints.
1158  The method, if necessary, will create and adjust the dataset schema.
1159 
1160  \post The caller of this method will take the ownership of the given schema.
1161 
1162  \note If you want to create a new schema based on an already existing one,
1163  you must create a fresh copy of the DataSetType with the clone() method.
1164 
1165  \note Thread-safe!
1166  */
1167  virtual void createDataSet(DataSetType* dt, const std::map<std::string, std::string>& options);
1168 
1169  /*!
1170  \brief It clones the dataset in the data source.
1171 
1172  \param name The dataset to be cloned.
1173  \param cloneName The name of the cloned dataset.
1174  \param options A list of optional modifiers. It is driver specific.
1175 
1176  \exception Exception An exception can be thrown, if the dataset schema could not be cloned.
1177 
1178  \note Thread-safe!
1179  */
1180  virtual void cloneDataSet(const std::string& name,
1181  const std::string& cloneName,
1182  const std::map<std::string, std::string>& options);
1183 
1184  /*!
1185  \brief It removes the dataset schema from the data source.
1186 
1187  \param name The dataset name whose schema will be removed from the data source.
1188 
1189  \exception Exception An exception can be thrown, if the dataset could not be removed from the data source.
1190 
1191  \note Thread-safe!
1192  */
1193  virtual void dropDataSet(const std::string& name);
1194 
1195  /*!
1196  \brief It renames a dataset.
1197 
1198  \param name The name of the dataset to be renamed.
1199  \param newName The new dataset name.
1200 
1201  \exception Exception An exception can be thrown, if the dataset could not be renamed.
1202 
1203  \note Thread-safe!
1204  */
1205  virtual void renameDataSet(const std::string& name, const std::string& newName);
1206  //@}
1207 
1208  /** @name Dataset Persistence Methods
1209  * Methods for dealing with the persistence of data in a data source.
1210  */
1211  //@{
1212 
1213  /*!
1214  \brief It adds data items to the dataset in the data source.
1215 
1216  \param datasetName The target dataset name.
1217  \param d The data items to be added to the dataset.
1218  \param options A list of optional modifiers (driver specific).
1219  \param limit The number of items to be used from the input dataset. If set to 0 (default), all items are used.
1220 
1221  \exception Exception An exception can be thrown, if the input dataset items could not be added to the given dataset.
1222 
1223  \note The dataset reading will start in the current position.
1224  So, keep in mind that it is the caller responsability
1225  to inform the right position(and a valid one) in the dataset 'd', to start the inserting process.
1226 
1227  \note Thread-safe!
1228  */
1229  virtual void add(const std::string& datasetName,
1230  DataSet* d,
1231  const std::map<std::string, std::string>& options,
1232  std::size_t limit = 0);
1233 
1234  /*!
1235  \brief It removes all the informed items from the dataset.
1236 
1237  It removes all the data items from a dataset which are identified by
1238  a set of object identifiers. If this set is not informed, all items will be removed.
1239 
1240  \param datasetName The dataset name.
1241  \param oids A set of object identifiers used used to remove data from the dataset, or NULL, for removing all.
1242 
1243  \exception Exception An exception can be thrown, if the data items could not be removed.
1244 
1245  \note Thread-safe!
1246  */
1247  virtual void remove(const std::string& datasetName, const te::da::ObjectIdSet* oids = 0);
1248 
1249  /*!
1250  \brief It updates the contents of a dataset for the set of data items.
1251 
1252  \param datasetName The target dataset name.
1253  \param dataset The list of data items to be updated.
1254  \param properties The list of properties of the dataset to be updated.
1255  \param oids The list of objects to be updated.
1256  \param options A list of optional modifiers. It is driver specific.
1257  \param limit The number of items to be used from the input dataset. If set to 0 (default) all items are used.
1258 
1259  \exception Exception An exception can be thrown, if the dataset could not be updated.
1260 
1261  \note The dataset reading will start in the
1262  current position. So, keep in mind that it is the caller responsability
1263  to inform the right position(and a valid one) for the dataset 'd', to start the updating process.
1264 
1265  \note Thread-safe!
1266  */
1267  virtual void update(const std::string& datasetName,
1268  DataSet* dataset,
1269  const std::vector<std::size_t>& properties,
1270  const te::da::ObjectIdSet* oids,
1271  const std::map<std::string, std::string>& options,
1272  std::size_t limit = 0);
1273 
1274  /*!
1275  \brief It updates the contents of a dataset.
1276 
1277  All rows are edited. The third parameter tells wich columns are edited for each row.
1278 
1279  \param datasetName Name pf the dataset.
1280  \param dataset Dataset with editions.
1281  \param properties Columns edited for each row. Note that the size of \a properties must be the same of the \a dataset.
1282  \param ids List of positions of the columns that identifies rows.
1283 
1284  \exception te::da::Exception An exception can be thrown, if the dataset could not be updated.
1285  */
1286  virtual void update(const std::string& datasetName,
1287  DataSet* dataset,
1288  const std::vector< std::set<int> >& properties,
1289  const std::vector<size_t>& ids);
1290 
1291  /*!
1292  \brief It return the DataSource current encoding.
1293 
1294  \return The DataSource current encoding.
1295  */
1296  virtual te::core::EncodingType getEncoding();
1297 
1298  /*!
1299  \brief It sets the encodings for the data source.
1300 
1301  \param et The char encoding type.
1302 
1303  \note This function only takes effect if datasource support this option.
1304 
1305  */
1306  virtual void setEncoding(const te::core::EncodingType& et);
1307 
1308  //@}
1309 
1310  /** @name Data Source static methods
1311  * Data Source static methods
1312  */
1313  //@{
1314 
1315  /*!
1316  \brief It creates a new repository for a data source.
1317 
1318  \param dsType The type of data source to be created (example: POSTGIS, ORACLE, SQLITE).
1319  \param connInfo The information for creating a new data source.
1320 
1321  \exception Exception An exception can be thrown, if the data source could not be created.
1322 
1323  \return A data source for the new data repository.
1324 
1325  \note Thread-safe!
1326  */
1327  static std::unique_ptr<DataSource> create(const std::string& dsType, const std::string& connInfo);
1328 
1329  /* static std::unique_ptr<DataSource> create(const std::string& dsType, const std::string& uri);*/
1330 
1331  /*!
1332  \brief It removes a data source identified by its connection information and the driver type.
1333 
1334  \param dsType The data source type name (example: POSTGIS, ORACLE, SQLITE).
1335  \param dsInfo The connection information for removing the data source.
1336 
1337  \exception Exception An exception can be thrown, if the data source could not be removed.
1338 
1339  \note No other instance of the data source to be removed can be opened, when calling this method.
1340 
1341  \note Thread-safe!
1342  */
1343  static void drop(const std::string& dsType, const std::string& connInfo);
1344 
1345  /*!
1346  \brief It checks if the data source exists with the connection information and the driver type.
1347 
1348  \param dsType The data source type name (example: POSTGIS, ORACLE, SQLITE).
1349  \param dsInfo The data source information.
1350 
1351  \exception Exception An exception can be thrown, if the data source exists in the driver.
1352 
1353  \return True, if the data source exists; otherwise, it returns false.
1354 
1355  \note Thread-safe!
1356  */
1357  static bool exists(const std::string& dsType, const std::string& connInfo);
1358 
1359  /*!
1360  \brief It returns the data source names available in the driver.
1361 
1362  \param dsType The type name of the data source(example: PostGIS, Oracle, WFS).
1363  \param dsInfo The information about the data sources.
1364 
1365  \exception Exception An exception can be thrown, if the data source names could not be retrieved.
1366 
1367  \return The data source names available.
1368 
1369  \exception Exception An exception can be thrown, if the list of data source names could not be retrieved.
1370  */
1371  static std::vector<std::string> getDataSourceNames(const std::string& dsType, const std::string& connInfo);
1372 
1373  //@}
1374 
1375  protected:
1376 
1377  /** @name Protected Data Source Methods????
1378  * The protected methods of the data source
1379  */
1380  //@{
1381 
1382  /*!
1383  \brief It creates a new data source.
1384 
1385  \param connInfo The information for creating a new data source.
1386 
1387  \exception Exception An exception can be thrown, if the data source could not be created.
1388 
1389  \note Not thread-safe!
1390  */
1391  virtual void create(const std::string& connInfo) = 0;
1392 
1393  /*!
1394  \brief It removes the data source with the connection information from a driver.
1395 
1396  \param connInfo The information for removing a data source from a driver.
1397 
1398  \exception Exception An exception can be thrown, if the data source could not be removed.
1399 
1400  \note Not thread-safe!
1401  */
1402  virtual void drop(const std::string& connInfo) = 0;
1403 
1404  /*!
1405  \brief Check the existence of a data source in a driver.
1406 
1407  \param connInfo The data source information.
1408 
1409  \exception Exception An exception can be thrown, if the existence of a data source in a driver could not be determined.
1410 
1411  \return True, if the data source exists, or false, otherwise.
1412 
1413  \note Thread-safe!
1414  */
1415  virtual bool exists(const std::string& connInfo) = 0;
1416 
1417  /*!
1418  \brief It gets the data source names available in a driver.
1419 
1420  \param dsInfo The data source information.
1421 
1422  \exception Exception An exception can be thrown, if the data source names could not be retrieved.
1423 
1424  \return The data source names available in the driver.
1425 
1426  \note Not thread-safe!
1427  */
1428  virtual std::vector<std::string> getDataSourceNames(const std::string& connInfo) = 0;
1429 
1430  //@}
1431 
1432  protected:
1433 
1434  std::string m_id; //!< The data source identification.
1435  te::core::URI m_uri; //!< The URI used to describe the datasource connection;
1436  };
1437 
1438  typedef boost::shared_ptr<DataSource> DataSourcePtr;
1439 
1440  } // end namespace da
1441 } // end namespace te
1442 
1443 #endif // __TERRALIB_DATAACCESS_DATASOURCE_INTERNAL_DATASOURCE_H
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1438
A class that models the description of a dataset.
Definition: DataSetType.h:72
It represents the SQL query dialect accepted by a given data source.
Definition: SQLDialect.h:55
SpatialRelation
Spatial relations between geometric objects.
Definition: Enums.h:127
It describes a sequence (a number generator).
Definition: Sequence.h:56
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
A class that describes a check constraint.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
Definition: DataSource.h:119
It models a property definition.
Definition: Property.h:59
EncodingType
Supported character encodings.
Definition: CharEncoding.h:50
AccessPolicy
Supported data access policies (can be used as bitfield).
Definition: Enums.h:40
TraverseType
A dataset can be traversed in two ways:
Definition: Enums.h:53
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
This class represents a set of unique ids created in the same context. i.e. from the same data set...
Definition: ObjectIdSet.h:55
URI C++ Library.
It models a foreign key constraint for a DataSetType.
Definition: ForeignKey.h:50
It describes a unique key (uk) constraint.
Definition: UniqueKey.h:53
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:74
A Select models a query to be used when retrieving data from a DataSource.
Definition: Select.h:65
std::string m_id
The data source identification.
Definition: DataSource.h:1434
A class for representing an Uniform Resource Identifier (URI).
Definition: URI.h:49
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
It describes a primary key (pk) constraint.
Definition: PrimaryKey.h:52
te::core::URI m_uri
The URI used to describe the datasource connection;.
Definition: DataSource.h:1435
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97
A Query is independent from the data source language/dialect.
Definition: Query.h:46
It describes an index associated to a DataSetType.
Definition: Index.h:54