Releases: huntfx/ftrack-query
Releases · huntfx/ftrack-query
Reorganise module
Features
- Split
base.py
intoabstract.py
andutils.py
- Moved
FTrackQuery
fromquery.py
to__init__.py
Improvements
and_()
andor_()
will skip anyNone
inputs
Fixes
- Fix error when closing session in debug mode
- Fix potential error when using
asc()
anddesc()
Event class and Python 3
Features
- Event class
- Update to Python 3
Improvements
- Add
__call__
method to entities as an alternative to using__eq__
- Automatically remap query to use IDs if passing list of entities into
.in_()
Fixes
- Inverting a query will now correctly recalculate the order of operations
- Speech marks are now escaped in strings
Better support for reversing queries
not_
function added.- Reversing a reversed query will now un-reverse it.
Improve subquery support
- Now
in_('a', 'b', 'c')
will also work.
Add subquery support
- Added the
in_
method to run subqueries.
Separate entity class
- "Reserved" keywords are now allowed as entity attributes. Before, using syntax like
entity.sort.value
would result in an error sincesort
was a method.
Remove entity guessing and add quick access with primary keys
- Under specific circumstances, the entity type can be called with a primary key.
Currently this support is just forUser
, with the syntaxuser = session.User(username)
. - Removed entity keyword guessing as it was a bit hacky and definitely not futureproofed.
An example of this was passing in aFileComponent
, where it would evaluate tofile_component=FileComponent
Fix bug with attribute sort check
- Fix error when using a
Query
object inside thesort
method.
Input parsing and better sorting
- Inputs are all parsed in the same way now
- Added .asc() and .desc() for sorting
- Bug fixes/quality of life improvements
Validation and fixes
- Helper for creating
CalendarEvent
entities - Expand
Comparison.has
andComparison.any
functionality to matchQuery.where
- Fix
FTrackQuery.get
to be compatible withftrack_api.Session.get
- Improve logging
- Check entity type exists before creating a
Query
object - Add
__reversed__
method to swap sort order