Fastorm

Latest version: v0.0.16

Safety actively analyzes 623282 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.0.14

- 🔨 Fixed `REFERENCES` for more than one level of primary key references.

0.0.13

- 🔄 Made sure that the `async insert(…)` method contains no database-agnostic code, and that is actually refactored out to calls to new `_insert_preparation` and `_insert_postprocess` methods.
- This is in preparation of the sync version of the client.
- 🆕 Make classes referencing themself possible.
- 🔨 Fixed `DELETE` not working for primary keys which are references.
- 🔨 Fixed `REFERENCES` to other tables with a double Primary key now set the `FOREIGN KEY` correctly in one, as opposed to trying to create `FOREIGN KEY` for each field.
- The old generated SQL would result in `ERROR: there is no unique constraint matching given keys for referenced table "<table name>"`

0.0.12

- 🆕 Added a new `FastORM.get_primary_keys_sql_fields()` method to get the sql column name(s) of the primary key(s).
- ⚠️ Replaced the `on_conflict_upsert_field_list` parameter of `FastORM.insert(…)` and `FastORM.build_sql_insert(…)` with a new `upsert_on_conflict`.
- It is mostly the same, but the variable name speaks better what it does. That is, specifying the fields which it would conflict on.
- Migration:
- `on_conflict_upsert_field_list=['some_field', 'another_field']` is now `upsert_on_conflict=['some_field', 'another_field']`.
- `on_conflict_upsert_field_list=None` is now `upsert_on_conflict=False`.
- 🆕 Also there's a new case now:
- `upsert_on_conflict=True`. Here it will now automatically use the primary keys to conflict on those.
- 🔨 Fixed `FastORM.insert(…)` and `FastORM.build_sql_insert(…)` that a key listed in the conflict list for UPSERTs would not be excluded from the UPDATE part of the UPSERT, the value overwriting part.

0.0.11

- 🔨 Fixed equality checking on deduplication if only one of them was a `ForwardRef`.
- 🔨 Fixed upgrading of `Any` failing.

0.0.10

- 🔨 Fixed `SELECT` syntax for table references
- 🔨 Fixed `INSERT`, `UPDATE`, `SELECT`, `DELETE` for new field syntax (where a field referencing `OtherTable.id` would be called `other_table__id`).
- 🔨 Fixed `from_row(…)` if you used namespaces (those from `get_select_fields(namespace="…")`)
- ✅ Improved test coverage to pretty much everything.

0.0.9

- 🆕 Added caching for `get_fields_typehints(…)` and `get_fields_references(…)`.
- 🔨 Fixed error if you used a `ForwardRef` to reference a model not yet defined.
- ⚠️ Extracted the referencing part from the create stable stuff (`create_table(…)` and `build_sql_create(…)`). That way they can be executed independently (`create_table_references(…)` and `build_sql_references(…)`), so you can first create all the tables and then add the references.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.