statikk 0.1.15__tar.gz → 0.1.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {statikk-0.1.15 → statikk-0.1.16}/PKG-INFO +1 -1
  2. {statikk-0.1.15 → statikk-0.1.16}/src/statikk/engine.py +2 -1
  3. {statikk-0.1.15 → statikk-0.1.16}/src/statikk/models.py +0 -3
  4. {statikk-0.1.15 → statikk-0.1.16}/src/statikk.egg-info/PKG-INFO +1 -1
  5. {statikk-0.1.15 → statikk-0.1.16}/tests/test_engine.py +6 -0
  6. {statikk-0.1.15 → statikk-0.1.16}/.coveragerc +0 -0
  7. {statikk-0.1.15 → statikk-0.1.16}/.gitignore +0 -0
  8. {statikk-0.1.15 → statikk-0.1.16}/.readthedocs.yml +0 -0
  9. {statikk-0.1.15 → statikk-0.1.16}/AUTHORS.rst +0 -0
  10. {statikk-0.1.15 → statikk-0.1.16}/CHANGELOG.rst +0 -0
  11. {statikk-0.1.15 → statikk-0.1.16}/CONTRIBUTING.rst +0 -0
  12. {statikk-0.1.15 → statikk-0.1.16}/LICENSE.txt +0 -0
  13. {statikk-0.1.15 → statikk-0.1.16}/README.rst +0 -0
  14. {statikk-0.1.15 → statikk-0.1.16}/assets/favicon.png +0 -0
  15. {statikk-0.1.15 → statikk-0.1.16}/assets/logo.png +0 -0
  16. {statikk-0.1.15 → statikk-0.1.16}/docs/Makefile +0 -0
  17. {statikk-0.1.15 → statikk-0.1.16}/docs/_static/.gitignore +0 -0
  18. {statikk-0.1.15 → statikk-0.1.16}/docs/authors.rst +0 -0
  19. {statikk-0.1.15 → statikk-0.1.16}/docs/changelog.rst +0 -0
  20. {statikk-0.1.15 → statikk-0.1.16}/docs/conf.py +0 -0
  21. {statikk-0.1.15 → statikk-0.1.16}/docs/contributing.rst +0 -0
  22. {statikk-0.1.15 → statikk-0.1.16}/docs/index.rst +0 -0
  23. {statikk-0.1.15 → statikk-0.1.16}/docs/license.rst +0 -0
  24. {statikk-0.1.15 → statikk-0.1.16}/docs/readme.rst +0 -0
  25. {statikk-0.1.15 → statikk-0.1.16}/docs/requirements.txt +0 -0
  26. {statikk-0.1.15 → statikk-0.1.16}/docs/usage.rst +0 -0
  27. {statikk-0.1.15 → statikk-0.1.16}/pyproject.toml +0 -0
  28. {statikk-0.1.15 → statikk-0.1.16}/setup.cfg +0 -0
  29. {statikk-0.1.15 → statikk-0.1.16}/setup.py +0 -0
  30. {statikk-0.1.15 → statikk-0.1.16}/src/statikk/__init__.py +0 -0
  31. {statikk-0.1.15 → statikk-0.1.16}/src/statikk/conditions.py +0 -0
  32. {statikk-0.1.15 → statikk-0.1.16}/src/statikk/expressions.py +0 -0
  33. {statikk-0.1.15 → statikk-0.1.16}/src/statikk/fields.py +0 -0
  34. {statikk-0.1.15 → statikk-0.1.16}/src/statikk/typing.py +0 -0
  35. {statikk-0.1.15 → statikk-0.1.16}/src/statikk.egg-info/SOURCES.txt +0 -0
  36. {statikk-0.1.15 → statikk-0.1.16}/src/statikk.egg-info/dependency_links.txt +0 -0
  37. {statikk-0.1.15 → statikk-0.1.16}/src/statikk.egg-info/not-zip-safe +0 -0
  38. {statikk-0.1.15 → statikk-0.1.16}/src/statikk.egg-info/requires.txt +0 -0
  39. {statikk-0.1.15 → statikk-0.1.16}/src/statikk.egg-info/top_level.txt +0 -0
  40. {statikk-0.1.15 → statikk-0.1.16}/tests/conftest.py +0 -0
  41. {statikk-0.1.15 → statikk-0.1.16}/tests/test_expressions.py +0 -0
  42. {statikk-0.1.15 → statikk-0.1.16}/tests/test_models.py +0 -0
  43. {statikk-0.1.15 → statikk-0.1.16}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statikk
3
- Version: 0.1.15
3
+ Version: 0.1.16
4
4
  Summary: statikk is a single table application (STA) library for DynamoDb.
5
5
  Home-page: https://github.com/terinia/statikk
6
6
  Author: Balint Biro
@@ -431,7 +431,8 @@ class Table:
431
431
 
432
432
  reconstructed_dict.pop(FIELD_STATIKK_TYPE, None)
433
433
  model = model_class.model_validate(reconstructed_dict)
434
- model._is_persisted = True
434
+ for node in model.dfs_traverse_hierarchy():
435
+ node._is_persisted = True
435
436
  return model
436
437
 
437
438
  def scan(
@@ -263,9 +263,6 @@ class DatabaseModel(BaseModel, TrackingMixin):
263
263
 
264
264
  @property
265
265
  def is_persisted(self) -> bool:
266
- if self._parent is not None:
267
- return self._parent.is_persisted
268
-
269
266
  return self._is_persisted
270
267
 
271
268
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statikk
3
- Version: 0.1.15
3
+ Version: 0.1.16
4
4
  Summary: statikk is a single table application (STA) library for DynamoDb.
5
5
  Home-page: https://github.com/terinia/statikk
6
6
  Author: Balint Biro
@@ -1000,3 +1000,9 @@ def test_add_child_node():
1000
1000
  my_database_model = MyDatabaseModel.query_hierarchy(hash_key=Equals("foo"))
1001
1001
  assert len(my_database_model.nested.list_nested) == 1
1002
1002
  assert len(my_database_model.nested.other_list_nested) == 1
1003
+ hierarchy = MyDatabaseModel.query_hierarchy(hash_key=Equals("foo"))
1004
+ assert hierarchy.is_persisted is True
1005
+ assert hierarchy.nested.is_persisted is True
1006
+ assert hierarchy.nested.list_nested[0].is_persisted is True
1007
+ assert hierarchy.nested.other_list_nested[0].is_persisted is True
1008
+ assert hierarchy.nested.other_nested.is_persisted is True
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes