v0.4.1 #179
RobertCraigie
started this conversation in
General
v0.4.1
#179
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's Changed
Custom Prisma Python Generators
You can now easily write your own Prisma generators in Python!
For example:
generator.py
Then you can add the generator to your Prisma Schema file like so:
Your custom generator will then be invoked whenever you run
prisma generate
For more details see the documentation: https://prisma-client-py.readthedocs.io/en/latest/reference/custom-generators/
Connect with a Context Manager
You can now use the
Client
as a context manager to automatically connect and disconnect from the database, for example:For more information see the documentation: https://prisma-client-py.readthedocs.io/en/stable/reference/client/#context-manager
Automatically register the Client instance
You can now automatically register the Client when it is created:
Which is equivalent to:
Support for setting a default connection timeout
The default timeout used for connecting to the database can now be set at the client level, for example:
You can still explicitly specify the timeout when connecting, for example:
Bug Fixes
DateTime
microsecond precision is now truncated to 3 places (DateTime precision loss leads to records being unable to be found #129)This discussion was created from the release v0.4.1.
Beta Was this translation helpful? Give feedback.
All reactions