26 Commits

Author SHA1 Message Date
Sebastián Ramírez
458e088170 🔖 Release version 0.0.21 2024-07-20 21:10:30 -05:00
Sebastián Ramírez
b8d7f4ff67 🔖 Release version 0.0.20 2024-07-16 21:53:24 -05:00
Esteban Maya
95936bb508
Add official UUID support, docs and tests, internally using new SQLAlchemy 2.0 types (#992)
*  Add UUID support from sqlalchemy 2.0 update

* ⚰️ Remove dead code for GUID old support

* 📝 Add documentation for UUIDs

* 🧪 Add test for UUIDs field definition and support

* 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

* ✏️ Fix prerequisites docs for uuid

* ♻️ Update UUID source examples for consistency

Keep consistency with other examples, functions without parameters, and printing info that shows and explains the UUID results (and can also be tested later)

* 📝 Add source examples for selecting UUIDs with session.get()

* 📝 Re-structure UUID docs

* 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.

*  Refactor tests with new printed code, extract and check that UUIDs are used in the right places.

*  Add tests for the new extra UUID examples, for session.get()

* 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

* 📝 Rename variable in example for Python 3.7+ for consistency with 3.10+ (I missed that change before)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-07-16 20:52:03 -05:00
Sebastián Ramírez
4590963e88 🔖 Release version 0.0.19 2024-06-03 22:26:53 -05:00
Sebastián Ramírez
900e0d3371 🔖 Release version 0.0.18 2024-04-29 23:25:02 -07:00
Sebastián Ramírez
9ebbf255f7
Add sqlmodel-slim setup (#916) 2024-04-30 06:22:28 +00:00
Sebastián Ramírez
0431c5bb26 🔖 Release version 0.0.17 2024-04-29 16:44:21 -07:00
Sebastián Ramírez
0b4989d0b2
🔧 Migrate from Poetry to PDM for the internal build config (#912) 2024-04-29 15:58:15 -07:00
Sebastián Ramírez
6b562358fc 🔖 Release version 0.0.16 2024-02-17 14:53:16 +01:00
Sebastián Ramírez
7fec884864 🔖 Release version 0.0.15 2024-02-17 14:36:12 +01:00
Sebastián Ramírez
b892504141 🔖 Release version 0.0.14 2023-12-04 15:51:20 +01:00
Sebastián Ramírez
5b733b348d 🔖 Release version 0.0.13 2023-12-04 13:15:10 +01:00
Sebastián Ramírez
b1c2f822c9 🔖 Release version 0.0.12 2023-11-18 12:32:59 +01:00
Sebastián Ramírez
8ed856d322
Upgrade SQLAlchemy to 2.0, including initial work by farahats9 (#700)
Co-authored-by: Mohamed Farahat <farahats9@yahoo.com>
Co-authored-by: Stefan Borer <stefan.borer@gmail.com>
Co-authored-by: Peter Landry <peter.landry@gmail.com>
2023-11-18 12:30:37 +01:00
Sebastián Ramírez
dacc1fa9ca 🔖 Release version 0.0.11 2023-10-29 13:56:39 +04:00
Sebastián Ramírez
e4e1385eed 🔖 Release version 0.0.10 2023-10-26 18:34:49 +04:00
Sebastián Ramírez
d05c3ee495 🔖 Release version 0.0.9 2023-10-24 01:01:18 +04:00
Sebastián Ramírez
065fcdc828
👷 Move to Ruff and add pre-commit (#661)
* 👷 Add pre-commit

* 🔧 Add pyproject.toml config for Ruff

*  Replace isort, flake8, autoflake with Ruff

* 🔨 Update lint and format scripts

* 🎨 Format with Ruff

* 🔧 Update Poetry config
2023-10-23 07:34:50 +00:00
Sebastián Ramírez
75ce45588b 🔖 Release version 0.0.8 2022-08-30 19:52:36 +02:00
Sebastián Ramírez
f9522b3913 🔖 Release version 0.0.7 2022-08-28 01:59:44 +02:00
Sebastián Ramírez
7fcd4fd7c5 🔖 Release version 0.0.6 2021-12-28 12:27:33 +01:00
Sebastián Ramírez
02697459b8 🔖 Release version 0.0.5 2021-12-13 12:41:51 +01:00
Sebastián Ramírez
02da85c9ec 🔖 Release version 0.0.4 2021-08-25 15:46:57 +02:00
Sebastián Ramírez
af03df88ac 🔖 Release version 0.0.3 2021-08-24 20:44:18 +02:00
Sebastián Ramírez
5bf67cf24e 🔖 Release version 0.0.2 2021-08-24 20:24:05 +02:00
Sebastián Ramírez
fcff2050e6 Add SQLModel core code 2021-08-24 14:41:53 +02:00