mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
New ConnectedDatabase.mtime_ns property
I plan to use this for some clever table count caching tricks
This commit is contained in:
parent
9c77e6e355
commit
2b11948d7c
1 changed files with 4 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue