PcoServicesPlanQuery constructor
PcoServicesPlanQuery({
- bool includeContributors = false,
- bool includeMySchedules = false,
- bool includePlanTimes = false,
- bool includeSeries = false,
- bool includeAllRelated = false,
- String? whereCreatedAt,
- String? whereId,
- String? whereSeriesTitle,
- String? whereTitle,
- String? whereUpdatedAt,
- PcoServicesPlanFilter? filterBy,
- PcoServicesPlanOrder? orderBy,
- bool reverse = false,
- int perPage = 25,
- int pageOffset = 0,
- Map<
String, String> extraParams = const {}, - List<
PlanningCenterApiWhere> ? where, - Iterable<
String> filter = const <String>[], - String? order,
- Iterable<
String> include = const <String>[],
Implementation
PcoServicesPlanQuery({
/// include associated contributors
/// when true, adds `?include=contributors` to url
bool includeContributors = false,
/// include associated my_schedules
/// when true, adds `?include=my_schedules` to url
bool includeMySchedules = false,
/// include associated plan_times
/// when true, adds `?include=plan_times` to url
bool includePlanTimes = false,
/// include associated series
/// when true, adds `?include=series` to url
bool includeSeries = false,
/// when true, adds `?include=contributors,my_schedules,plan_times,series` to url parameters
bool includeAllRelated = false,
/// Query by `created_at`
/// query on a specific created_at, url example: ?where[created_at]=2000-01-01T12:00:00Z
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereCreatedAt,
/// Query by `id`
/// query on a specific id, url example: ?where[id]=primary_key
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereId,
/// Query by `series_title`
/// query on a specific series_title, url example: ?where[series_title]=string
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereSeriesTitle,
/// Query by `title`
/// query on a specific title, url example: ?where[title]=string
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereTitle,
/// Query by `updated_at`
/// query on a specific updated_at, url example: ?where[updated_at]=2000-01-01T12:00:00Z
/// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
String? whereUpdatedAt,
PcoServicesPlanFilter? filterBy,
PcoServicesPlanOrder? orderBy,
/// reverse the ordering
bool reverse = false,
// direct access to super class params
super.perPage,
super.pageOffset,
super.extraParams,
super.where,
super.filter,
super.order,
super.include,
}) : super() {
if (filterBy != null) filter.add(filterString(filterBy));
if (includeAllRelated || includeContributors) include.add('contributors');
if (includeAllRelated || includeMySchedules) include.add('my_schedules');
if (includeAllRelated || includePlanTimes) include.add('plan_times');
if (includeAllRelated || includeSeries) include.add('series');
if (whereCreatedAt != null)
where.add(PlanningCenterApiWhere.parse('created_at', whereCreatedAt));
if (whereId != null) where.add(PlanningCenterApiWhere.parse('id', whereId));
if (whereSeriesTitle != null)
where.add(PlanningCenterApiWhere.parse('series_title', whereSeriesTitle));
if (whereTitle != null)
where.add(PlanningCenterApiWhere.parse('title', whereTitle));
if (whereUpdatedAt != null)
where.add(PlanningCenterApiWhere.parse('updated_at', whereUpdatedAt));
if (orderBy != null) order = orderString(orderBy, reverse: reverse);
}