- Added support for
column_property()
nplus1loader
is not an optional dependency. Install it if you wantraiseload_col()
- Tested with SqlAlchemy 1.3.21-23 and Python 3.9
- Migrated to Poetry
- Proper handling of deferred columns: projections overwrite them
- Fixed a bug with joining self-referential relationships
- Tested with SqlAlchemy 1.3.20
- Removed the
raiseload_col()
and imported the implementation fromnplus1loader
. That's a new dependency. - Tested with SqlAlchemy 1.3.16
- Tested with SqlAlchemy 1.3.12-15
- Fixed an issue with MongoSQL not detecting
TypeDecorator()
-wrapped JSON columns as JSON
- Support string input for:
project
,sort
,group
,join
,joinf
. Previously, they only accepted arrays or objects. Now, they also accept strings: whitespace-separated as a list of columns. - Tested with SqlAlchemy 1.3.11
CrudView._method_create_or_update_many()
: saving many objects at onceMongoQuery.options()
:no_limit_offset=True
lets you disable limits & offsets for a specific query- Tested with SqlAlchemy 1.3.9-10
-
project
: now allow using a string of field names, separated by whitespace. Example:{project: "name age weight"}
-
@saves_relations
: now possible to differentiate a value not provided from a providedNone
-
Better sqlalchemy error messages: a new
mongosql.exc.RuntimeQueryError
provides more details about internal errors.Example:
mongosql.exc.RuntimeQueryError: Error processing MongoQuery(Assignment -> Category).join: (cryptic sqlalchemy message)
-
Bugfix: compilation of dialect-specific clauses used to fail with some JOINs
-
Bugfix:
max_items
+force_filter
used to cause trouble because MongoSQL could not make the correct decision that a nested query is necessary
bundled_project
are now loaded quietly (meaning, they are loaded, but not included into the projection)MongoQuerySettingsDict.pluck_from()
: now skips themax_items
key because it does not make sense when inherited- Bugfix: in some cases, the
projection
property returned invalid results - Bugfix: when the
join
operation includes two relationships that are LEFT JOINed, the query is not broken anymore.
ensure_loaded
setting for projections
filter
: new$prefix
operatorAssociationProxy
support forproject
andfilter
MongoQuery.get_final_query_object()
method for debugging- Project Handler: the new
default_projection
behavior lets you build APIs that return no fields by default: the API user will have to require every field explicitly.
- CrudHelper is not able to save
@property
values: welcomewritable_properties
! - Fix:
bundled_project
now takes care offorce_include
d fields as well - Recommendation when a legacy column is removed: use
legacy_fields
together withforce_include
on a@property
that fakes the missing column or relationship. - CrudHelper now removes
legacy_fields
from the input dict legacy_fields
are now included into all projections generated byproject
andjoin
handlers
legacy_fields
setting will make handlers ignore certain fields that are not available anymore. Works with:filter
,sort
,group
,join
,joinf
,aggregate
.method_decorator
has had a few improvements that no one would notice
- Version 2.0 is released!
- Complete redesign
- Query Object format is the same: backwards-compatible
outerjoin
is renamed tojoin
, old buggyjoin
is nowjoinf
join
is not handled by a tweakedselectin
loader, which is a lot easier and faster!- Overall 1.5x-2.5x performance improvement
MongoQuery
settings lets you configure everythingStrictCrudHelper
is much more powerful@saves_relations
helps with saving related entitiesMongoQuery.end_count()
counts and selects at the same time