참고사이트
Object Relational Mapping ( SQL / RDBMS )
# sql
create table User(
id integer not null
name varchar(100)
);
// js > json type
models.User ={
id : DATATYPES.INTEGER.NOT_NULL,
name : DataTypes.VARCHAR(100)
};
# sql
SELECT id,name FROM User WHERE id = 123;
//js
User.findAll({
attributes:["id","name"],
where:{id:123}
});