0.4.0 #40
Brendonovich
announced in
Announcements
0.4.0
#40
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After much work, I'm excited to release version 0.4.0 of Prisma Client Rust! 🎉
This release is much more refined than the initial versions, with many bugs fixed, many approaches rethought, and a whole load of breaking changes 🙃 (trust me, it's for the best). All the information you should need is available in the docs, and if you have a question then feel free to ask!
It would be hugely appreciated if you starred and shared this repo!
Major Changes
CLI is no longer distributed as an installable binary
To allow tying the CLI version to the specific project it is being used in, the CLI is now available as a library and can be used to create a custom executable within your project. Additionally, none of Prisma Client Rust's code will be distributed on crates.io going forward, as 1. There are plans to use Prisma engine code in the CLI and 2. it's more consistent.
Models and fields are now modules
All the functions, structs and enums related to models and fields are now inside their own modules. This was done to standardised naming within the code generation and have consistency between model and field accessor naming (since models used to be PascalCase while fields were snake_case).
Update and upsert
update
andupsert
queries are now supported.Queries return
Result
valuesAn
await
ed query will return a Result, with the error type being aprisma_client_rust::query::Error
New Features
Way more filters
Many filters are now discovered through the Prisma engines, so more expressive queries can now be made.
Pagination
take
,skip
,cursor
andorder_by
filters are all available too!Unique fields are enforced
Separate types now exist for unique fields, narrowing the values that can be used in
find_unique
queries.Compund unique fields
Equality comparisons of compound unique fields can be constructed with ease.
Fixes
Linux support
Previously, engine binaries did not download properly on Linux. This is fixed now thanks to collaboration with @oscartbeaumont.
Correct handling of optional single relations
Optional single relations are now stored as
Option<Option<Data>>
on data structs, and thus whether they have been fetched or not can be reported as an error.This discussion was created from the release 0.4.0.
Beta Was this translation helpful? Give feedback.
All reactions