Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ormneo
Advanced tools
Readme
Abstract some trivial operations on neo4j driver for nodejs and make the use simpler. That's why we created ORMNeo.
npm install ormneo
const ormneo = require('ormneo');
ormneo.Connection.connect('neo4j', 'databasepass', 'localhost');
ORMNeo connects using the neo4j bolt protocol.
const ORMNeoNode = require('ormneo').ORMNeoNode;
ORMNeoNode.create({ name: 'name', tes: 3 }, 'test').then((node) => {
//Created returned object => {id: 1, name: 'name', tes: 3}
}).catch((error) => {
//Handle error
});
const ormneo = require('ormneo');
const ORMNeoNode = ormneo.ORMNeoNode;
const ORMNeoQuery = ormneo.ORMNeoQuery;
const ORMNeoWhere = ormneo.ORMNeoWhere;
let where = new ORMNeoWhere('tes', {$eq: 3});
let query = ORMNeoQuery.query('test', where);
ORMNeoNode.execute(query).then((nodes) => {
//Found nodes.
}).catch((error) => {
//Handle error.
});
const ORMNeoRelation = require('ormneo').ORMNeoRelation;
ORMNeoRelation.relate(node1.id, 'relatedto', node2.id, {property: 'a'}).then((rels) => {
// Created relation node {id: 2, type: 'relatedto', property: 'a'}
}).catch((error) => {
//Handle error
});
conts ormneo = require('ormneo');
const ORMNeoRelation = ormneo.ORMNeoRelation;
const ORMNeoWhere = ormneo.ORMNeoWhere;
ORMNeoRelation.find(node1.id, node2.id, 'relatedto', new ORMNeoWhere('property', {$eq: 'c'})).then((nodes) => {
//Found relation nodes.
}).catch((error) => {
//Handle error.
});
You can executing cypher using the direct Neo4j Driver session object. Or you can use ORMNeoCypher.
const ormneo = require('ormneo');
const ORMNeoCypher = ormneo.ORMNeoCypher;
ORMNeoCypher.execute(cypher).then((result) => {
console.log(result);
}).catch((error) => {
reject(error);
});
You can create and drop indexes in properties.
const ormneo = require('ormneo');
const ORMNeoIndex = ormneo.ORMNeoIndex;
//Creating
ORMNeoIndex.create('label', ['property']).then((result) => {
//Handle creation
});
//Droping
ORMNeoIndex.drop('label', ['property']).then((result) => {
//Handle drop
});
See the full API documentation at docs. All docs was generated by JSDoc.
Most of this library functions are covered by unit tests. With 89% of coverage. See the code coverage on codecov.io.
ORMNeo is released under the MIT License.
FAQs
ORM abstraction layer for neo4j
The npm package ormneo receives a total of 1 weekly downloads. As such, ormneo popularity was classified as not popular.
We found that ormneo 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.