Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: OpenGIS Simple Features Reference Implementation 4 : * Purpose: Run SQL requests with SQLite SQL engine 5 : * Author: Frank Warmerdam, warmerdam@pobox.com 6 : * 7 : ****************************************************************************** 8 : * Copyright (c) 2004, Frank Warmerdam <warmerdam@pobox.com> 9 : * Copyright (c) 2012, Even Rouault <even dot rouault at spatialys.com> 10 : * 11 : * SPDX-License-Identifier: MIT 12 : ****************************************************************************/ 13 : 14 : #ifndef OGR_SQLITE_EXECUTE_SQL_H_INCLUDED 15 : #define OGR_SQLITE_EXECUTE_SQL_H_INCLUDED 16 : 17 : #include "ogrsf_frmts.h" 18 : #include <set> 19 : 20 : OGRLayer *OGRSQLiteExecuteSQL(GDALDataset *poDS, const char *pszStatement, 21 : OGRGeometry *poSpatialFilter, 22 : const char *pszDialect); 23 : 24 : /************************************************************************/ 25 : /* LayerDesc */ 26 : /************************************************************************/ 27 : 28 : class LayerDesc 29 : { 30 : public: 31 30 : bool operator<(const LayerDesc &other) const 32 : { 33 30 : return osOriginalStr < other.osOriginalStr; 34 : } 35 : 36 : CPLString osOriginalStr{}; 37 : CPLString osSubstitutedName{}; 38 : CPLString osDSName{}; 39 : CPLString osLayerName{}; 40 : }; 41 : 42 : std::set<LayerDesc> OGRSQLiteGetReferencedLayers(const char *pszStatement); 43 : 44 : #endif /* ndef OGR_SQLITE_EXECUTE_SQL_H_INCLUDED */