{"id":16666388,"url":"https://github.com/fenos/dqlx","last_synced_at":"2025-03-17T00:31:25.787Z","repository":{"id":42125379,"uuid":"360696617","full_name":"fenos/dqlx","owner":"fenos","description":"A DGraph Query Builder","archived":false,"fork":false,"pushed_at":"2023-01-03T10:16:56.000Z","size":602,"stargazers_count":59,"open_issues_count":7,"forks_count":15,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-27T15:18:48.444Z","etag":null,"topics":["builder","dgraph"],"latest_commit_sha":null,"homepage":"https://fenos.github.io/dqlx/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fenos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-22T22:22:30.000Z","updated_at":"2024-10-01T04:05:49.000Z","dependencies_parsed_at":"2023-02-01T05:46:27.278Z","dependency_job_id":null,"html_url":"https://github.com/fenos/dqlx","commit_stats":null,"previous_names":["fenos/deku"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2Fdqlx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2Fdqlx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2Fdqlx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenos%2Fdqlx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fenos","download_url":"https://codeload.github.com/fenos/dqlx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955290,"owners_count":20374369,"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":["builder","dgraph"],"created_at":"2024-10-12T11:10:49.121Z","updated_at":"2025-03-17T00:31:25.549Z","avatar_url":"https://github.com/fenos.png","language":"Go","readme":"# dqlx\n\ndqlx is a fully featured [DGraph](https://github.com/dgraph-io/dgraph) Schema and Query Builder for Go.\nIt aims to simplify the interaction with the awesome Dgraph database allowing you to fluently compose any queries and mutations of any complexity. It also comes with a rich Schema builder to easily develop and maintain your Dgraph schema.\n\n\n[![CircleCI](https://circleci.com/gh/fenos/dqlx.svg?style=shield)](https://circleci.com/gh/fenos/dqlx)\n[![Coverage Status](https://coveralls.io/repos/github/fenos/dqlx/badge.svg?branch=main)](https://coveralls.io/github/fenos/dqlx?branch=main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/fenos/dqlx)](https://goreportcard.com/report/github.com/fenos/dqlx)\n---\n\n### Status\nThe project is getting close to its first official release\n\n### Why?\nThe DGraph query language is awesome! it is really powerful, and you can achieve a lot with it.\nHowever, as you start trying to add dynamicity (like any other declarative query language) you soon starts\nfiddling with a lot strings concatenations and can quickly get messy.\n\ndqlx tries to simplify the interaction with DGraph by helping to construct Queries and mutations with a fluent API.\n\n### Features\n\n- [x] Schema Builder (Types, Predicates, Indexes)\n- [x] Filtering - Connecting Filters (AND / OR)\n- [x] Nested Selection / Filters\n- [x] Functions\n- [x] Pagination\n- [x] Aggregation\n- [x] Sorting\n- [x] GroupBy\n- [x] Multiple Query Block\n- [x] Query Variables\n- [x] Values Variables\n- [x] Facets\n- [x] Mutations\n\n## Documentation\n\nYou can find the documentation here: https://fenos.github.io/dqlx\n\n---\n\n### Installation\n```bash\ngo get github.com/fenos/dqlx\n```\n\n### Quick Overview\n\n```go\nfunc main() {\n    // Connect to Dgraph cluster\n    db, err := dqlx.Connect(\"localhost:9080\")\n\n    if err != nil {\n        log.Fatal()\n    }\n\n    ctx := context.Background()\n\n    var animals []map[string]interface{}\n\n    // Query for animals\n    _, err = db.\n        QueryType(\"Animal\").\n        Select(`\n            uid\n            name\n            species\n            age\n        `).\n        Filter(\n            dqlx.Eq{\"species\": \"Cat\"},\n            dqlx.Lt{\"age\": 5},\n        ).\n        UnmarshalInto(\u0026animals).\n        Execute(ctx)\n\n    if err != nil { panic(err) }\n\n    println(fmt.Sprintf(\"The animals are: %v\", animals))\n}\n```\n\n### Licence\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenos%2Fdqlx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenos%2Fdqlx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenos%2Fdqlx/lists"}