publishedPublicStudies static method
Implementation
static Future<ExtractionResult<Study>> publishedPublicStudies() async {
ExtractionResult<Study> result;
try {
final response = await env.client
.from(tableName)
.select()
.eq('participation', 'open')
.neq('status', StudyStatus.closed.name);
final extracted = SupabaseQuery.extractSupabaseList<Study>(
List<Map<String, dynamic>>.from(response),
);
result = ExtractionSuccess<Study>(extracted);
} on ExtractionFailedException<Study> catch (error) {
result = error;
} catch (error, stacktrace) {
SupabaseQuery.catchSupabaseException(error, stacktrace);
rethrow;
}
return result;
}