
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
loopback-connector-couchbase-mappingport
Advanced tools
The Couchbase Connector module for for loopback-datasource-juggler.
Couchbase Server is a NoSQL document database for interactive web applications. It has a flexible data model, is easily scalable, provides consistent high performance and is "always-on", meaning it can serve application data 24 hours, 7 days a week.
N1QL (pronounced "Nickel") is a next generation query language for Couchbase Server. N1QL presents easy and familiar abstractions to quickly develop scalable applications that work with next generation database systems. It allows for joins, filter expressions, aggregate expressions and many other features to build a rich application.
Before installing the connector module, make sure you've taken the appropriate steps to install and configure Couchbase Server and the N1QL Engine.
N1QL has an interactive online tutorial and a N1QL cheatsheet. The online tutorial is a good way to get started and play with N1QL in an easy, fun environment. The cheatsheet is a quick glance and easy reference of the N1QL syntax. NOTE: Not all capabilities of the N1QL Engine are supported in this connector. For more information on N1QL, see:
To run N1QL on your local system:
Step 1: Expand the package archive. Step 2: On the command line, navigate to your local N1QL directory. Step 3: Run ./start_tutorial.sh (Unix) ./start_tutorial.bat (Windows) Step 4: Open http://localhost:8093/tutorial in your browser to use the tutorial on your local server.
To connect N1QL with your Couchbase Server:
./cbq-engine -couchbase http://[server_name]:8091/
To use the command-line interactive query tool:
./cbq-engine=http://[couchbase-query-engine-server-name]:8093/
Step 5: Before issuing queries against a Couchbase bucket, run the following command from the query command line:
CREATE PRIMARY INDEX ON [bucket-name]
npm install couchbase
npm install loopback-connector-couchbase
The connector can be configured using the following settings from the data source.
NOTE: Unlike other datasources, Couchbase does not require user credentials to access a bucket/database. Buckets can be protected with a password, however, the N1QL Developer Pre-release 3 currently does not support querying password protected buckets. As this capability is released for N1QL, we will update the connector settings.
NOTE: By default, all Couchbase documents will be created with a docType property which matches the model name. To set a Document Key yourself, simply pass in an id value in the data and the connector will use this id as the id property in the Document as well as for the Document Key itself. If no id is passed in, the connector will auto-generate a UUID to be used as the id property and Document Key. These nuances are a work in progress and we would be interested in hearing other developer's use-cases so that we can improve the connector to be as flexible as possible.
NOTE: You could specify "couchbase": {"preserve": true } setting to one property. Connector will not change the content of this field while updating this document. By default, the value of "preserve" is false which means the connector will update the content of this field if the new value is different from the original one.
The model definition consists of the following properties:
{
"name": "Brewery",
"base": "PersistedModel",
"properties": {
"id": {
"type": "String",
"id": true,
"required": true,
"index": true,
"couchbase": {
"preserve": true
}
},
"propertyOne": {
"type": "String",
"required": false
},
"propertyTwo": {
"type": "Object",
"required": false
}
},
"validations": [],
"relations": {
"actions": {
"type": "hasMany",
"model": "Beer",
"foreignKey": "breweryId"
}
},
"acls": [],
"methods": []
}
We have also put together a small example application which uses the beer-sample bucket which is an optional add-on when installing Couchbase Server. There is currently no client front-end for the example app, however you can use the LoopBack Explorer to interact with the API and connector.
Please refer to the official LoopBack Documentation for how to work with models and data.
FAQs
LoopBack Couchbase Connector
The npm package loopback-connector-couchbase-mappingport receives a total of 0 weekly downloads. As such, loopback-connector-couchbase-mappingport popularity was classified as not popular.
We found that loopback-connector-couchbase-mappingport demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.