sequelize-json
Want to store JSON data in your database (that isn't PostGres)? This is for you.
How
- Create a database and a Schema:
var Sequelize = JsonField = db User; db = 'database' 'username' 'password' dialect: 'sqlite' logging: false ; User = db;
Note the parameters of JsonField, you pass your Sequelize instance, the name of the model, and the name of the field. A little awkard, but this is needed in order to add the proper hooks to the model instance.
Now, you can always treat that field as a json object:
User ;
It will work with normal save
commands, as well as updateAttribute
commands.