add FileControl.FileControlDataVersion wrapper for SQLITE_FCNTL_DATA_VERSION (#219)
Closes #219 (closed).
Summary
Adds an idiomatic Go wrapper for SQLITE_FCNTL_DATA_VERSION on the existing FileControl interface, matching the pattern of the existing FileControlPersistWAL wrapper. The wrapper allocates a 4-byte slot via the TLS allocator, invokes Xsqlite3_file_control with the SQLITE_FCNTL_DATA_VERSION opcode, and returns the resulting uint32.
The returned data version changes whenever the contents of the database file change, so the typical caller polls it to invalidate application-level caches.
Test plan
TestFcntlDataVersion in fcntl_test.go opens a fresh file-backed database, queries the version, performs a commit on the same connection, performs another commit from a separate connection, and asserts the version moves both times.
$ go test -run TestFcntl -v -count=1 .
=== RUN TestFcntlDataVersion
--- PASS: TestFcntlDataVersion (0.00s)
=== RUN TestFcntlPersistWAL
--- PASS: TestFcntlPersistWAL (0.00s)
PASSNotes on API shape
The new method is added to the existing FileControl interface. Going by the existing convention (the interface is documented as "Access to sqlite3_file_control" and *conn is the only listed implementer), this is the natural growth point. If you prefer to expose DATA_VERSION through a separate single-method interface for backwards compatibility with any external implementer, happy to refactor.