You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_ =>thrownewNotSupportedException($"The entity type {typeof(T).Name} is not supported for pending items retrieval."),
214
214
};
215
-
returnawaitdb.QueryAsync<T>($"SELECT * FROM {tableName} WHERE ApprovedBy IS NULL AND RejectedBy IS NULL ORDER BY DateInserted DESC");
215
+
216
+
conststringpendingFilter="src.[ApprovedBy] IS NULL AND src.[RejectedBy] IS NULL";
217
+
218
+
varsql=featureId.HasValue
219
+
?typeof(T).Nameswitch
220
+
{
221
+
nameof(FeatureOpEntity)=>$"SELECT {columns} FROM {tableName} INNER JOIN dbo.Features f ON src.[FeatureName] = f.[Name] WHERE {pendingFilter} AND f.[Id] = {featureId}",
222
+
nameof(FeatureEditEntity)=>$"SELECT {columns} FROM {tableName} WHERE {pendingFilter} AND src.[FeatureId] = {featureId}",
223
+
_ =>thrownewNotSupportedException($"The entity type {typeof(T).Name} is not supported for pending items retrieval."),
224
+
}
225
+
:$"SELECT {columns} FROM {tableName} WHERE {pendingFilter}";
226
+
227
+
sql+=" ORDER BY src.[DateInserted] DESC";
228
+
returnawaitdb.QueryAsync<T>(sql);
216
229
}
217
230
}
218
231
@@ -257,7 +270,7 @@ public async Task<FeatureGraph> ResolveFeature(RepositoryId repositoryId, string
0 commit comments