
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
sails-mysql-autogen
Advanced tools
One bad thing when you work with sails js is do all the models by hand... until now, this generator helps to do this task in a very simple way.
The usage of this generator is a bite simple.
#npm i sails-mysql-autogen -g
Sails Mysql AutoGen will prompt connection for usage.... and thats all, it will generate all files for represent you database, in the current directory.
Automodel support all data types present in waterline:
At this version AutoModel can detect all foreign keys only as model attribute, if in your associations you need the virtual attribute collections you must create by your self, but half way is taken by AutoModel, in the next releases i will try to give the power to AutoModel to handle complete associations.
module.exports = {
"identity": "Pets",
"connection": "sails_test",
"autoCreatedAt": false,
"autoUpdatedAt": false,
"attributes": {
"id": {
"type": "INTEGER",
"primaryKey": "TRUE",
"autoIncrement": "TRUE"
},
"name": "STRING",
"Owners": {
"model": "Owners",
"columnName": "owner_id"
}
}
}
module.exports = {
"identity": "Owners",
"connection": "sails_test",
"autoCreatedAt": false,
"autoUpdatedAt": false,
"attributes": {
"id": {
"type": "INTEGER",
"primaryKey": "TRUE",
"autoIncrement": "TRUE"
},
"name": "STRING",
"lastname": "STRING",
"email": "STRING"
}
}
As you can see automodel helps a lot with the tedious task of creating the models.
I hope AutoModel helps to make all of your models as an easy task, as well for me.
FAQs
Create models for Sails Js - Waterline
The npm package sails-mysql-autogen receives a total of 0 weekly downloads. As such, sails-mysql-autogen popularity was classified as not popular.
We found that sails-mysql-autogen 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.