{"id":15498901,"url":"https://github.com/maxnowack/meteor-querychain","last_synced_at":"2025-04-22T22:29:19.336Z","repository":{"id":27196942,"uuid":"30667313","full_name":"maxnowack/meteor-querychain","owner":"maxnowack","description":"This package enables chaining mongo cursors for Meteor","archived":false,"fork":false,"pushed_at":"2015-02-13T21:41:56.000Z","size":156,"stargazers_count":21,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-17T13:33:29.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxnowack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-11T20:08:55.000Z","updated_at":"2021-07-31T02:38:35.000Z","dependencies_parsed_at":"2022-08-17T17:15:10.656Z","dependency_job_id":null,"html_url":"https://github.com/maxnowack/meteor-querychain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxnowack%2Fmeteor-querychain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxnowack%2Fmeteor-querychain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxnowack%2Fmeteor-querychain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxnowack%2Fmeteor-querychain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxnowack","download_url":"https://codeload.github.com/maxnowack/meteor-querychain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250333689,"owners_count":21413437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T08:48:52.454Z","updated_at":"2025-04-22T22:29:19.262Z","avatar_url":"https://github.com/maxnowack.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QueryChain\nThis package enables chaining mongo cursors like this:\n````javascript\nPosts.find().fromMax().withComments()\n````\n\n## Installation\n````\nmeteor add maxnowack:querychain\n````\n\n## Usage\n\n````javascript\nPosts = new Mongo.Collection('posts');\n\n// add a chain method\nQueryChain.add({\n  withComments: { // name of the method\n    query: { // a mongo query\n      comments: {\n        $gt: 0\n      }\n    }\n  }\n});\n\n// it's also possible, to define a function to provide a query\nQueryChain.add({\n  from: {\n    query: function(name){\n      return {\n        author: name\n      }\n    }\n  }\n});\n\nPosts.find().withComments() // returns a cursor for the query speficied above\n\n// you can also chain multiple methods:\nQueryChain.add({\n  fromMax: {\n    query: {\n      author: 'Max'\n    }\n  }\n});\n\nPosts.find().fromMax().withComments()\n\n\n// or limit methods to specific collections\nQueryChain.add({\n  notFromMax: {\n    collection: Posts\n    query: {\n      author: {\n        $ne: 'Max'\n      }\n    }\n  }\n});\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxnowack%2Fmeteor-querychain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxnowack%2Fmeteor-querychain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxnowack%2Fmeteor-querychain/lists"}