Hi,

Is there a way to know the number of parameters passed for user function
with undefined argument count (nArg = -1 in the Sqlite3_create_function
call).

I could not find a function specific to this task and thought that I at
least can check sqlite3_values array members for zero for my implementation
of xFunc. But the problem is that for complex queries the undefined members
sometimes become not-null

Particularly I implemented locate function that in mysql syntax has two
variations, so I check whether third one exists or not.

The problem with the following query. The locate here has two parameters so
first call sees there's no third one.
  select substr(Word, 1, 100) from tbl where locate('====', Word)<>0

but after first success the third parameter (sqlite3_values[2]) becomes not
null so my code decides that it's explicitely used third parameter and
fails. The value for this particular moment is 100 so it's probably some
data change related to this 'substr' part when it's used first time due to
'where' success.

The version of sqlite 3.7.10

So is there reliable way to find the number of parameters of such functions?

Thanks

Max
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to