headers fm join VARCHAR 100 VARCHAR 100 header each fm field if isStri

1
2
3
4
5
6
7
8
# headers = fm.join(' VARCHAR(100), ')+' VARCHAR(100)'
header = ""
_.each fm, (field, i) ->
if _.isString(field)
header += "#{field} VARCHAR(100), "
else if _.isObject(field)
header += "#{field} VARCHAR(100) #{field.null ? "NULL" : ""}, "
header = header.slice(0, -2)