UNPKG

sequelize

Version:

Multi dialect ORM for Node.JS/io.js

1,554 lines 33.5 kB
{ "type": "File", "start": 0, "end": 167, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 8, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 167, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 8, "column": 0 } }, "sourceType": "module", "body": [ { "type": "VariableDeclaration", "start": 15, "end": 71, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 56 } }, "declarations": [ { "type": "VariableDeclarator", "start": 21, "end": 70, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 55 } }, "id": { "type": "Identifier", "start": 21, "end": 28, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 13 }, "identifierName": "Promise" }, "name": "Promise" }, "init": { "type": "CallExpression", "start": 31, "end": 70, "loc": { "start": { "line": 3, "column": 16 }, "end": { "line": 3, "column": 55 } }, "callee": { "type": "MemberExpression", "start": 31, "end": 68, "loc": { "start": { "line": 3, "column": 16 }, "end": { "line": 3, "column": 53 } }, "object": { "type": "CallExpression", "start": 31, "end": 50, "loc": { "start": { "line": 3, "column": 16 }, "end": { "line": 3, "column": 35 } }, "callee": { "type": "Identifier", "start": 31, "end": 38, "loc": { "start": { "line": 3, "column": 16 }, "end": { "line": 3, "column": 23 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 39, "end": 49, "loc": { "start": { "line": 3, "column": 24 }, "end": { "line": 3, "column": 34 } }, "extra": { "rawValue": "bluebird", "raw": "'bluebird'" }, "value": "bluebird" } ] }, "property": { "type": "Identifier", "start": 51, "end": 68, "loc": { "start": { "line": 3, "column": 36 }, "end": { "line": 3, "column": 53 }, "identifierName": "getNewLibraryCopy" }, "name": "getNewLibraryCopy" }, "computed": false }, "arguments": [] } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 73, "end": 98, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 25 } }, "expression": { "type": "AssignmentExpression", "start": 73, "end": 97, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 73, "end": 87, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 14 } }, "object": { "type": "Identifier", "start": 73, "end": 79, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 6 }, "identifierName": "module" }, "name": "module" }, "property": { "type": "Identifier", "start": 80, "end": 87, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 14 }, "identifierName": "exports" }, "name": "exports" }, "computed": false }, "right": { "type": "Identifier", "start": 90, "end": 97, "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 24 }, "identifierName": "Promise" }, "name": "Promise" } } }, { "type": "ExpressionStatement", "start": 99, "end": 132, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 99, "end": 131, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 99, "end": 121, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 22 } }, "object": { "type": "MemberExpression", "start": 99, "end": 113, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 14 } }, "object": { "type": "Identifier", "start": 99, "end": 105, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 6 }, "identifierName": "module" }, "name": "module" }, "property": { "type": "Identifier", "start": 106, "end": 113, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 14 }, "identifierName": "exports" }, "name": "exports" }, "computed": false }, "property": { "type": "Identifier", "start": 114, "end": 121, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 6, "column": 22 }, "identifierName": "Promise" }, "name": "Promise" }, "computed": false }, "right": { "type": "Identifier", "start": 124, "end": 131, "loc": { "start": { "line": 6, "column": 25 }, "end": { "line": 6, "column": 32 }, "identifierName": "Promise" }, "name": "Promise" } } }, { "type": "ExpressionStatement", "start": 133, "end": 166, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 133, "end": 165, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 133, "end": 155, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 22 } }, "object": { "type": "MemberExpression", "start": 133, "end": 147, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 14 } }, "object": { "type": "Identifier", "start": 133, "end": 139, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 6 }, "identifierName": "module" }, "name": "module" }, "property": { "type": "Identifier", "start": 140, "end": 147, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 14 }, "identifierName": "exports" }, "name": "exports" }, "computed": false }, "property": { "type": "Identifier", "start": 148, "end": 155, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 7, "column": 22 }, "identifierName": "default" }, "name": "default" }, "computed": false }, "right": { "type": "Identifier", "start": 158, "end": 165, "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 7, "column": 32 }, "identifierName": "Promise" }, "name": "Promise" } } } ], "directives": [ { "type": "Directive", "start": 0, "end": 13, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } }, "value": { "type": "DirectiveLiteral", "start": 0, "end": 12, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } }, "value": "use strict", "extra": { "raw": "'use strict'", "rawValue": "use strict" } } } ] }, "comments": [], "tokens": [ { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "use strict", "start": 0, "end": 12, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 12, "end": 13, "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 15, "end": 20, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 5 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Promise", "start": 21, "end": 28, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 13 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 29, "end": 30, "loc": { "start": { "line": 3, "column": 14 }, "end": { "line": 3, "column": 15 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "require", "start": 31, "end": 38, "loc": { "start": { "line": 3, "column": 16 }, "end": { "line": 3, "column": 23 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 38, "end": 39, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column": 24 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "bluebird", "start": 39, "end": 49, "loc": { "start": { "line": 3, "column": 24 }, "end": { "line": 3, "column": 34 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 49, "end": 50, "loc": { "start": { "line": 3, "column": 34 }, "end": { "line": 3, "column": 35 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 50, "end": 51, "loc": { "start": { "line": 3, "column": 35 }, "end": { "line": 3, "column": 36 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "getNewLibraryCopy", "start": 51, "end": 68, "loc": { "start": { "line": 3, "column": 36 }, "end": { "line": 3, "column": 53 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 68, "end": 69, "loc": { "start": { "line": 3, "column": 53 }, "end": { "line": 3, "column": 54 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 69, "end": 70, "loc": { "start": { "line": 3, "column": 54 }, "end": { "line": 3, "column": 55 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 70, "end": 71, "loc": { "start": { "line": 3, "column": 55 }, "end": { "line": 3, "column": 56 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "module", "start": 73, "end": 79, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 6 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 79, "end": 80, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "exports", "start": 80, "end": 87, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 14 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 88, "end": 89, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 5, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Promise", "start": 90, "end": 97, "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 24 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 97, "end": 98, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 25 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "module", "start": 99, "end": 105, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 6 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 105, "end": 106, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "exports", "start": 106, "end": 113, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 14 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 113, "end": 114, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 15 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Promise", "start": 114, "end": 121, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 6, "column": 22 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 122, "end": 123, "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 24 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Promise", "start": 124, "end": 131, "loc": { "start": { "line": 6, "column": 25 }, "end": { "line": 6, "column": 32 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 131, "end": 132, "loc": { "start": { "line": 6, "column": 32 }, "end": { "line": 6, "column": 33 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "module", "start": 133, "end": 139, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 6 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 139, "end": 140, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 7 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "exports", "start": 140, "end": 147, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 14 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 147, "end": 148, "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 15 } } }, { "type": { "label": "default", "keyword": "default", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "default", "start": 148, "end": 155, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 7, "column": 22 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 156, "end": 157, "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 24 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Promise", "start": 158, "end": 165, "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 7, "column": 32 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 165, "end": 166, "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 7, "column": 33 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 167, "end": 167, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 0 } } } ] }