This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 逐行读取文件 | |
* 分段读取文件 | |
*/ | |
var fs = require('fs'); | |
//每段读取的长度 | |
//@param inputFile{filepath} | |
//@param onEnd{func} 所有内容读完了 | |
module.exports = function(inputFile, onEnd){ | |
var sLength = 1024; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Sequelize = require('sequelize') | |
var sequelize = new Sequelize('sequelize_test', 'root') | |
//Note that the model definition does not have "fullName" | |
var User = sequelize.define('User', { | |
email: Sequelize.STRING, | |
firstName: Sequelize.STRING, | |
lastName: Sequelize.STRING, | |
}, | |
{ |