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

Commit 9a3184d2 by Sascha Depold

formatting + docs

1 parent c297adfa
Showing with 25 additions and 6 deletions
var Utils = require("./utils") var Utils = require("./utils")
, DAOFactory = require("./dao-factory") , DAOFactory = require("./dao-factory")
, DataTypes = require('./data-types') , DataTypes = require('./data-types')
, DAOFactoryManager = require("./dao-factory-manager") , DAOFactoryManager = require("./dao-factory-manager")
, Migrator = require("./migrator") , Migrator = require("./migrator")
, QueryInterface = require("./query-interface") , QueryInterface = require("./query-interface")
if(parseFloat(process.version.replace('v', '')) < 0.6) { if(parseFloat(process.version.replace('v', '')) < 0.6) {
console.log("DEPRECATION WARNING: Support for Node.JS < v0.6 will be canceled in the next minor release.") console.log("DEPRECATION WARNING: Support for Node.JS < v0.6 will be canceled in the next minor release.")
} }
module.exports = (function() { module.exports = (function() {
/**
Main constructor of the project.
Params:
- `database`
- `username`
- `password`, optional, default: null
- `options`, optional, default: {}
Examples:
mymodule.write('foo')
mymodule.write('foo', { stream: process.stderr })
*/
var Sequelize = function(database, username, password, options) { var Sequelize = function(database, username, password, options) {
this.options = Utils._.extend({ this.options = Utils._.extend({
dialect: 'mysql', dialect: 'mysql',
...@@ -46,6 +62,9 @@ module.exports = (function() { ...@@ -46,6 +62,9 @@ module.exports = (function() {
this.importCache = {} this.importCache = {}
} }
/**
Reference to Utils
*/
Sequelize.Utils = Utils Sequelize.Utils = Utils
for (var dataType in DataTypes) { for (var dataType in DataTypes) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!