Giter Club home page Giter Club logo

solutionmongoaggregationbundle's Introduction

MongoAggregationBundle Build Status

Integration Mongo Pipeline Builder into you Doctrine2 Mongo-ODM

Library not yet ready.

###Install

Add to composer and install/update vendors

  "solution/mongo-odm-aggregation-bundle": "dev-master"

Add to your AppKernel and install/update vendors

  new Solution\MongoAggregationBundle\SolutionMongoAggregationBundle()

###Usage After install, bundle create mongo aggregation query manager for every DocumentManager

Example: If you have default document manager

doctrine_mongodb.odm.default_document_manager

bundle created

doctrine_mongodb.odm.default_aggregation_query

etc

####Example create aggregation query

$expr = new \Solution\MongoAggregation\Pipeline\Operators\Expr;
$aq = $this->get('doctrine_mongodb.odm.default_aggregation_query')
        ->getCollection('AdmPlayerBundle:Comments')->createAggregateQuery()
        ->group(['_id' => ['month' => $expr->month('$dateRegistration')], 'count' => $expr->sum(1)])
        ->sort(['count' => -1])
        ->limit(50);

solutionmongoaggregationbundle's People

Contributors

f1nder avatar tbal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.