Skip to content

Commit 345458e

Browse files
committed
[spatialite] Implement rewind()
1 parent ef838c7 commit 345458e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/providers/spatialite/qgsspatialitefeatureiterator.cpp

+12-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,18 @@ bool QgsSpatiaLiteFeatureIterator::nextFeature( QgsFeature& feature )
109109

110110
bool QgsSpatiaLiteFeatureIterator::rewind()
111111
{
112-
// TODO: implement. use sqlite3_reset
113-
return false;
112+
if ( mClosed )
113+
return false;
114+
115+
if ( sqlite3_reset( sqliteStatement ) == SQLITE_OK )
116+
{
117+
return true;
118+
}
119+
else
120+
{
121+
return false;
122+
}
123+
}
114124
}
115125

116126
bool QgsSpatiaLiteFeatureIterator::close()

0 commit comments

Comments
 (0)