populate method

KoolbaseQuery populate(
  1. List<String> fields
)

Populate related records from another collection.

Pass one or more strings in the format "field_name:collection_name".

Example:

await Koolbase.db
  .collection('posts')
  .populate(['author_id:users'])
  .get();

Implementation

KoolbaseQuery populate(List<String> fields) {
  _populate.addAll(fields);
  return this;
}