Showing with 7 additions and 1 deletion.
  1. +6 −0 python/core/qgsfeature.sip
  2. +1 −1 src/providers/mssql/qgsmssqlprovider.cpp
6 changes: 6 additions & 0 deletions python/core/qgsfeature.sip
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ class QgsFeature

public:

SIP_PYOBJECT __iter__();
%MethodCode
PyObject *attrs = sipConvertFromType( &sipCpp->attributes(), sipType_QgsAttributes, Py_None );
sipRes = PyObject_GetIter(attrs);
%End

SIP_PYOBJECT __getitem__(int key);
%MethodCode
const QgsAttributes& attrs = sipCpp->attributes();
Expand Down
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ bool QgsMssqlProvider::setSubsetString( QString theSQL, bool )
QString sql = QString( "select count(*) from " );

if ( !mSchemaName.isEmpty() )
mStatement += "[" + mSchemaName + "].";
sql += "[" + mSchemaName + "].";

sql += "[" + mTableName + "]";

Expand Down