- Fix error that would occur when restoring optional Typed member with no value
- Use a new
RestoreErrorexception that improves error messages when the error mode is set toraise - Fix an edge case where a cached result is not pulled when tables are joined
- Use LRU cache for query join expressions
- Support Python 3.14
- Fix values query if it contained a related column
- Remove the
__ref__member and useid(self)instead. State still contains the__ref__key. - Rework sql RelatedList to avoid caching and instead use the internal atomlist data pointer
- Print full traceback if error occurs while restoring
- Make atom.api.Range, atom.api.FloatRange, and (when appliciable) atom.api.Enum primitives
- Rebase changes from 0.7.10 and 0.7.11
- Rework Relation & RelatedList so the return value is still a list instance
- Flatten builtin enum.Enum types to their value
- Add first, last, earliest, latest to QuerySet and support Meta get_latest_by
- Support using
_idas alias to the primary key when doing filtering
- breaking Make
Relationreturn a RelatedList withsaveandloadmethods. - Don't rewrite bytecode
- Pass onclause when using join to prevent sqlalchemy from picking incorrect relation
- Fix select_related with duplicate joins (eg
select_related('a', 'a__b')) - Change Enum database name to include the table name
- Add builtin set / tuple support for JSONModel
- Support doing an or filter using django style queries by passing a dict arg
- Add group by
- Fix error with 3.11
- Fix problem with flatten/unflatten creating invalid columns.
- Return from bulk_create if values list is empty
- Fix problem with order_by not having bool defined
- Change internal data types to set to speed up building queries and allow caching
- Add a
bulk_createmethod to the model manager. - Add
py.typedto package
- Fix a bug preventing select_related on multiple fields from working
- Add django style
excludeto filter
- Do not save Property members by default
- Annotate Model
objectsandserializerwithClassVar - Change import sorting and cleanup errors found with flake8
- Revert force restore items from direct query even if in the cache.
Now queries can accept a
force_restore=Trueto do this. See https://en.wikipedia.org/wiki/Isolation_%28database_systems%29
- Support prefetching of one to one "Related" members.
- Remove _id field in base Model and JSONModel as it has no meaning there
- Always force restore items from direct query even if in the cache
- Make prefetch use parent queries connection
- Use generated functions to speed up save and restore
- BREAKING: To save memory (by avoiding overriding members) the
_idand__ref__fields were changed to anInt.
- Fix queries joining through multiple tables
- Add initial implementation of prefetch_related
- Add workaround for subclassed pk handling
- Add support for using multiple databases
- Fix non-abstract subclasses throwing multiple primary key error.
- Make update work with renamed fields
- Merge
composite_indexesand typing branches
- Add type hints
- Drop python 3.6 support
- Fix bug with renamed fields excluded fields
- Add
composite_indexesto Model Meta.
- Add
distinctto queryset
- Add
outer_jointo queryset to allow using a left outer join with select related
- Add builtin JSON serializer for
UUID
- Add builtin JSON serializer for
Decimal
- Add field types for
Decimalandtimedelta - Fix bug with enum field name on postgres
- Fix array field with instance child types
- Add support for
update_fieldson save to only fields specified - Add support for
fieldson load to only load fields specified
- Add support for table database
triggers. See https://docs.sqlalchemy.org/en/14/core/ddl.html - Fix bug in create_table where errors are not raised
- Add
updatemethod usingModel.objects.update(**values)
- Replace usage of Unicode with Str to support atom 0.6.0
- Change order by to use
-as desc instead of~ - Add default constraint naming conventions https://alembic.sqlalchemy.org/en/latest/naming.html#the-importance-of-naming-constraints
- Allow setting a
constraintslist on the ModelMetaclass - Fix issue with
connectionarg not working properly when filtering
- Refactor SQL queries so they can be chained
ex
Model.objects.filter(name="Something").filter(age__gt=18) - Add
order_by,limit, andoffset, slicing, andexists - Support filtering using django-style reverse foreign key lookups,
ex
Model.objects.filter(groups_in=[group1, group2]) - Refactor count to support counting over joins
- Let a member be tagged with a custom
flattenfunction
- Fix bug in SQLModel load using
_idwhich is not a valid field
- Let a member be tagged with a custom
unflattenfunction
- Properly restore JSONModel instances that have no
__model__in the dict when migrated from a dict or regular JSON field.
- Add a
__restored__member to models and aloadmethod so foreign keys do not restore as None if not in the cache. - Update to support atom 0.5.0
- Add
cacheoption to SQLModelManager to determine if restoring should always be done even if the object is in the cache.
- Set column type to json if the type is a JSONModel subclass
- Fix bug when saving using a generated id
- Change setstate to restorestate to not conflict with normal pickleing
- Support lookups on foreign key fields
- Add ability to specify
get_columnandget_column_typeto letatom.catom.Membersubclasses use custom sql columns if needed.
- Support lookups using renamed column fields
- The create and drop have been renamed to
create_tableanddrop_tablerespectively. - Add a shortcut
SomeModel.object.create(**state)method - Allow passing a db connection to manager methods ( get, get_or_create, filter, delete, etc...) to better support transactions
- Fix the nosql serialization registry not being loaded properly
- Fix packaging issue with 0.2.2
- Fix bug with fk types
- Allow passing Model instances as filter parameters #8 by @youpsla
- Add a JSONModel that simply can be serialized and restored using JSON.
- Add ability to set an SQL model as
abstractso that no sqlalchemy table is created.
- Initial release