ReactiveCouchbase / ReactiveCouchbase-es

Event Store based on ReactiveCouchbase
http://reactivecouchbase.org/
Apache License 2.0
2 stars 3 forks source link

Support for cas operations on documents #2

Closed nielsboldt closed 10 years ago

nielsboldt commented 10 years ago

Are there any plans to support cas operations or would you accept a pull request

nielsboldt commented 10 years ago

Wrong project :-(

mathieuancelin commented 10 years ago

just FYI

We support Atomic updates right now but I'm really open to add more useful stuff into the API and I'll be happy to add what you need. To perform an Atomic update right now (if that's what you need), you can do something like :

bucket.atomicallyUpdate[MyData]("myKey") { currentValue =>
  val usefulData = currentValue.uData
  WS.url(s"http://myWebservice.com/service?data=${usefulData}").get().map { value =>
    usefulData.copy(uData = value)
  }
}