I have a Django Users model mapped to an existing MS SQL Server database table. I read the table like this:
Users.objects.filter(userid='xyz').filter(status='active')
I want to know which lock constructors could translate, for example, into this type of reading Lock the table? In SQL, I would do:
SELECT * from users (nolock) where userid='xyz' and status='active'
Is there a way to explicitly specify "nolock" through Django Model queries?
I searched a lot in the Django documentation as well as the django-pyodbc documentation without any success.
Thanks.
ps: Using django-pyodbc and pyodbc drivers
source share