Open RobertCraigie opened 3 years ago
Another aspect that should be auto completed is literal values, for example:
posts = await client.post.find_many(
order={
'created_at': '.',
},
)
Should autocomplete with ['asc', 'desc']
Created a PR for pyright!
For reference, the pydantic pycharm plugin could be helpful when building a pycharm plugin.
I'd just like to link relevant YouTrack tickets here, for visibility. I have to admit that the lack of support for TypedDict in PyCharm is pretty much a blocker for using prisma-client-py in one of our projects. Sadly, it doesn't seem to be a priority for JetBrains. If I may, I'd like to urge anyone reading this to leave a :+1: on each of the tickets.
Problem
One of the biggest reasons for using an ORM is the autocomplete value that it provides, currently all of our query arguments will not be autocompleted, this is an issue as it greatly decreases user experience.
Users can only see what arguments are required when constructing the dictionary and will have to jump to the definition to get the full list of arguments.
Suggested solution
This is a tracking issue as the solution for this can only be implemented outside of this repository.
List of language servers / editor extensions that should support this:
Alternatives
I did consider refactoring the entire client API (#7) however I've decided against this as the current API is very unique to prisma and in my opinion makes complicated queries more readable than other ORMs such as SQLAlchemy.