fdb-record-layer icon indicating copy to clipboard operation
fdb-record-layer copied to clipboard

Allow for read-only record stores

Open scgray opened this issue 5 years ago • 0 comments

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.

scgray avatar Apr 26 '19 10:04 scgray