{"id":33952318,"url":"https://github.com/kilhage/doctrine-query-builder","last_synced_at":"2026-04-07T04:32:03.027Z","repository":{"id":51352803,"uuid":"85622839","full_name":"kilhage/doctrine-query-builder","owner":"kilhage","description":"Powerful query builder, perfect for apis","archived":false,"fork":false,"pushed_at":"2021-05-13T20:30:52.000Z","size":819,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-14T08:17:40.041Z","etag":null,"topics":["doctrine","sql","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/kilhage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-20T20:26:37.000Z","updated_at":"2023-11-21T18:31:01.000Z","dependencies_parsed_at":"2022-08-26T09:40:42.999Z","dependency_job_id":null,"html_url":"https://github.com/kilhage/doctrine-query-builder","commit_stats":null,"previous_names":["glooby/doctrine-query-builder"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/kilhage/doctrine-query-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilhage%2Fdoctrine-query-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilhage%2Fdoctrine-query-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilhage%2Fdoctrine-query-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilhage%2Fdoctrine-query-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kilhage","download_url":"https://codeload.github.com/kilhage/doctrine-query-builder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilhage%2Fdoctrine-query-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31500397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["doctrine","sql","symfony"],"created_at":"2025-12-12T19:32:18.947Z","updated_at":"2026-04-07T04:32:03.019Z","avatar_url":"https://github.com/kilhage.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doctrine-query-builder\n\nVery powerful query builder, perfect to use when building api's or have the need to build very flexible queries\n\nSupports unlimited nested AND/OR groups, most of the common SQL operators, joins, order by, distinct etc\n\n### Requirements:\n- PHP \u003e= 5.6\n- Symfony HTTP Foundation \u003e 3.2\n- Doctrine ORM \u003e 2.5\n\n### Installation:\n\nWith [Composer](https://getcomposer.org/):\n```json\n{\n    \"require\": {\n        \"glooby/doctrine-query-builder\": \"dev-master\"\n    }\n}\n```\n\n### Usage:\n\n```php\nuse \\Glooby\\Doctrine\\QueryBuilder\\QueryBuilder;\n\n$repo = $this-\u003egetDoctrine()-\u003egetManager()-\u003egetRepository('AcmeMainBundle:Person');\n$qb = new QueryBuilder();\n\n$results = $qb-\u003ebuild($repo, $data)-\u003egetQuery()-\u003egetResult();\n\nreturn new JsonResponse($results);\n```\n\n### Example data:\n```json\n{\n    \"alias\": \"p\",\n    \"select\": [\"p.id\"],\n    \"where\": {\n        \"$or\": {\n            \"p.city\": {\n                \"$same\": \"c.city\"\n            },\n            \"p.zipCode\": {\n                \"$same\": \"c.zipCode\"\n            },\n            \"p.street\": {\n                \"$same\": \"c.street\"\n            },\n        },\n        \"c.city\": {\n            \"$in\": [\n                \"New York\",\n                \"London\"\n            ]\n        },\n        \"c.employees\": { \"$equals\": 1 },\n        \"l.code\": 49,\n        \"p.country\": \"$not_null\",\n        \"p.phone\": \"$is_null\",\n        \"c.assets\": { \"$gte\": 1000 },\n        \"c.turnover\": { \"$lt\": 10000 },\n        \"t.code\": {\n            \"$in\": [1, 2, 3]\n        },\n        \"r.title\": {\n            \"$not_in\": \":titles\"\n        }\n    },\n    \"distinct\": true,\n    \"params\": {\n        \"titles\": [\"CFO\", \"CMO\"]\n    },\n    \"orderBy\": {\n        \"p.name\": \"asc\"\n    },\n    \"join\": {\n        \"p.roles\": \"r\",\n        \"r.company\": \"c\",\n        \"c.trades\": {\n            \"alias\": \"t\",\n            \"type\": \"left\"\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilhage%2Fdoctrine-query-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkilhage%2Fdoctrine-query-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilhage%2Fdoctrine-query-builder/lists"}