Code extractor for WriteResult
Code extractor for WriteResult
import reactivemongo.api.commands.WriteResult def codeOr(res: WriteResult, or: => Int): Int = res match { case WriteResult.Code(code) => code case _ => or }
Code extractor for WriteResult
Code extractor for WriteResult
import reactivemongo.api.commands.WriteResult def messageOr(res: WriteResult, or: => String): String = res match { case WriteResult.Message(msg) => msg case _ => or }