On 02/13/2017 04:14 PM, David Raymond wrote:
In the page for expressions (http://www.sqlite.org/lang_expr.html) check out 
the Parameters section and the REGEXP operator section:

"The REGEXP operator is a special syntax for the regexp() user function. No regexp() user function is defined by 
default and so use of the REGEXP operator will normally result in an error message. If an application-defined SQL 
function named "regexp" is added at run-time, then the "X REGEXP Y" operator will be implemented as 
a call to "regexp(Y,X)"."

So whatever you're normally running has probably implemented its own regexp, 
which would need to be loaded to test it yourself.

As to the other part, you <are> seeing the SQL. The question marks are for bound 
parameters, the question mark means "get the value from the bound variable". The 
statement text stays the same the whole time, only the bindings get updated. So if you're 
looking to log everything that it's doing you'll have to capture it binding those values as 
well.

Hopefully I'm answering that right.


Thank you so much. Yes apparently django (and not the python sqlite3 module) defines the function. Tim Graham from the django list pointed out that it occurs here:

https://github.com/django/django/blob/2f10216f84b55920de25422842a66260219e393f/django/db/backends/sqlite3/base.py#L173

Thanks so much this is very helpful and makes perfect sense!

Cheers,
Thomas
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to