gorilla-co / odata-query

An OData v4 query parser and transpiler for Python
MIT License
71 stars 16 forks source link

`AstToSqlVisitor` can not handle a function call as right hand side of contains-filter #47

Closed d2a-pnagel closed 1 year ago

d2a-pnagel commented 1 year ago

Steps to reproduce:

Bug spotted:

Proposed solution:

Change

  if isinstance(arg, ast.Identifier):

Into

  if isinstance(arg, ast.Identifier | ast.Call):
OliverHofkens commented 1 year ago

Hi! Thanks for the very clear and concise report, reproducer ánd proposed fix. What a blessing! PR #49 contains the fix and a lot of test cases to cover it. Once reviewed, I'll include it in a new release (0.9.1).

OliverHofkens commented 1 year ago

Should be live in v0.9.1!