不要怂,就是干,撸起袖子干!

Commit c457aaf1 by Sascha Depold

added Sequelize.FLOAT

1 parent 9474edb4
Showing with 4 additions and 0 deletions
......@@ -17,6 +17,7 @@ var classMethods = {
INTEGER: 'INT',
DATE: 'DATETIME',
BOOLEAN: 'TINYINT(1) NOT NULL',
FLOAT: 'FLOAT',
sqlQueryFor: function(command, values) {
var query = null
......
......@@ -60,6 +60,9 @@ SequelizeHelper = {
if((value == null)||(typeof value == 'undefined'))
return "NULL"
if(dataType.indexOf(Sequelize.FLOAT) > -1)
return (typeof value == 'number') ? value : parseFloat(value.replace(",", "."))
if(dataType.indexOf(Sequelize.BOOLEAN) > -1)
return (value === true ? 1 : 0)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!