{"id":19185944,"url":"https://github.com/beameryedge/querycraft-pipelines","last_synced_at":"2025-06-20T07:37:53.867Z","repository":{"id":65371767,"uuid":"113870302","full_name":"BeameryEdge/querycraft-pipelines","owner":"BeameryEdge","description":"Create Database agnostic aggregations base on data pipelines","archived":false,"fork":false,"pushed_at":"2023-04-19T15:11:46.000Z","size":246,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-04T05:20:58.296Z","etag":null,"topics":["data-pipeline","querycraft","querycraft-filter-builder","querycraft-pipelines"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/BeameryEdge.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-11T14:41:28.000Z","updated_at":"2023-04-19T15:04:59.000Z","dependencies_parsed_at":"2024-11-09T11:12:39.684Z","dependency_job_id":"06353c9f-4126-4487-a3b5-d6bc0426da10","html_url":"https://github.com/BeameryEdge/querycraft-pipelines","commit_stats":null,"previous_names":["beameryhq/querycraft-pipelines"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeameryEdge%2Fquerycraft-pipelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeameryEdge%2Fquerycraft-pipelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeameryEdge%2Fquerycraft-pipelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeameryEdge%2Fquerycraft-pipelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeameryEdge","download_url":"https://codeload.github.com/BeameryEdge/querycraft-pipelines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240261499,"owners_count":19773474,"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":["data-pipeline","querycraft","querycraft-filter-builder","querycraft-pipelines"],"created_at":"2024-11-09T11:12:34.100Z","updated_at":"2025-02-23T02:44:44.616Z","avatar_url":"https://github.com/BeameryEdge.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QueryCraft-Pipelines\nDatabase agnostic formulation for data pipelines\n\n[![NPM](https://nodei.co/npm/QueryCraft-Pipelines.png)](https://npmjs.org/package/querycraft-pipelines)\n\n[![npm version](https://badge.fury.io/js/querycraft-pipelines.svg)](https://badge.fury.io/js/querycraft-pipelines)\n[![codecov](https://codecov.io/gh/BeameryHQ/QueryCraft-Pipelines/branch/master/graph/badge.svg)](https://codecov.io/gh/BeameryHQ/QueryCraft-Pipelines)\n[![Known Vulnerabilities](https://snyk.io/test/github/beameryhq/QueryCraft-Pipelines/badge.svg)](https://snyk.io/test/github/beameryhq/QueryCraft-Pipelines)\n\n## Installation\n\n```sh\nnpm install --save 'querycraft-pipelines'\n```\n\n## Examples\n\nSuppose we have a collection of data that satisfies the interface\n\n```ts\ninterface contact {\n    id: string\n    'list': { id: string }[]\n    firstName: string\n    lastName: string\n    email: string\n    createdAt: Date\n    customFields: { id: string, value: number }[]\n    assignedTo?: string\n}\n```\n\nIf we want an aggregations the describes the logic:-\n```\n\n    where\n        fistName is bob\n        lastName is doyle OR is not set\n        assignedTo is anything\n        list has an item where id is item1\n    Group by\n        the value property of the customField where id is custom1\n\n```\n\nWe can build build it as easily as:-\n\n```ts\nimport { FilterBuilder, eq, lt, neq, any, find, where } from 'querycraft'\nimport { Pipeline } from 'querycraft-pipelines'\n\nconst contacts: contact[] =  [ ... ]\n\nconst pipeline = new Pipeline()\n.filter(\n    where('firstName', eq('bob'))\n    .where('list', find(where('id', eq('item1'))))\n    .where('lastName', any([\n        eq('doyle'),\n        eq(null)\n    ]))\n    .where('createdAt', lt({ daysAgo: 5 }))\n    .where('assignedTo', neq(null))\n)\n.buckets({\n    fieldId: 'CustomFields',\n    subFieldIds: ['custom1'],\n    subFieldProp: 'value',\n})\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeameryedge%2Fquerycraft-pipelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeameryedge%2Fquerycraft-pipelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeameryedge%2Fquerycraft-pipelines/lists"}