On 02/13/2017 05:24 PM, Tim Graham wrote:


Here's where Django defines REGEXP:
https://github.com/django/django/blob/2f10216f84b55920de25422842a66260219e393f/django/db/backends/sqlite3/base.py#L173

From http://stackoverflow.com/a/8244670:

SQLite does not contain regular expression functionality by default.

It defines a REGEXP operator, but this will fail with an error message
unless you or your framework define a user function
<http://www.sqlite.org/c3ref/create_function.html> called regexp().

You can execute raw SQL on a Django connection using the technique
documented at
https://docs.djangoproject.com/en/stable/topics/db/sql/#connections-and-cursors.


Excellent thanks so much this clarifies a lot and is great info!

Cheers,
Thomas

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a03833d2-a64b-209a-3317-6691c11dce36%40gmx.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to