JsCao

class JsCao[T](val bucket: ScalaBucket)(implicit val fmt: Format[T]) extends CaoBase[T, JsValue, JsDocument] with JsCaoTrait[T]

Base class for Couchbase Access Object to access json documents that can be decode/encode to/from the T type

trait JsCaoTrait[T]
class CaoBase[T, JsValue, JsDocument]
trait CaoTrait[T, String, JsValue, JsDocument]
class Object
trait Matchable
class Any
class JsCao2[T, A, B]

Type members

Inherited types

final
type DocumentCAS = (T, Long)
Inherited from
CaoTrait

Value members

Inherited methods

final
def change(a: String)(f: Option[T] => T): Future[JsDocument]
Inherited from
CaoTrait
final
def changeBulk(aa: Seq[String])(f: Option[T] => T): Future[Seq[JsDocument]]
Inherited from
CaoTrait
protected
def createDoc(id: String, expiry: Int, content: JsValue, cas: Long): JsDocument
protected
def expiry(): Int
Inherited from
CaoTrait
final
def flatChange(a: String)(f: Option[T] => Future[T]): Future[JsDocument]
Inherited from
CaoTrait
final
def flatChangeBulk(aa: Seq[String])(f: Option[T] => Future[T]): Future[Seq[JsDocument]]
Inherited from
CaoTrait
final
def get(id: String): Future[T]
Value Params
id

document id

Inherited from
CaoBase
final
def getBulk(aa: Seq[String]): Future[Seq[T]]
Inherited from
CaoTrait
final
def getBulkWithCAS(aa: Seq[String]): Future[Seq[DocumentCAS]]
Inherited from
CaoTrait
final
def getOrElse(a: String)(default: => T): Future[T]
Value Params
a

document id or the param of WithCaoKey1.key(a: A)

Inherited from
CaoTrait
final
def getOrElseWithCAS(a: String)(default: => T): Future[DocumentCAS]
Value Params
a

document id or the param of WithCaoKey1.key(a: A)

Inherited from
CaoTrait
final
def getOrUpdate(a: String)(default: => T): Future[T]
Value Params
a

document id or the param of WithCaoKey1.key(a: A)

Inherited from
CaoTrait
final
def getWithCAS(id: String): Future[DocumentCAS]
Value Params
id

document id

Inherited from
CaoBase
final
def query1(n1ql: String, params: AnyRef*): Future[Option[T]]
Inherited from
JsCaoTrait
final
def query1(n1ql: String, qparam: N1qlParams, params: AnyRef*): Future[Option[T]]
Inherited from
JsCaoTrait
final
def remove(id: String): Future[JsDocument]
Value Params
id

document id

Inherited from
CaoBase
final
def set(id: String, t: T): Future[JsDocument]
Value Params
id

document id

t

the object of your own type T ex T=case class User(...) to be upsert into cb server

Inherited from
CaoBase
final
def setBulk(aa: Seq[String], tt: Seq[T]): Future[Seq[JsDocument]]
Inherited from
CaoTrait
final
def setT(a: String, t: T): Future[T]

convenient method. = set(..).map(_ => t)

convenient method. = set(..).map(_ => t)

Inherited from
CaoTrait
final
def update(id: String, t: T, cas: Long): Future[JsDocument]
Value Params
id

document id

t

the object of your own type T ex T=case class User(...) to be upsert into cb server

Inherited from
CaoBase