collectionGroup method
- String name
Gets a query over all collections with the given name (collection group query).
Parameters:
name: The collection name.
Returns: A Query for the collection group.
Example:
var groupQuery = db.collectionGroup('posts');
Implementation
Query<Map<String, dynamic>> collectionGroup(String name) {
assert(name.isNotEmpty, 'a collection path must be a non-empty string');
assert(
!name.contains('/'),
'a collection path passed to collectionGroup() cannot contain "/"',
);
Query<Map<String, dynamic>> newQuery = Query<Map<String, dynamic>>(
helper: QueryHelper(),
oracledb: this,
path: name,
);
newQuery._col_group = name;
return newQuery;
}