sequelize
Version:
Multi dialect ORM for Node.JS/io.js
1,475 lines • 1.52 MB
JSON
{
"type": "File",
"start": 0,
"end": 6389,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 235,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 6389,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 235,
"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": 93,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 49
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 50,
"end": 92,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 48
}
},
"id": {
"type": "Identifier",
"start": 50,
"end": 58,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 14
},
"identifierName": "inherits"
},
"name": "inherits"
},
"init": {
"type": "CallExpression",
"start": 61,
"end": 92,
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 48
}
},
"callee": {
"type": "Identifier",
"start": 61,
"end": 68,
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 24
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 69,
"end": 91,
"loc": {
"start": {
"line": 4,
"column": 25
},
"end": {
"line": 4,
"column": 47
}
},
"extra": {
"rawValue": "../../utils/inherits",
"raw": "'../../utils/inherits'"
},
"value": "../../utils/inherits"
}
]
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 95,
"end": 6388,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 234,
"column": 2
}
},
"expression": {
"type": "AssignmentExpression",
"start": 95,
"end": 6387,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 234,
"column": 1
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 95,
"end": 109,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 95,
"end": 101,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 6
},
"identifierName": "module"
},
"name": "module"
},
"property": {
"type": "Identifier",
"start": 102,
"end": 109,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 14
},
"identifierName": "exports"
},
"name": "exports"
},
"computed": false
},
"right": {
"type": "ArrowFunctionExpression",
"start": 112,
"end": 6387,
"loc": {
"start": {
"line": 6,
"column": 17
},
"end": {
"line": 234,
"column": 1
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 112,
"end": 121,
"loc": {
"start": {
"line": 6,
"column": 17
},
"end": {
"line": 6,
"column": 26
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
}
],
"body": {
"type": "BlockStatement",
"start": 125,
"end": 6387,
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 234,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 129,
"end": 223,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 7,
"column": 96
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 135,
"end": 222,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 95
}
},
"id": {
"type": "Identifier",
"start": 135,
"end": 139,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 12
},
"identifierName": "warn"
},
"name": "warn"
},
"init": {
"type": "CallExpression",
"start": 142,
"end": 222,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 95
}
},
"callee": {
"type": "MemberExpression",
"start": 142,
"end": 170,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 43
}
},
"object": {
"type": "MemberExpression",
"start": 142,
"end": 165,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 38
}
},
"object": {
"type": "MemberExpression",
"start": 142,
"end": 160,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 142,
"end": 151,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 24
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 152,
"end": 160,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 33
},
"identifierName": "ABSTRACT"
},
"name": "ABSTRACT"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 161,
"end": 165,
"loc": {
"start": {
"line": 7,
"column": 34
},
"end": {
"line": 7,
"column": 38
},
"identifierName": "warn"
},
"name": "warn"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 166,
"end": 170,
"loc": {
"start": {
"line": 7,
"column": 39
},
"end": {
"line": 7,
"column": 43
},
"identifierName": "bind"
},
"name": "bind"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 171,
"end": 180,
"loc": {
"start": {
"line": 7,
"column": 44
},
"end": {
"line": 7,
"column": 53
},
"identifierName": "undefined"
},
"name": "undefined"
},
{
"type": "StringLiteral",
"start": 182,
"end": 221,
"loc": {
"start": {
"line": 7,
"column": 55
},
"end": {
"line": 7,
"column": 94
}
},
"extra": {
"rawValue": "https://www.sqlite.org/datatype3.html",
"raw": "'https://www.sqlite.org/datatype3.html'"
},
"value": "https://www.sqlite.org/datatype3.html"
}
]
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 227,
"end": 270,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 45
}
},
"expression": {
"type": "AssignmentExpression",
"start": 227,
"end": 269,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 44
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 227,
"end": 254,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 29
}
},
"object": {
"type": "MemberExpression",
"start": 227,
"end": 247,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 22
}
},
"object": {
"type": "MemberExpression",
"start": 227,
"end": 241,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 227,
"end": 236,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 11
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 237,
"end": 241,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 16
},
"identifierName": "DATE"
},
"name": "DATE"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 242,
"end": 247,
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 22
},
"identifierName": "types"
},
"name": "types"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 248,
"end": 254,
"loc": {
"start": {
"line": 9,
"column": 23
},
"end": {
"line": 9,
"column": 29
},
"identifierName": "sqlite"
},
"name": "sqlite"
},
"computed": false
},
"right": {
"type": "ArrayExpression",
"start": 257,
"end": 269,
"loc": {
"start": {
"line": 9,
"column": 32
},
"end": {
"line": 9,
"column": 44
}
},
"elements": [
{
"type": "StringLiteral",
"start": 258,
"end": 268,
"loc": {
"start": {
"line": 9,
"column": 33
},
"end": {
"line": 9,
"column": 43
}
},
"extra": {
"rawValue": "DATETIME",
"raw": "'DATETIME'"
},
"value": "DATETIME"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 273,
"end": 335,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 64
}
},
"expression": {
"type": "AssignmentExpression",
"start": 273,
"end": 334,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 63
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 273,
"end": 302,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 31
}
},
"object": {
"type": "MemberExpression",
"start": 273,
"end": 295,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 24
}
},
"object": {
"type": "MemberExpression",
"start": 273,
"end": 289,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 18
}
},
"object": {
"type": "Identifier",
"start": 273,
"end": 282,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 11
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 283,
"end": 289,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 18
},
"identifierName": "STRING"
},
"name": "STRING"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 290,
"end": 295,
"loc": {
"start": {
"line": 10,
"column": 19
},
"end": {
"line": 10,
"column": 24
},
"identifierName": "types"
},
"name": "types"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 296,
"end": 302,
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 31
},
"identifierName": "sqlite"
},
"name": "sqlite"
},
"computed": false
},
"right": {
"type": "ArrayExpression",
"start": 305,
"end": 334,
"loc": {
"start": {
"line": 10,
"column": 34
},
"end": {
"line": 10,
"column": 63
}
},
"elements": [
{
"type": "StringLiteral",
"start": 306,
"end": 315,
"loc": {
"start": {
"line": 10,
"column": 35
},
"end": {
"line": 10,
"column": 44
}
},
"extra": {
"rawValue": "VARCHAR",
"raw": "'VARCHAR'"
},
"value": "VARCHAR"
},
{
"type": "StringLiteral",
"start": 317,
"end": 333,
"loc": {
"start": {
"line": 10,
"column": 46
},
"end": {
"line": 10,
"column": 62
}
},
"extra": {
"rawValue": "VARCHAR BINARY",
"raw": "'VARCHAR BINARY'"
},
"value": "VARCHAR BINARY"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 338,
"end": 392,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 56
}
},
"expression": {
"type": "AssignmentExpression",
"start": 338,
"end": 391,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 55
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 338,
"end": 365,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 29
}
},
"object": {
"type": "MemberExpression",
"start": 338,
"end": 358,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 22
}
},
"object": {
"type": "MemberExpression",
"start": 338,
"end": 352,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 338,
"end": 347,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 11
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 348,
"end": 352,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 16
},
"identifierName": "CHAR"
},
"name": "CHAR"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 353,
"end": 358,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 22
},
"identifierName": "types"
},
"name": "types"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 359,
"end": 365,
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 29
},
"identifierName": "sqlite"
},
"name": "sqlite"
},
"computed": false
},
"right": {
"type": "ArrayExpression",
"start": 368,
"end": 391,
"loc": {
"start": {
"line": 11,
"column": 32
},
"end": {
"line": 11,
"column": 55
}
},
"elements": [
{
"type": "StringLiteral",
"start": 369,
"end": 375,
"loc": {
"start": {
"line": 11,
"column": 33
},
"end": {
"line": 11,
"column": 39
}
},
"extra": {
"rawValue": "CHAR",
"raw": "'CHAR'"
},
"value": "CHAR"
},
{
"type": "StringLiteral",
"start": 377,
"end": 390,
"loc": {
"start": {
"line": 11,
"column": 41
},
"end": {
"line": 11,
"column": 54
}
},
"extra": {
"rawValue": "CHAR BINARY",
"raw": "'CHAR BINARY'"
},
"value": "CHAR BINARY"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 395,
"end": 434,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 41
}
},
"expression": {
"type": "AssignmentExpression",
"start": 395,
"end": 433,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 40
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 395,
"end": 422,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 29
}
},
"object": {
"type": "MemberExpression",
"start": 395,
"end": 415,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 22
}
},
"object": {
"type": "MemberExpression",
"start": 395,
"end": 409,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 395,
"end": 404,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 11
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 405,
"end": 409,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 16
},
"identifierName": "TEXT"
},
"name": "TEXT"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 410,
"end": 415,
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 22
},
"identifierName": "types"
},
"name": "types"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 416,
"end": 422,
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 29
},
"identifierName": "sqlite"
},
"name": "sqlite"
},
"computed": false
},
"right": {
"type": "ArrayExpression",
"start": 425,
"end": 433,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 40
}
},
"elements": [
{
"type": "StringLiteral",
"start": 426,
"end": 432,
"loc": {
"start": {
"line": 12,
"column": 33
},
"end": {
"line": 12,
"column": 39
}
},
"extra": {
"rawValue": "TEXT",
"raw": "'TEXT'"
},
"value": "TEXT"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 437,
"end": 482,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 47
}
},
"expression": {
"type": "AssignmentExpression",
"start": 437,
"end": 481,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 46
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 437,
"end": 467,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 32
}
},
"object": {
"type": "MemberExpression",
"start": 437,
"end": 460,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 25
}
},
"object": {
"type": "MemberExpression",
"start": 437,
"end": 454,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 437,
"end": 446,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 11
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 447,
"end": 454,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 19
},
"identifierName": "INTEGER"
},
"name": "INTEGER"
},
"computed": false
},
"property": {
"type": "Identifier",
"start":