Jay A. Kreibich wrote:
On Tue, Jun 26, 2012 at 03:56:33PM +0200, OBones scratched on the wall:
Hello all,
As I'm experimenting with Virtual Tables, I have had to implement
xBestIndex and xFilter.
The documentation says that idxNum and idxStr are of no importance
to the SQLite core and that it's our responsibility to make sure
xFilter and xBestIndex agree on the meaning.
This is fine by me but I'd like to suggest to change the type of
idxStr from "char *" to "void *" to make it even clearer to everyone
that this parameter is not used in any specific way inside SQLite
core.
99% of the modules that use idxStr pass a string. It is usually an
SQL statement used by xFilter() that has parameter names mapped to
the parameters defined by xBestIndex(). This is the primary use of
this API.
I see you're point, but the variable name is idx"Str", and that's how
most people use it. I don't think redefining it as a void* implies
any more or less ownership by SQLite than a char*. The docs are
clear, the code is clear, and that's how the vast majority of users
use it. Forcing them to cast back and forth for the exception to the
rule seems like a bit of waste.
-j
Thanks for the clarification, I assumed it was the case and was just
making a suggestion.
Regards
Olivier
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users