OGRGFTResultLayer::OGRGFTResultLayer(OGRGFTDataSource* poDS, const char* pszSQL) : OGRGFTLayer(poDS) { osSQL = PatchSQL(pszSQL); bGotAllRows = FALSE; poFeatureDefn = new OGRFeatureDefn( "result" ); poFeatureDefn->Reference(); poFeatureDefn->SetGeomType( wkbUnknown ); }
OGRGFTResultLayer::OGRGFTResultLayer(OGRGFTDataSource* poDSIn, const char* pszSQL) : OGRGFTLayer(poDSIn) { osSQL = PatchSQL(pszSQL); bGotAllRows = FALSE; poFeatureDefn = new OGRFeatureDefn( "result" ); poFeatureDefn->Reference(); poFeatureDefn->SetGeomType( wkbUnknown ); poFeatureDefn->GetGeomFieldDefn(0)->SetSpatialRef(poSRS); SetDescription( poFeatureDefn->GetName() ); }
OGRGFTResultLayer::OGRGFTResultLayer( OGRGFTDataSource* poDSIn, const char* pszSQL ) : OGRGFTLayer(poDSIn), osSQL( CPLString() ), bGotAllRows(FALSE) { // cppcheck-suppress useInitializationList osSQL = PatchSQL(pszSQL); poFeatureDefn = new OGRFeatureDefn( "result" ); poFeatureDefn->Reference(); poFeatureDefn->SetGeomType( wkbUnknown ); poFeatureDefn->GetGeomFieldDefn(0)->SetSpatialRef(poSRS); SetDescription( poFeatureDefn->GetName() ); }
OGRErr OGRGFTTableLayer::SetAttributeFilter( const char *pszQuery ) { GetLayerDefn(); if( pszQuery == NULL ) osQuery = ""; else { osQuery = PatchSQL(pszQuery); } BuildWhere(); ResetReading(); return OGRERR_NONE; }