Ftrack-query

Latest version: v1.8.3

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

Scan your dependencies

Page 1 of 4

1.8.2

Changes
- The `clean_components()` method has been moved to `.options(remove_components=True)`

1.8.1

Fixes
- Fix bug where reusing create statements would result in duplicate values.

1.8.0

Features
- Add `attr` function to use with comparisons (`attr('x.y')` is replacing `entity.x.y`)
- Add `.options()` method on queries to set the page size or attach a new session
- Add `FTRACK_API_PAGE_SIZE` environment variable to set the page size globally, and a `page_size` parameter to `FTrackQuery()` to set it for the entire session
- Add `session.select()` as shorthand for `session.execute(select())`

Improvements
- `.in_()` now supports any data types
- Generators are now automatically unpacked when passed to `in_()`
- Subqueries will not attempt to remap any values (it was confusing behaviour)

1.7.0

Features
- Added `select`, `update`, `delete` and `create` statements to work in a similar way to `SQLAlchemy`.
- Rewrote subquery support - subqueries will be used when the API allows for it, otherwise an error will be raised (the old way would automatically execute the query).

Improvements
- Add a `clean_components()` method when building a `delete` statement, which will automatically remove matching components from every location.
- Stop automatically executing the query when checking for truthiness.
- Allow the use of `order_by` for sorting, and also accept `asc`/`desc` as strings.
- Added a `contains` method, which is the equivelant of `.like(f'%{val}%')`.

1.6.5

Improvements
- Any query objects passed into comparisons will now be executed.
The following is now valid:
`session.Episode.where(project=query)` - Executes `query.one()`.
`session.Episode.where(entity.project == query)` - Executes `query.one()`.
`session.Episode.where(entity.project.in_(query))` - Executes `query.all()`.
`session.Episode.where(entity.project.in_(query, query))` - Executes `query.one()` on each.

1.6.4

Improvements
- Accept lists in populate function - `session.populate(item, (entity.name, entity.project.name))` is now valid

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.