Comments (6)
@HKGx Not yet, although this is not a difficult change. I'll work on it now.
from prisma-client-py.
any updates?
from prisma-client-py.
@HKGx Do you need to also query by _count
, _avg
, _sum
, _min
or _max
? (https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#groupby)
I forgot about these aggregation fields before mentioning that this is not a difficult change. Adding support for querying by these fields is more difficult due to internal features that I haven't implemented yet. If you don't need these, I can prioritise getting an initial proof of concept implemented which you would be able to use until the next release.
from prisma-client-py.
@RobertCraigie I'd say so as I'm currently doing
SELECT field, COUNT(field) FROM table GROUP BY field
Not sure how it applies to Prisma, though.
from prisma-client-py.
@HKGx You would be correct, I'll see what I can do.
For reference, the missing internal feature is serializing queries for selecting fields (#19).
from prisma-client-py.
@HKGx I've added the initial support for this feature.
You can try it out by installing from the wip/group-by
branch:
pip install -U git+https://github.com/RobertCraigie/prisma-client-py@wip/group-by
It should be noted that the group_by
method returns a TypedDict
, not a BaseModel
.
This is also very much a work in progress, please let me know if you encounter any issues.
from prisma-client-py.
Related Issues (20)
- Support multiple schemas HOT 8
- docs don't say much about nested queries
- Improve error message for unsupported composite types HOT 3
- Improve documentation for raw query parameters HOT 4
- Action Required: Fix Renovate Configuration
- Add support for database views
- Add support for Prisma Accelerate
- Improve error message for http timeouts
- Select method on client HOT 1
- Can't get rid of `recursive_type_depth` warning HOT 8
- Cannot create single records in simple time series on mysql, but create many works HOT 3
- Deprecating the mypy plugin HOT 1
- Compatibility with Vercel HOT 2
- Generator cannot start HOT 4
- Add support for always including 1-1 relational fields
- `db pull` overwrites the Python client generator nondeterministically HOT 2
- Limiting generators not working as documented (--generators=), but --generator does work HOT 1
- connect() fails if /etc/os-release is not available
- Add fail-safe for downloading binaries. HOT 7
- Refactor internal query builder to use the JSON protocol
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma-client-py.