Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 00f371c7
authored
Dec 30, 2016
by
Felix Becker
Committed by
Sushant
Dec 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES6 import v3 (#7049)
* Support ES6 imports * Remove semicolon
1 parent
082dcaba
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
32 additions
and
4 deletions
lib/associations/base.js
lib/associations/belongs-to-many.js
lib/associations/belongs-to.js
lib/associations/has-many.js
lib/associations/has-one.js
lib/instance-validator.js
lib/instance.js
lib/model-manager.js
lib/model.js
lib/model/attribute.js
lib/sequelize.js
lib/transaction.js
lib/associations/base.js
View file @
00f371c
...
@@ -24,3 +24,5 @@ Association.prototype.inspect = function() {
...
@@ -24,3 +24,5 @@ Association.prototype.inspect = function() {
};
};
module
.
exports
=
Association
;
module
.
exports
=
Association
;
module
.
exports
.
Association
=
Association
;
module
.
exports
.
default
=
Association
;
lib/associations/belongs-to-many.js
View file @
00f371c
...
@@ -784,3 +784,5 @@ BelongsToMany.prototype.injectCreator = function(obj) {
...
@@ -784,3 +784,5 @@ BelongsToMany.prototype.injectCreator = function(obj) {
};
};
module
.
exports
=
BelongsToMany
;
module
.
exports
=
BelongsToMany
;
module
.
exports
.
BelongsToMany
=
BelongsToMany
;
module
.
exports
.
default
=
BelongsToMany
;
lib/associations/belongs-to.js
View file @
00f371c
...
@@ -257,3 +257,5 @@ BelongsTo.prototype.injectCreator = function(instancePrototype) {
...
@@ -257,3 +257,5 @@ BelongsTo.prototype.injectCreator = function(instancePrototype) {
};
};
module
.
exports
=
BelongsTo
;
module
.
exports
=
BelongsTo
;
module
.
exports
.
BelongsTo
=
BelongsTo
;
module
.
exports
.
default
=
BelongsTo
;
lib/associations/has-many.js
View file @
00f371c
...
@@ -535,3 +535,5 @@ HasMany.prototype.create = function(sourceInstance, values, options) {
...
@@ -535,3 +535,5 @@ HasMany.prototype.create = function(sourceInstance, values, options) {
};
};
module
.
exports
=
HasMany
;
module
.
exports
=
HasMany
;
module
.
exports
.
HasMany
=
HasMany
;
module
.
exports
.
default
=
HasMany
;
lib/associations/has-one.js
View file @
00f371c
...
@@ -272,3 +272,5 @@ HasOne.prototype.injectCreator = function(instancePrototype) {
...
@@ -272,3 +272,5 @@ HasOne.prototype.injectCreator = function(instancePrototype) {
};
};
module
.
exports
=
HasOne
;
module
.
exports
=
HasOne
;
module
.
exports
.
HasOne
=
HasOne
;
module
.
exports
.
default
=
HasOne
;
lib/instance-validator.js
View file @
00f371c
...
@@ -15,7 +15,7 @@ var validator = require('./utils/validator-extras').validator
...
@@ -15,7 +15,7 @@ var validator = require('./utils/validator-extras').validator
* @param {Object} options A dict with options.
* @param {Object} options A dict with options.
* @constructor
* @constructor
*/
*/
var
InstanceValidator
=
module
.
exports
=
function
(
modelInstance
,
options
)
{
function
InstanceValidator
(
modelInstance
,
options
)
{
options
=
_
.
clone
(
options
)
||
{};
options
=
_
.
clone
(
options
)
||
{};
if
(
options
.
fields
&&
!
options
.
skip
)
{
if
(
options
.
fields
&&
!
options
.
skip
)
{
...
@@ -47,7 +47,7 @@ var InstanceValidator = module.exports = function(modelInstance, options) {
...
@@ -47,7 +47,7 @@ var InstanceValidator = module.exports = function(modelInstance, options) {
this
.
inProgress
=
false
;
this
.
inProgress
=
false
;
extendModelValidations
(
modelInstance
);
extendModelValidations
(
modelInstance
);
}
;
}
/** @define {string} The error key for arguments as passed by custom validators */
/** @define {string} The error key for arguments as passed by custom validators */
InstanceValidator
.
RAW_KEY_NAME
=
'__raw'
;
InstanceValidator
.
RAW_KEY_NAME
=
'__raw'
;
...
@@ -354,3 +354,7 @@ InstanceValidator.prototype._pushError = function(isBuiltin, errorKey, rawError)
...
@@ -354,3 +354,7 @@ InstanceValidator.prototype._pushError = function(isBuiltin, errorKey, rawError)
this
.
errors
.
push
(
error
);
this
.
errors
.
push
(
error
);
};
};
module
.
exports
=
InstanceValidator
;
module
.
exports
.
InstanceValidator
=
InstanceValidator
;
module
.
exports
.
default
=
InstanceValidator
;
lib/instance.js
View file @
00f371c
...
@@ -1082,3 +1082,5 @@ Instance.prototype.toJSON = function() {
...
@@ -1082,3 +1082,5 @@ Instance.prototype.toJSON = function() {
};
};
module
.
exports
=
Instance
;
module
.
exports
=
Instance
;
module
.
exports
.
Instance
=
Instance
;
module
.
exports
.
default
=
Instance
;
lib/model-manager.js
View file @
00f371c
...
@@ -99,3 +99,5 @@ ModelManager.prototype.forEachModel = function(iterator, options) {
...
@@ -99,3 +99,5 @@ ModelManager.prototype.forEachModel = function(iterator, options) {
};
};
module
.
exports
=
ModelManager
;
module
.
exports
=
ModelManager
;
module
.
exports
.
ModelManager
=
ModelManager
;
module
.
exports
.
default
=
ModelManager
;
lib/model.js
View file @
00f371c
...
@@ -2702,3 +2702,5 @@ Utils._.extend(Model.prototype, associationsMixin);
...
@@ -2702,3 +2702,5 @@ Utils._.extend(Model.prototype, associationsMixin);
Hooks
.
applyTo
(
Model
);
Hooks
.
applyTo
(
Model
);
module
.
exports
=
Model
;
module
.
exports
=
Model
;
module
.
exports
.
Model
=
Model
;
module
.
exports
.
default
=
Model
;
lib/model/attribute.js
View file @
00f371c
...
@@ -6,3 +6,5 @@ var Attribute = function(options) {
...
@@ -6,3 +6,5 @@ var Attribute = function(options) {
};
};
module
.
exports
=
Attribute
;
module
.
exports
=
Attribute
;
module
.
exports
.
Attribute
=
Attribute
;
module
.
exports
.
default
=
Attribute
;
lib/sequelize.js
View file @
00f371c
...
@@ -1405,3 +1405,5 @@ Sequelize.prototype.normalizeAttribute = function(attribute) {
...
@@ -1405,3 +1405,5 @@ Sequelize.prototype.normalizeAttribute = function(attribute) {
// Allows the promise to access cls namespaces
// Allows the promise to access cls namespaces
module
.
exports
=
Promise
.
Sequelize
=
Sequelize
;
module
.
exports
=
Promise
.
Sequelize
=
Sequelize
;
module
.
exports
.
Sequelize
=
Sequelize
;
module
.
exports
.
default
=
Sequelize
;
lib/transaction.js
View file @
00f371c
...
@@ -16,7 +16,7 @@ var Utils = require('./utils');
...
@@ -16,7 +16,7 @@ var Utils = require('./utils');
* @param {String} options.isolationLevel=true Sets the isolation level of the transaction.
* @param {String} options.isolationLevel=true Sets the isolation level of the transaction.
* @param {String} options.deferrable Sets the constraints to be deferred or immediately checked.
* @param {String} options.deferrable Sets the constraints to be deferred or immediately checked.
*/
*/
var
Transaction
=
module
.
exports
=
fun
ction
(
sequelize
,
options
)
{
function
Transa
ction
(
sequelize
,
options
)
{
this
.
sequelize
=
sequelize
;
this
.
sequelize
=
sequelize
;
this
.
savepoints
=
[];
this
.
savepoints
=
[];
var
generateTransactionId
=
this
.
sequelize
.
dialect
.
QueryGenerator
.
generateTransactionId
;
var
generateTransactionId
=
this
.
sequelize
.
dialect
.
QueryGenerator
.
generateTransactionId
;
...
@@ -39,7 +39,7 @@ var Transaction = module.exports = function(sequelize, options) {
...
@@ -39,7 +39,7 @@ var Transaction = module.exports = function(sequelize, options) {
}
}
delete
this
.
options
.
transaction
;
delete
this
.
options
.
transaction
;
}
;
}
/**
/**
* Types can be set per-transaction by passing `options.type` to `sequelize.transaction`.
* Types can be set per-transaction by passing `options.type` to `sequelize.transaction`.
...
@@ -292,3 +292,7 @@ Transaction.prototype.$clearCls = function () {
...
@@ -292,3 +292,7 @@ Transaction.prototype.$clearCls = function () {
}
}
}
}
};
};
module
.
exports
=
Transaction
;
module
.
exports
.
Transaction
=
Transaction
;
module
.
exports
.
default
=
Transaction
;
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment