betodealmeida / shillelagh

Making it easy to query APIs via SQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential Issue with exact on Fields

cancan101 opened this issue · comments

The docs indicate that exact=True means no post filtering is needed:

Finally, the field also indicates that the filtering is exact, and no
post-filtering is needed to be done by the backend. In some cases it's
useful to have adapters perform an initial coarse filtering (say, at
the daily level), and have the backend perform the final fine filtering
(say, at the second level), to simplify the logic in the adapter.

however that value seems to be passed to apsw:
constraints_used.append((filter_index, column_type.exact))

and the docs for that indicate that False means sqlalachemy won't do any double checking :
# By default SQLite will check what you return. If you set the boolean
# to False then SQLite won’t do that double checking.

(also consistent with the apsw docs page)

Am I misunderstanding something here?

Ok this might just be an issue with the apsw docs as from sqlite docs:

If aConstraintUsage[].omit is true, then the constraint is assumed to be fully handled by the virtual table and might not be checked again by the byte code.

I filed this upstream: rogerbinns/apsw#328

Closing this for now as I think the issue is entirely upstream in apsw.