UNPKG

sequelize

Version:

Multi dialect ORM for Node.JS/io.js

1,511 lines (1,510 loc) 1.55 MB
{ "type": "File", "start": 0, "end": 7651, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 252, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 7651, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 252, "column": 0 } }, "sourceType": "module", "body": [ { "type": "VariableDeclaration", "start": 15, "end": 43, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 28 } }, "declarations": [ { "type": "VariableDeclarator", "start": 21, "end": 42, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 27 } }, "id": { "type": "Identifier", "start": 21, "end": 22, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 7 }, "identifierName": "_" }, "name": "_" }, "init": { "type": "CallExpression", "start": 25, "end": 42, "loc": { "start": { "line": 3, "column": 10 }, "end": { "line": 3, "column": 27 } }, "callee": { "type": "Identifier", "start": 25, "end": 32, "loc": { "start": { "line": 3, "column": 10 }, "end": { "line": 3, "column": 17 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 33, "end": 41, "loc": { "start": { "line": 3, "column": 18 }, "end": { "line": 3, "column": 26 } }, "extra": { "rawValue": "lodash", "raw": "'lodash'" }, "value": "lodash" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 44, "end": 77, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 33 } }, "declarations": [ { "type": "VariableDeclarator", "start": 50, "end": 76, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 32 } }, "id": { "type": "Identifier", "start": 50, "end": 56, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 12 }, "identifierName": "moment" }, "name": "moment" }, "init": { "type": "CallExpression", "start": 59, "end": 76, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 32 } }, "callee": { "type": "Identifier", "start": 59, "end": 66, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 22 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 67, "end": 75, "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 4, "column": 31 } }, "extra": { "rawValue": "moment", "raw": "'moment'" }, "value": "moment" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 78, "end": 127, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 49 } }, "declarations": [ { "type": "VariableDeclarator", "start": 84, "end": 126, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 48 } }, "id": { "type": "Identifier", "start": 84, "end": 92, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 14 }, "identifierName": "inherits" }, "name": "inherits" }, "init": { "type": "CallExpression", "start": 95, "end": 126, "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 48 } }, "callee": { "type": "Identifier", "start": 95, "end": 102, "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 24 }, "identifierName": "require" }, "name": "require" }, "arguments": [ { "type": "StringLiteral", "start": 103, "end": 125, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 47 } }, "extra": { "rawValue": "../../utils/inherits", "raw": "'../../utils/inherits'" }, "value": "../../utils/inherits" } ] } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 129, "end": 7650, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 251, "column": 2 } }, "expression": { "type": "AssignmentExpression", "start": 129, "end": 7649, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 251, "column": 1 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 129, "end": 143, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 14 } }, "object": { "type": "Identifier", "start": 129, "end": 135, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 6 }, "identifierName": "module" }, "name": "module" }, "property": { "type": "Identifier", "start": 136, "end": 143, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 14 }, "identifierName": "exports" }, "name": "exports" }, "computed": false }, "right": { "type": "ArrowFunctionExpression", "start": 146, "end": 7649, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 251, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 146, "end": 155, "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 26 }, "identifierName": "BaseTypes" }, "name": "BaseTypes" } ], "body": { "type": "BlockStatement", "start": 159, "end": 7649, "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 251, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 163, "end": 289, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 128 } }, "declarations": [ { "type": "VariableDeclarator", "start": 169, "end": 288, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 127 } }, "id": { "type": "Identifier", "start": 169, "end": 173, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 }, "identifierName": "warn" }, "name": "warn" }, "init": { "type": "CallExpression", "start": 176, "end": 288, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 127 } }, "callee": { "type": "MemberExpression", "start": 176, "end": 204, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 43 } }, "object": { "type": "MemberExpression", "start": 176, "end": 199, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 38 } }, "object": { "type": "MemberExpression", "start": 176, "end": 194, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 33 } }, "object": { "type": "Identifier", "start": 176, "end": 185, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 24 }, "identifierName": "BaseTypes" }, "name": "BaseTypes" }, "property": { "type": "Identifier", "start": 186, "end": 194, "loc": { "start": { "line": 8, "column": 25 }, "end": { "line": 8, "column": 33 }, "identifierName": "ABSTRACT" }, "name": "ABSTRACT" }, "computed": false }, "property": { "type": "Identifier", "start": 195, "end": 199, "loc": { "start": { "line": 8, "column": 34 }, "end": { "line": 8, "column": 38 }, "identifierName": "warn" }, "name": "warn" }, "computed": false }, "property": { "type": "Identifier", "start": 200, "end": 204, "loc": { "start": { "line": 8, "column": 39 }, "end": { "line": 8, "column": 43 }, "identifierName": "bind" }, "name": "bind" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 205, "end": 214, "loc": { "start": { "line": 8, "column": 44 }, "end": { "line": 8, "column": 53 }, "identifierName": "undefined" }, "name": "undefined" }, { "type": "StringLiteral", "start": 216, "end": 287, "loc": { "start": { "line": 8, "column": 55 }, "end": { "line": 8, "column": 126 } }, "extra": { "rawValue": "https://msdn.microsoft.com/en-us/library/ms187752%28v=sql.110%29.aspx", "raw": "'https://msdn.microsoft.com/en-us/library/ms187752%28v=sql.110%29.aspx'" }, "value": "https://msdn.microsoft.com/en-us/library/ms187752%28v=sql.110%29.aspx" } ] } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 293, "end": 327, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 293, "end": 326, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 35 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 293, "end": 319, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 28 } }, "object": { "type": "MemberExpression", "start": 293, "end": 313, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 22 } }, "object": { "type": "MemberExpression", "start": 293, "end": 307, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 16 } }, "object": { "type": "Identifier", "start": 293, "end": 302, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 11 }, "identifierName": "BaseTypes" }, "name": "BaseTypes" }, "property": { "type": "Identifier", "start": 303, "end": 307, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 16 }, "identifierName": "DATE" }, "name": "DATE" }, "computed": false }, "property": { "type": "Identifier", "start": 308, "end": 313, "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 22 }, "identifierName": "types" }, "name": "types" }, "computed": false }, "property": { "type": "Identifier", "start": 314, "end": 319, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 28 }, "identifierName": "mssql" }, "name": "mssql" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 322, "end": 326, "loc": { "start": { "line": 10, "column": 31 }, "end": { "line": 10, "column": 35 } }, "elements": [ { "type": "NumericLiteral", "start": 323, "end": 325, "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 34 } }, "extra": { "rawValue": 43, "raw": "43" }, "value": 43 } ] } } }, { "type": "ExpressionStatement", "start": 330, "end": 372, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 44 } }, "expression": { "type": "AssignmentExpression", "start": 330, "end": 371, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 330, "end": 358, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 30 } }, "object": { "type": "MemberExpression", "start": 330, "end": 352, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 24 } }, "object": { "type": "MemberExpression", "start": 330, "end": 346, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 18 } }, "object": { "type": "Identifier", "start": 330, "end": 339, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 11 }, "identifierName": "BaseTypes" }, "name": "BaseTypes" }, "property": { "type": "Identifier", "start": 340, "end": 346, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 18 }, "identifierName": "STRING" }, "name": "STRING" }, "computed": false }, "property": { "type": "Identifier", "start": 347, "end": 352, "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 24 }, "identifierName": "types" }, "name": "types" }, "computed": false }, "property": { "type": "Identifier", "start": 353, "end": 358, "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 30 }, "identifierName": "mssql" }, "name": "mssql" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 361, "end": 371, "loc": { "start": { "line": 11, "column": 33 }, "end": { "line": 11, "column": 43 } }, "elements": [ { "type": "NumericLiteral", "start": 362, "end": 365, "loc": { "start": { "line": 11, "column": 34 }, "end": { "line": 11, "column": 37 } }, "extra": { "rawValue": 231, "raw": "231" }, "value": 231 }, { "type": "NumericLiteral", "start": 367, "end": 370, "loc": { "start": { "line": 11, "column": 39 }, "end": { "line": 11, "column": 42 } }, "extra": { "rawValue": 173, "raw": "173" }, "value": 173 } ] } } }, { "type": "ExpressionStatement", "start": 375, "end": 410, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 375, "end": 409, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 375, "end": 401, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 28 } }, "object": { "type": "MemberExpression", "start": 375, "end": 395, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 22 } }, "object": { "type": "MemberExpression", "start": 375, "end": 389, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 16 } }, "object": { "type": "Identifier", "start": 375, "end": 384, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 11 }, "identifierName": "BaseTypes" }, "name": "BaseTypes" }, "property": { "type": "Identifier", "start": 385, "end": 389, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 16 }, "identifierName": "CHAR" }, "name": "CHAR" }, "computed": false }, "property": { "type": "Identifier", "start": 390, "end": 395, "loc": { "start": { "line": 12, "column": 17 }, "end": { "line": 12, "column": 22 }, "identifierName": "types" }, "name": "types" }, "computed": false }, "property": { "type": "Identifier", "start": 396, "end": 401, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 28 }, "identifierName": "mssql" }, "name": "mssql" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 404, "end": 409, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 36 } }, "elements": [ { "type": "NumericLiteral", "start": 405, "end": 408, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 35 } }, "extra": { "rawValue": 175, "raw": "175" }, "value": 175 } ] } } }, { "type": "ExpressionStatement", "start": 413, "end": 448, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 413, "end": 447, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 413, "end": 439, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 28 } }, "object": { "type": "MemberExpression", "start": 413, "end": 433, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 22 } }, "object": { "type": "MemberExpression", "start": 413, "end": 427, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 16 } }, "object": { "type": "Identifier", "start": 413, "end": 422, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 13, "column": 11 }, "identifierName": "BaseTypes" }, "name": "BaseTypes" }, "property": { "type": "Identifier", "start": 423, "end": 427, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 16 }, "identifierName": "TEXT" }, "name": "TEXT" }, "computed": false }, "property": { "type": "Identifier", "start": 428, "end": 433, "loc": { "start": { "line": 13, "column": 17 }, "end": { "line": 13, "column": 22 }, "identifierName": "types" }, "name": "types" }, "computed": false }, "property": { "type": "Identifier", "start": 434, "end": 439, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 28 }, "identifierName": "mssql" }, "name": "mssql" }, "computed": false }, "right": { "type": "BooleanLiteral", "start": 442, "end": 447, "loc": { "start": { "line": 13, "column": 31 }, "end": { "line": 13, "column": 36 } }, "value": false } } }, { "type": "ExpressionStatement", "start": 451, "end": 488, "loc": { "start": { "line": 14, "column": 2 }, "end": { "line": 14, "column": 39 } }, "expression": { "type": "AssignmentExpression", "start": 451, "end": 487, "loc": { "start": { "line": 14, "column": 2 }, "end": { "line": 14, "column": 38 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 451, "end": 480, "loc": { "start": { "line": 14, "column": 2 }, "end": { "line": 14, "column": 31 } }, "object": { "type": "MemberExpression", "start": 451, "end": 474, "loc": { "start": { "line": 14, "column": 2 }, "end": { "line": 14, "column": 25 } }, "object": { "type": "MemberExpression", "start": 451, "end": 468, "loc": { "start": { "line": 14, "column": 2 }, "end": { "line": 14, "column": 19 } }, "object": { "type": "Identifier", "start": 451, "end": 460, "loc": { "start": { "line": 14, "column": 2 }, "end": { "line": 14,