-
-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add official UUID support, docs and tests, internally using new SQLAlchemy 2.0 types #992
Conversation
📝 Docs preview for commit d4d482d at: https://cbae96de.sqlmodel.pages.dev |
📝 Docs preview for commit 184baf3 at: https://d4d7be97.sqlmodel.pages.dev |
Keep consistency with other examples, functions without parameters, and printing info that shows and explains the UUID results (and can also be tested later)
* Explain the concepts at the beggining before using them. * Explain how UUIDs can be used and trusted. * Explain why UUIDs could be generated on the code, and how they can be used for distributed systems. * Explain how UUIDs can prevent information leakage. * Warn about UUIDs storage size. * Explain that uuid is part of the standard library. * Explain how default_factory works. * Explain that creating an instance would generate a new UUID, before it is sent to the DB. This is included and shown in the example, the UUID is printed before saving to the DB. * Remove sections about other operations that would behave the same as other fields and don't need additional info from what was explained in previous chapters. * Add two examples to select using UUIDs, similar to the previous ones, mainly to be able to use them in the tests and ensure that it all works, even when SQLite stores the values as strings but the where() or the session.get() receive UUID values (ensure SQLAlchemy does the conversion correctly for SQLite). * Add an example terminal run of the code, with comments. * Simplify the ending to keep only the information that wasn't there before, just the "Learn More" with links.
…are used in the right places.
📝 Docs preview for commit 6da6465 at: https://65189b1d.sqlmodel.pages.dev |
…0+ (I missed that change before)
📝 Docs preview for commit ad70ba0 at: https://a5413504.sqlmodel.pages.dev |
Thank you! 🚀 I updated the docs, examples, and tests a bit for consistency, to explain things a bit more, and to test that UUIDs are behaving as expected. 🤓 Now this is ready. 🎉 This will be available in SQLModel 0.0.20 in the next hours. 🚀 |
No description provided.