fdb-record-layer
fdb-record-layer copied to clipboard
Allow for read-only record stores
It should be possible to open an FDBRecordStore
in read-only mode, disallowing any modification operations through its API's.
My thinking around this was that maybe we could add a method to FDBRecordContext
like:
FDBRecordContext readOnly();
this would return a facade around the original FDBRecordContext
but whenever it is asked for a transaction, returns a transaction that doesn't allow any modification operations. This would make it easy for any piece of code that wants to ensure that nothing beneath it can perform modifications without having to put special checks everywhere.