
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
js-core-data
Advanced tools
==============
CoreData is very powerful framework created by Apple for working with data. This module is heavily inspired by it's principles and simplifies usage by implementing methods to fit server environment. Providing easy interface for defining data model, version migration, working with entities and persisting data to persistent store.
View Node Package Manager:
npm install --save js-core-data
Then install database client:
npm install --save mysql|sqlite3|pg
For more information please visit documentation: ViewDocs.io documentation
var CoreData = require('js-core-data');
var db = new CoreData('sqlite://:memory:');
var User = db.define('User',{username:'string'});
var Company = db.define('Company',{name:'string'});
db.defineRelationship(User,Company,'company',{inverse:'users'});
db.defineRelationship(Company,User,'users',{inverse:'company',toMany:true});
db.syncSchema({force:true}).then(function(){
console.log('schema synced')
var context = db.createContext();
var user1 = context.create('User',{username:'user1'});
var user2 = context.create('User',{username:'user2'});
var company = context.create('Company',{name:'test company'});
user1.setCompany(company);
company.addUser(user2);
context.save().then(function(){
context.destroy();
})
})
To run tests locally you need docker
and docker-compose
installed
docker-compose up
npm test
FAQs
ORM inspired by Apple's Objective-C CoreData
The npm package js-core-data receives a total of 6 weekly downloads. As such, js-core-data popularity was classified as not popular.
We found that js-core-data 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.