private static unsafe SingleClusterDatabaseCommand ReadCommand(TransactionOperationContext context, TableValueReader reader) { var ptr = reader.Read((int)TransactionCommandsColumn.Commands, out var size); if (ptr == null) { return(null); } var blittable = new BlittableJsonReaderObject(ptr, size, context); blittable.TryGet(nameof(DatabaseCommands), out BlittableJsonReaderArray array); ClusterTransactionOptions options = null; if (blittable.TryGet(nameof(Options), out BlittableJsonReaderObject blittableOptions)) { options = JsonDeserializationServer.ClusterTransactionOptions(blittableOptions); } var index = *(long *)reader.Read((int)TransactionCommandsColumn.RaftIndex, out _); var keyPtr = reader.Read((int)TransactionCommandsColumn.Key, out size); var database = Encoding.UTF8.GetString(keyPtr, size - sizeof(long) - 1); return(new SingleClusterDatabaseCommand { Options = options, Commands = array, Index = index, PreviousCount = Bits.SwapBytes(*(long *)(keyPtr + size - sizeof(long))), Database = database }); }