QR Code :: Mobile Bookmark

What is this? This is a QR Code: a machine-readable image-based code consisting of black and white squares. QR Codes are typically used for storing URLs and other information for reading by a smart devices like smart phones.
When scanned by an appropriate app on your mobile device, you are redirected to the embedded URL of this page. View this page with one device (desktop or another mobile device), and then scan the
QR Code with your mobile device. This makes it quicker and easier to browse a page discovered on one device on your mobile device without manually entering the URL in the mobile device browser address bar.

⚬ If you are using an Android phone, you can find a QR Code reading app at Google Play on your device.

⚬ If you are using an iOS device (iPhone, iPad, etc.), you can find a QR Code reading app at the Apple iTunes App Store on your device.

⚬ If you are using a Windows phone, you can find a QR Code reading app at the Microsoft Store on your device.

Description

Parameters

Fields to group by. If an array or non-code object is passed, it will be
the key used to group results.

1.0.4+: If keys is an instance of
MongoCode, keys will be treated as
a function that returns the key to group by (see the "Passing a
keys function" example below).

initial

Initial value of the aggregation counter object.

reduce

A function that takes two arguments (the current document and the
aggregation to this point) and does the aggregation.

options

Optional parameters to the group command. Valid options include:

"condition"

Criteria for including a document in the aggregation.

"finalize"

Function called once per unique key that takes the final output of the
reduce function.

"maxTimeMS"

Specifies a cumulative time limit in milliseconds for processing the operation on the server (does not include idle time). If the operation is not completed by the server within the timeout period, a MongoExecutionTimeoutException will be thrown.

Return Values

Returns an array containing the result.

Changelog

Version

Description

1.5.0

Added "maxTimeMS" option.

1.2.11

Emits E_DEPRECATED when
options is scalar.

Examples

Example #1 MongoCollection::group() example

This groups documents by category and creates a list of names within that
category.

If you want to group by something other than a field name, you can pass
a function as the first parameter of
MongoCollection::group() and it will be run against each
document. The return value of the function will be used as its grouping
value.