Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loopback-connector-couchbasex

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loopback-connector-couchbasex

LoopBack Couchbase Connector for 3,5 or higher version

  • 1.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by18.18%
Maintainers
1
Weekly downloads
 
Created
Source

loopback-connector-couchbaseX

Build Status Coverage Status

This is a Couchbase connector node module for Loopback with loopback-datasource-juggler. Without N1QL for now.

How to use

Install

npm install loopback-connector-couchbasex --save

Caveat

  • Model's function update play the same role as updateAttributes which cause by loopback-datasource-juggler.

PUT and PATCH both do the same thing that merge incoming data with current record.

update = Object.assign(current, incoming)

Discussion of update and updateAttribetes , see: https://groups.google.com/forum/#!topic/loopbackjs/-1jarvOuh8k

  • since version 1.0.0 the default vaule of stale was set to ok in viewQuery.

If the update key is not id, you must set stale=before in options parameter to make sure you get the correct data to merge incoming data, like:

const where = { name: 'kitten' };
const update = { ...data };
options = { stale: before };
SomeModel.update(where, update, options);

About stale

DataSource Config in LoopBack

  • For Couchbase version >= 5, as default
Update on CB Authentication @https://docs.couchbase.com/java-sdk/current/sdk-authentication-overview.html
# datasources.json
{
  "testDs": {
    "name": "testDs",
    "connector": "couchbasex",
    "version": 5,
    "cluster": {
      "url": "couchbase://localhost",
      "username": "username",
      "password": "password",
      "options": {}
    },
    "bucket": {
      "name": "test_bucket"
    }
  }
}
  • For Couchbase version < 5
# datasources.json
{
  "testDs": {
    "name": "testDs",
    "connector": "couchbasex",
    "version": 3,
    "cluster": {
      "url": "couchbase://localhost",
      "options": {}
    },
    "bucket": {
      "name": "test_bucket",
      "password": ""
    }
  }
}

Test

# Docker Up
./dockers/up.sh cb4
or
./dockers/up.sh cb5
./dockers/up.sh cb6

# Run Test
yarn run cb4
or
yarn run cb5
yarn run cb6

# Docker Down
./dockers/down.sh cb4
or
./dockers/down.sh cb5
./dockers/down.sh cb6

Summary

project  : loopback-connector-couchbaseX
repo age : 4 years, 1 month
active   : 61 days
commits  : 124
files    : 27

authors  :
  63  Makara Wang        50.8%
  39  CCharlieLi         31.5%
   7  chopperlee         5.6%
   4  Xavier Zhou        3.2%
   3  Leo Zhou           2.4%
   3  wwayne             2.4%
   2  greenkeeperio-bot  1.6%
   2  xavier             1.6%
   1  Marc Bachmann      0.8%

Keywords

FAQs

Package last updated on 05 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc