Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Xylem provides a mechanism to persist and manipulate data on the file system, memory or a database server.
Differently from other ORM/ODM tools out there, Xylem allows you to reference and combine data from different sources, making it the ultimate storage abstraction library to back a REST server, a CMS or any other data driven application.
$ npm install xylem
$ npm install xylem-mongodb
var Server = require('xylem');
var MongoDB = require('xylem-mongodb');
var server = new Server();
server
.adapter('mongodb', MongoDB)
.connection('database', 'mongodb://localhost/xylem');
server.model('contact', {
connection: 'database',
fields: {
id: 'string',
name: 'string',
email: 'string'
},
key: 'id'
});
var Contact = server.model('contact');
var john = new Contact({
id: 1,
name: 'John',
email: 'john@example.com'
});
john.save(function (error, john) {
console.log(john);
// Get a list of contacts.
Contact.list({}, function (error, contacts) {
console.log(contacts);
});
});
Xylem adapters are the bridge between Xylem and the underlying storage system.
Save operation
beforeSave(settings, item, callback)
afterSave(settings, item, callback)
List operation
beforeList(settings, query, callback)
afterList(settings, items, callback)
Get operation
beforeGet(settings, key, callback)
afterGet(settings, item, callback)
Destroy operation
beforeDestroy(settings, key, callback)
afterDestroy(settings, item, callback)
FAQs
Cross database object persistence for Node.js.
The npm package xylem receives a total of 2 weekly downloads. As such, xylem popularity was classified as not popular.
We found that xylem 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.