JsCao2

abstract
class JsCao2[T, A, B](bucket: ScalaBucket)(implicit evidence$1: Format[T]) extends JsCao[T] with WithCaoKey2[T, A, B, JsValue, JsDocument]

Base class for Couchbase Access Object to access json documents that can be decode/encode to/from the T type - which is store in couchbase at key generated from the T.key(A, B) method

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

Type members

Inherited types

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

Value members

Inherited methods

final
def change(a: A, b: B)(f: Option[T] => T): Future[JsDocument]
Inherited from
WithCaoKey2
final
def change(a: String)(f: Option[T] => T): Future[JsDocument]
Inherited from
CaoTrait
final
def changeBulk(aa: Seq[A], b: B)(f: Option[T] => T): Future[Seq[JsDocument]]
Inherited from
WithCaoKey2
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: A, b: B)(f: Option[T] => Future[T]): Future[JsDocument]
Inherited from
WithCaoKey2
final
def flatChange(a: String)(f: Option[T] => Future[T]): Future[JsDocument]
Inherited from
CaoTrait
final
def flatChangeBulk(aa: Seq[A], b: B)(f: Option[T] => Future[T]): Future[Seq[JsDocument]]
Inherited from
WithCaoKey2
final
def flatChangeBulk(aa: Seq[String])(f: Option[T] => Future[T]): Future[Seq[JsDocument]]
Inherited from
CaoTrait
final
def get(a: A, b: B): Future[T]
Inherited from
WithCaoKey2
final
def get(id: String): Future[T]
Value Params
id

document id

Inherited from
CaoBase
final
def getBulk(aa: Seq[A], b: B): Future[Seq[T]]
Inherited from
WithCaoKey2
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: A, b: B)(default: => T): Future[T]
Inherited from
WithCaoKey2
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: A, b: B)(default: => T): Future[(T, Long)]
Inherited from
WithCaoKey2
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(a: A, b: B): Future[(T, Long)]
Inherited from
WithCaoKey2
final
def getWithCAS(id: String): Future[DocumentCAS]
Value Params
id

document id

Inherited from
CaoBase
protected
def key(a: A, b: B): String

Map 2 param of type A, B to a CB key

Map 2 param of type A, B to a CB key

Returns

CB key

Inherited from
WithCaoKey2
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(a: A, b: B): Future[JsDocument]
Inherited from
WithCaoKey2
final
def remove(id: String): Future[JsDocument]
Value Params
id

document id

Inherited from
CaoBase
final
def set(a: A, b: B, t: T): Future[JsDocument]
Inherited from
WithCaoKey2
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[A], b: B, tt: Seq[T]): Future[Seq[JsDocument]]
Inherited from
WithCaoKey2
final
def setBulk(aa: Seq[String], tt: Seq[T]): Future[Seq[JsDocument]]
Inherited from
CaoTrait
final
def setT(a: A, b: B, t: T): Future[T]

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

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

Inherited from
WithCaoKey2
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
final
def updateWithCAS(a: A, b: B, t: T, cas: Long): Future[JsDocument]
Inherited from
WithCaoKey2