Go Django Queries Documentation
Welcome to the documentation for the go-django-queries
package.
While Go-Django tries to do as little as possible with the database, sometimes helper functions make working with models easier.
This library brings Django-style ORM queries to Go-Django, allowing you to:
- Define models with relationships
- Compose queries with filters, ordering, limits
- Use select expressions and annotations
📁 Documentation Structure
🔧 Quick Example
// Query forward foreign key relation
var todos, err := queries.Objects[*Todo](&Todo{}).
Select("*", "User.*").
Filter("Done", false).
OrderBy("-ID").
All()
// Query reverse foreign key relation
var todos, err := queries.Objects[*User](&User{}).
Select("*", "TodoSet.*").
Filter("TodoSet.Done", false).
OrderBy("-ID").
All()
Continue with Getting Started…
✅ Supported Features
We try to support as many features as possible, but some stuff is either not supported, implemented or tested yet.
The following features are currently supported:
- Selecting fields
- Selecting forward and reverse relations
- Filtering
- Lookups
- Ordering
- Limiting
- Expressions
- Annotations
- Aggregates
- Virtual fields