0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-04 09:38:37 +02:00

ircd::db: Improve readability.

This commit is contained in:
Jason Volk 2019-07-16 15:52:52 -07:00
parent e0e9e09e67
commit 4b53217939

View file

@ -7113,18 +7113,18 @@ ircd::db::debug(const rocksdb::WriteBatch &batch)
(const mutable_buffer &ret)
{
return snprintf(data(ret), size(ret)+1,
"%d deltas; size: %zuB :%s%s%s%s%s%s%s%s%s",
"%d deltas; size:%zuB %s+%s+%s+%s+%s+%s+%s+%s+%s",
batch.Count(),
batch.GetDataSize(),
batch.HasPut()? " PUT" : "",
batch.HasDelete()? " DELETE" : "",
batch.HasSingleDelete()? " SINGLE_DELETE" : "",
batch.HasDeleteRange()? " DELETE_RANGE" : "",
batch.HasMerge()? " MERGE" : "",
batch.HasBeginPrepare()? " BEGIN_PREPARE" : "",
batch.HasEndPrepare()? " END_PREPARE" : "",
batch.HasCommit()? " COMMIT" : "",
batch.HasRollback()? " ROLLBACK" : "");
batch.HasPut()? "PUT" : "",
batch.HasDelete()? "DEL" : "",
batch.HasSingleDelete()? "SDL" : "",
batch.HasDeleteRange()? "DRG" : "",
batch.HasMerge()? "MRG" : "",
batch.HasBeginPrepare()? "BEG" : "",
batch.HasEndPrepare()? "END" : "",
batch.HasCommit()? "COM-" : "",
batch.HasRollback()? "RB^" : "");
});
}