All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Log
debug
instead ofwarning
when type inference fails.
- Parser,Django: Added support for geo.{intersects, distance, length} functions.
- Python 3.11 coverage in test matrix.
- Parser: Added support for durations specified in years and months.
- SQL: support function calls on right-hand side of contains node.
SQLAlchemy functions defined by
odata_query
- no longer clash with other functions defined in
sqlalchemy.func
with - the same name.
- no longer clash with other functions defined in
- inherit cache to prevent SQLAlchemy performance warnings.
- SQLAlchemy: Fix detection of pre-existing joins for legacy Query objects.
- SQL: Support for the SQLite dialect.
SQL: Refactored SQL support
- The
AstToSqlVisitor
now implements basic, standard SQL and functions as a base class for dialects. - The Athena dialect now lives in
AstToAthenaSqlVisitor
.
- The
- SQLAlchemy; Return a 1.x
Query
if a 1.xQuery
is passed in the shorthand.
- SQLAlchemy; Fix accidentally dropped support for 1.x style queries.
- A new visitor that roundtrips OData AST back to an OData query string.
- SQLAlchemy: Support for SQLAlchemy Core through a new visitor.
- Some lower-level SQLAlchemy related modules have been reorganized to facilitate SQLAlchemy Core support.
- Django; Rework Django query transformer to use Django query nodes more.
With the release of Django 4, we can now use
Lookup
,Function
, and other Django query nodes in queries directly instead of relying on the keyworded syntax. For older Django versions, we can still transform those nodes to the keyworded syntax. - Deps; Upgraded Sphinx and the ReadTheDocs theme.
- Django; Support comparisons of boolean funcs to booleans
(e.g.
contains(a, 'b') eq true
)
- Deps; Upgraded pytest.
- SQLAlchemy; Fixed datetime extract functions.
- QA; Remove
type:ignore
fromgrammar.py
and fix resulting type issues.
- Parser: Rudimentary OData namespace support.
- AST: Literal nodes now have a py_val getter that returns the closest Python approximation to the OData value.
- QA: Added full typing support.
- QA: Upgraded linting libraries.
- Docs: Include contribution guidelines and changelog in the main documentation.
- Docs: Use ReStructuredText instead of markdown where possible, for easier interaction with Sphinx.
- Docs: Removed the
Myst
dependency as we're no longer mixing markdown into our docs. - Dev: Removed the
moto
andFaker
dependencies as they weren't used.
- Added shorthands for the most common use cases: Applying an OData filter straight to a Django QuerySet or SQLAlchemy query.
- Cleared warnings produced in SLY by wrong regex flag placement.
- Raise a new
InvalidFieldException
if a field in a query doesn't exist.
- Allow
AliasRewriter
to recurse intoAttribute
nodes, in order to replace nodes in theAttribute
's ownership chain.
- Added
NodeTransformers
, which are likeNodeVisitors
but replace visited nodes with the returned value. - Initial API documentation.
- The AstTo{ORMQuery} visitors for SQLAlchemy and Django now have the same interface.
- AstToDjangoQVisitor now builds subqueries for
any()/all()
itself, instead of relying onSubQueryToken
s and a seperate visitor. - Made all AST Nodes
frozen
(read-only), so they can be hashed. - Replaced
field_mapping
on the ORM visitors with a more generalAliasRewriter
based on the newNodeTransformers
. - Refactored
IdentifierStripper
to use the newNodeTransformers
.
- Transform OData queries to SQLAlchemy expressions with the new AstToSqlAlchemyClauseVisitor.
- Don't write a debugfile for the parser by default.
- Initial split to seperate package.