OGRErr OGRMySQLTableLayer::Initialize(const char * pszTableName) { poFeatureDefn = ReadTableDefinition( pszTableName ); if (poFeatureDefn) { ResetReading(); return OGRERR_NONE; } else { return OGRERR_FAILURE; } }
OGROCISelectLayer::OGROCISelectLayer( OGROCIDataSource *poDSIn, const char * pszQuery, OGROCIStatement *poDescribedCommand ) { poDS = poDSIn; iNextShapeId = 0; poFeatureDefn = ReadTableDefinition( poDescribedCommand ); SetDescription( poFeatureDefn->GetName() ); pszQueryStatement = CPLStrdup(pszQuery); ResetReading(); }