--nolock mode to ignore locked files, closes #1744

This commit is contained in:
Simon Willison 2022-05-17 12:40:05 -07:00
commit 3508bf7875
5 changed files with 15 additions and 1 deletions

View file

@ -89,6 +89,8 @@ class Database:
# mode=ro or immutable=1?
if self.is_mutable:
qs = "?mode=ro"
if self.ds.nolock:
qs += "&nolock=1"
else:
qs = "?immutable=1"
assert not (write and not self.is_mutable)