Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
mapper
Advanced tools
Readme
Fast MySQL ORM on top of the awesome mysql-libmysqlclient
driver.
The goal is to have a blazing fast ORM like dapper-dot-net for node. Mapper is faster than JAVA ORMs like JDBI (dropwizard). Much faster than any SQL-based ORM for node. No bloat.
Based off original code by didit-tech.
npm install mapper
Time for 100,000 iterations alternating between insert and select. See test/bench
or run make bench
.
mapper real 0m24.197s user 0m11.146s sys 0m3.630s
node-mysqllibclient real 0m18.165s user 0m6.613s sys 0m3.396s
node-mysql real 0m34.283s user 0m19.964s sys 0m2.541s
A simple practice without over-engineering is to main 3 distinct layers in your code:
var Mapper = require('mapper');
var conn = { user: 'dont' , password: 'blink' , database: 'now' };
Mapper.connect(conn);
// table name only
var PostDao = Mapper.Base.extend({
tableName: 'posts'
});
PostDao.create({ title: 'Some Title 1', body: 'Some body 1' }, function(err, results) {
PostDao.find({ 'title.like': '%title%' }, { only: ['id', 'body'] }, function(err, post) {
// Hooray!
});
});
##Contributors
Many thanks to the original project
FAQs
Lightweight, blazing fast MySQL data mapper.
The npm package mapper receives a total of 0 weekly downloads. As such, mapper popularity was classified as not popular.
We found that mapper 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
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.