Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化multiAggregate操作,可以聚合多个参数 #37

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

优化multiAggregate操作,可以聚合多个参数 #37

wants to merge 6 commits into from

Conversation

noprom
Copy link

@noprom noprom commented May 15, 2017

优化multiAggregate操作,对于一个聚合操作,支持传入多个字段

例子:

$tableName = 'table_name';
Db::connect(config('mongo'))->name($tableName)
->multiAggregate(['sum' => ['field_sum', 'field_sum_2'], 'max' => ['study_date_year', 'study_date_year2'], 'min' => ['study_date_year', 'study_date_year2']],
['tea_strength', 'tea_changes_per_day'];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant