You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm willing to submit a PR, but wanted to first see if this was viewed as a misinterpretation of the documentation. I got the impression that setting .omit is only for specifying that you will take care of the constraint and you're hinting to sqlite that it can skip the step if it wants.
it can try to suppress that double-check by setting aConstraintUsage[].omit
I guess I was hoping that one could set .Used = true in order to get hints and receive the right-side values in Filter(), but implement a best-effort filter and not a definite filter.
Would we be open to changing the behavior here to say that .Used = true just means you want to use the constraint and you can still receive it in filter, and we can add a separate .Omit = true to be more explicit about the omit? Or maybe to preserve backward compat with existing behavior we can add something like .UsedNoOmit = true.
Thoughts?
The text was updated successfully, but these errors were encountered:
cheezypoofs
added a commit
to cheezypoofs/go-sqlite3
that referenced
this issue
Aug 31, 2022
The virtual table omit flag is idenfified by sqlite as an optional
hint you can give the database about whether you are processed the
constraints, but the library doesn't require that you actually do
the filtering. Separting the .Used flag, which tells this go
wrapper to setup arguments to receive the constraints in Filter,
from the Omit flag allows us to inspect and perhaps do a best-effort
filtering and still allow sqlite proper to complete the evaluation
by leaving .omit false.
https://github.com/mattn/go-sqlite3/blob/master/sqlite3_opt_vtable.go#L467
I'm willing to submit a PR, but wanted to first see if this was viewed as a misinterpretation of the documentation. I got the impression that setting .omit is only for specifying that you will take care of the constraint and you're hinting to sqlite that it can skip the step if it wants.
From: sqlite
I guess I was hoping that one could set
.Used = true
in order to get hints and receive the right-side values inFilter()
, but implement a best-effort filter and not a definite filter.Would we be open to changing the behavior here to say that
.Used = true
just means you want to use the constraint and you can still receive it in filter, and we can add a separate.Omit = true
to be more explicit about the omit? Or maybe to preserve backward compat with existing behavior we can add something like.UsedNoOmit = true
.Thoughts?
The text was updated successfully, but these errors were encountered: