getForWrite method
Read page pageNo for modification. The returned buffer is
mutable; the page is automatically journaled (once per
transaction) and marked dirty. commit will flush it to disk.
Implementation
Future<Uint8List> getForWrite(int pageNo) async {
final buf = await read(pageNo);
await _captureForUndo(pageNo, buf);
_dirty.add(pageNo);
return buf;
}