rogerbinns / apsw

Another Python SQLite wrapper
https://rogerbinns.github.io/apsw/
Other
740 stars 97 forks source link

Implement SQLITE_FCNTL_VFSNAME #525

Closed rogerbinns closed 5 months ago

rogerbinns commented 5 months ago

See discussion.

In theory APSWVFSFile can have an extra data member with a copy of the name of the inherited vfs filled in in the xOpen method and the VFSFile constructor.

The default fcntl implementation can implement the file control for SQLITE_FCNTL_VFSNAME, although there is the question about what to do if fcntl is explicitly implemented, like handling pragmas in the example code.

Since SQLITE_FCNTL_VFSNAME is a diagnostic control, it would seem to be perfectly reasonable for APSW to handle fully internally and not do any Python code callbacks.

The shell .vfsname method also needs fixing.