sequelize
Version:
Multi dialect ORM for Node.JS/io.js
1,482 lines (1,481 loc) • 2.84 MB
JSON
{
"type": "File",
"start": 0,
"end": 12923,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 494,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 12923,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 494,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "VariableDeclaration",
"start": 34,
"end": 62,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 28
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 40,
"end": 61,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 27
}
},
"id": {
"type": "Identifier",
"start": 40,
"end": 41,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 7
},
"identifierName": "_"
},
"name": "_",
"leadingComments": null
},
"init": {
"type": "CallExpression",
"start": 44,
"end": 61,
"loc": {
"start": {
"line": 5,
"column": 10
},
"end": {
"line": 5,
"column": 27
}
},
"callee": {
"type": "Identifier",
"start": 44,
"end": 51,
"loc": {
"start": {
"line": 5,
"column": 10
},
"end": {
"line": 5,
"column": 17
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 52,
"end": 60,
"loc": {
"start": {
"line": 5,
"column": 18
},
"end": {
"line": 5,
"column": 26
}
},
"extra": {
"rawValue": "lodash",
"raw": "'lodash'"
},
"value": "lodash"
}
]
},
"leadingComments": null
}
],
"kind": "const",
"leadingComments": [
{
"type": "CommentBlock",
"value": "jshint -W110 ",
"start": 15,
"end": 32,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 17
}
}
}
]
},
{
"type": "VariableDeclaration",
"start": 63,
"end": 90,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 27
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 69,
"end": 89,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 26
}
},
"id": {
"type": "Identifier",
"start": 69,
"end": 72,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 9
},
"identifierName": "wkx"
},
"name": "wkx"
},
"init": {
"type": "CallExpression",
"start": 75,
"end": 89,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 26
}
},
"callee": {
"type": "Identifier",
"start": 75,
"end": 82,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 19
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 83,
"end": 88,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 25
}
},
"extra": {
"rawValue": "wkx",
"raw": "'wkx'"
},
"value": "wkx"
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 91,
"end": 140,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 49
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 97,
"end": 139,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 48
}
},
"id": {
"type": "Identifier",
"start": 97,
"end": 105,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 14
},
"identifierName": "inherits"
},
"name": "inherits"
},
"init": {
"type": "CallExpression",
"start": 108,
"end": 139,
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 48
}
},
"callee": {
"type": "Identifier",
"start": 108,
"end": 115,
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 24
},
"identifierName": "require"
},
"name": "require"
},
"arguments": [
{
"type": "StringLiteral",
"start": 116,
"end": 138,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 47
}
},
"extra": {
"rawValue": "../../utils/inherits",
"raw": "'../../utils/inherits'"
},
"value": "../../utils/inherits"
}
]
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 142,
"end": 12922,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 493,
"column": 2
}
},
"expression": {
"type": "AssignmentExpression",
"start": 142,
"end": 12921,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 493,
"column": 1
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 142,
"end": 156,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 142,
"end": 148,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 6
},
"identifierName": "module"
},
"name": "module"
},
"property": {
"type": "Identifier",
"start": 149,
"end": 156,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 14
},
"identifierName": "exports"
},
"name": "exports"
},
"computed": false
},
"right": {
"type": "ArrowFunctionExpression",
"start": 159,
"end": 12921,
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 493,
"column": 1
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 159,
"end": 168,
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 26
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
}
],
"body": {
"type": "BlockStatement",
"start": 172,
"end": 12921,
"loc": {
"start": {
"line": 9,
"column": 30
},
"end": {
"line": 493,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 176,
"end": 288,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 114
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 182,
"end": 287,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 113
}
},
"id": {
"type": "Identifier",
"start": 182,
"end": 186,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
},
"identifierName": "warn"
},
"name": "warn"
},
"init": {
"type": "CallExpression",
"start": 189,
"end": 287,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 113
}
},
"callee": {
"type": "MemberExpression",
"start": 189,
"end": 217,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 43
}
},
"object": {
"type": "MemberExpression",
"start": 189,
"end": 212,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 38
}
},
"object": {
"type": "MemberExpression",
"start": 189,
"end": 207,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 189,
"end": 198,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 24
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 199,
"end": 207,
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 33
},
"identifierName": "ABSTRACT"
},
"name": "ABSTRACT"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 208,
"end": 212,
"loc": {
"start": {
"line": 10,
"column": 34
},
"end": {
"line": 10,
"column": 38
},
"identifierName": "warn"
},
"name": "warn"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 213,
"end": 217,
"loc": {
"start": {
"line": 10,
"column": 39
},
"end": {
"line": 10,
"column": 43
},
"identifierName": "bind"
},
"name": "bind"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 218,
"end": 227,
"loc": {
"start": {
"line": 10,
"column": 44
},
"end": {
"line": 10,
"column": 53
},
"identifierName": "undefined"
},
"name": "undefined"
},
{
"type": "StringLiteral",
"start": 229,
"end": 286,
"loc": {
"start": {
"line": 10,
"column": 55
},
"end": {
"line": 10,
"column": 112
}
},
"extra": {
"rawValue": "http://www.postgresql.org/docs/9.4/static/datatype.html",
"raw": "'http://www.postgresql.org/docs/9.4/static/datatype.html'"
},
"value": "http://www.postgresql.org/docs/9.4/static/datatype.html"
}
]
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 292,
"end": 371,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 15,
"column": 4
}
},
"expression": {
"type": "AssignmentExpression",
"start": 292,
"end": 370,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 15,
"column": 3
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 292,
"end": 321,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 31
}
},
"object": {
"type": "MemberExpression",
"start": 292,
"end": 312,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 22
}
},
"object": {
"type": "MemberExpression",
"start": 292,
"end": 306,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 292,
"end": 301,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 11
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 302,
"end": 306,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 16
},
"identifierName": "UUID"
},
"name": "UUID"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 307,
"end": 312,
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 22
},
"identifierName": "types"
},
"name": "types"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 313,
"end": 321,
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 31
},
"identifierName": "postgres"
},
"name": "postgres"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 324,
"end": 370,
"loc": {
"start": {
"line": 12,
"column": 34
},
"end": {
"line": 15,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 330,
"end": 342,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 16
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 330,
"end": 334,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 8
},
"identifierName": "oids"
},
"name": "oids"
},
"value": {
"type": "ArrayExpression",
"start": 336,
"end": 342,
"loc": {
"start": {
"line": 13,
"column": 10
},
"end": {
"line": 13,
"column": 16
}
},
"elements": [
{
"type": "NumericLiteral",
"start": 337,
"end": 341,
"loc": {
"start": {
"line": 13,
"column": 11
},
"end": {
"line": 13,
"column": 15
}
},
"extra": {
"rawValue": 2950,
"raw": "2950"
},
"value": 2950
}
]
}
},
{
"type": "ObjectProperty",
"start": 348,
"end": 366,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 22
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 348,
"end": 358,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 14
},
"identifierName": "array_oids"
},
"name": "array_oids"
},
"value": {
"type": "ArrayExpression",
"start": 360,
"end": 366,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 22
}
},
"elements": [
{
"type": "NumericLiteral",
"start": 361,
"end": 365,
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 21
}
},
"extra": {
"rawValue": 2951,
"raw": "2951"
},
"value": 2951
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 375,
"end": 452,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 20,
"column": 4
}
},
"expression": {
"type": "AssignmentExpression",
"start": 375,
"end": 451,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 20,
"column": 3
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 375,
"end": 404,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 31
}
},
"object": {
"type": "MemberExpression",
"start": 375,
"end": 395,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 22
}
},
"object": {
"type": "MemberExpression",
"start": 375,
"end": 389,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 375,
"end": 384,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 11
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 385,
"end": 389,
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 16
},
"identifierName": "JSON"
},
"name": "JSON"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 390,
"end": 395,
"loc": {
"start": {
"line": 17,
"column": 17
},
"end": {
"line": 17,
"column": 22
},
"identifierName": "types"
},
"name": "types"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 396,
"end": 404,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 31
},
"identifierName": "postgres"
},
"name": "postgres"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 407,
"end": 451,
"loc": {
"start": {
"line": 17,
"column": 34
},
"end": {
"line": 20,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 413,
"end": 424,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 15
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 413,
"end": 417,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 8
},
"identifierName": "oids"
},
"name": "oids"
},
"value": {
"type": "ArrayExpression",
"start": 419,
"end": 424,
"loc": {
"start": {
"line": 18,
"column": 10
},
"end": {
"line": 18,
"column": 15
}
},
"elements": [
{
"type": "NumericLiteral",
"start": 420,
"end": 423,
"loc": {
"start": {
"line": 18,
"column": 11
},
"end": {
"line": 18,
"column": 14
}
},
"extra": {
"rawValue": 114,
"raw": "114"
},
"value": 114
}
]
}
},
{
"type": "ObjectProperty",
"start": 430,
"end": 447,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 21
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 430,
"end": 440,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 14
},
"identifierName": "array_oids"
},
"name": "array_oids"
},
"value": {
"type": "ArrayExpression",
"start": 442,
"end": 447,
"loc": {
"start": {
"line": 19,
"column": 16
},
"end": {
"line": 19,
"column": 21
}
},
"elements": [
{
"type": "NumericLiteral",
"start": 443,
"end": 446,
"loc": {
"start": {
"line": 19,
"column": 17
},
"end": {
"line": 19,
"column": 20
}
},
"extra": {
"rawValue": 199,
"raw": "199"
},
"value": 199
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 456,
"end": 536,
"loc": {
"start": {
"line": 22,
"column": 2
},
"end": {
"line": 25,
"column": 4
}
},
"expression": {
"type": "AssignmentExpression",
"start": 456,
"end": 535,
"loc": {
"start": {
"line": 22,
"column": 2
},
"end": {
"line": 25,
"column": 3
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 456,
"end": 486,
"loc": {
"start": {
"line": 22,
"column": 2
},
"end": {
"line": 22,
"column": 32
}
},
"object": {
"type": "MemberExpression",
"start": 456,
"end": 477,
"loc": {
"start": {
"line": 22,
"column": 2
},
"end": {
"line": 22,
"column": 23
}
},
"object": {
"type": "MemberExpression",
"start": 456,
"end": 471,
"loc": {
"start": {
"line": 22,
"column": 2
},
"end": {
"line": 22,
"column": 17
}
},
"object": {
"type": "Identifier",
"start": 456,
"end": 465,
"loc": {
"start": {
"line": 22,
"column": 2
},
"end": {
"line": 22,
"column": 11
},
"identifierName": "BaseTypes"
},
"name": "BaseTypes"
},
"property": {
"type": "Identifier",
"start": 466,
"end": 471,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 17
},
"identifierName": "JSONB"
},
"name": "JSONB"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 472,
"end": 477,
"loc": {
"start": {
"line": 22,
"column": 18
},
"end": {
"line": 22,
"column": 23
},
"identifierName": "types"
},
"name": "types"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 478,
"end": 486,
"loc": {
"start": {
"line": 22,
"column": 24
},
"end": {
"line": 22,
"column": 32
},
"identifierName": "postgres"
},
"name": "postgres"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 489,
"end": 535,
"loc": {
"start": {
"line": 22,