New ConnectedDatabase.mtime_ns property

I plan to use this for some clever table count caching tricks
This commit is contained in:
Simon Willison 2019-04-20 10:50:45 -07:00
commit 2b11948d7c

View file

@ -130,6 +130,10 @@ class ConnectedDatabase:
self.hash = inspect_hash(p)
self.size = p.stat().st_size
@property
def mtime_ns(self):
return Path(self.path).stat().st_mtime_ns
@property
def name(self):
if self.is_memory: