From 54f544395e8b1c65dd69582373721afe6a91b08a Mon Sep 17 00:00:00 2001 From: ido gadiel Date: Fri, 1 May 2020 11:37:12 +0300 Subject: [PATCH] Update README.md * The default Couchbase from npm is 3.0.1, which breaks the functionality. Need to install explicitly version 2.6.5. *Calling upsert method is a bit tricky since casting to 'any' is needed - added an example. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 51d8e39..d496541 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## Installation ```bash -$ npm i @scalio-oss/nest-couchbase couchbase +$ npm i @scalio-oss/nest-couchbase couchbase@2.6.5 ``` ## Usage @@ -93,6 +93,12 @@ export class CatsService { findOne(id: string): Promise { return this.catsRepository.get(id); } + + upsert(key: string, cat: Cat): Promise { + return (this.repositoryCacheLike as any).upsert(key, cat) + } + + } ```