| 354 | } |
| 355 | |
| 356 | Status MaybeFlush() { |
| 357 | if (unflushed_bytes_ >= kFlushBytes) { |
| 358 | TF_RETURN_WITH_CONTEXT_IF_ERROR(txn_->Commit(), "flushing ", |
| 359 | unflushed_bytes_, " bytes"); |
| 360 | unflushed_bytes_ = 0; |
| 361 | } |
| 362 | return Status::OK(); |
| 363 | } |
| 364 | |
| 365 | Sqlite* const db_; |
| 366 | SqliteTransaction* const txn_; |