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