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 ed60554a
authored
Feb 13, 2015
by
Dr. Evil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix JSHint issue with constructor name starting not with an uppercase letter
1 parent
440a168d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
lib/data-types.js
lib/dialects/postgres/range.js
lib/data-types.js
View file @
ed60554
...
...
@@ -387,14 +387,14 @@ BLOB.prototype.toSql = function() {
* @property RANGE
*/
var
RANGE
=
function
(
s
ubtype
)
{
var
RANGE
=
function
(
S
ubtype
)
{
var
options
=
{};
if
(
typeof
s
ubtype
===
'function'
)
{
// if subtype passed - instantiate object of this subtype and return new function
options
.
subtype
=
new
s
ubtype
();
if
(
typeof
S
ubtype
===
'function'
)
{
// if subtype passed - instantiate object of this subtype and return new function
options
.
subtype
=
new
S
ubtype
();
return
RANGE
.
bind
({},
options
);
}
else
if
(
typeof
subtype
===
'object'
&&
s
ubtype
.
hasOwnProperty
(
'subtype'
))
options
=
s
ubtype
;
else
if
(
typeof
Subtype
===
'object'
&&
S
ubtype
.
hasOwnProperty
(
'subtype'
))
options
=
S
ubtype
;
if
(
!
(
this
instanceof
RANGE
))
return
new
RANGE
(
options
);
ABSTRACT
.
apply
(
this
,
arguments
);
...
...
lib/dialects/postgres/range.js
View file @
ed60554
...
...
@@ -33,11 +33,11 @@ module.exports = {
return
(
data
.
inclusive
[
0
]
?
'['
:
'('
)
+
JSON
.
stringify
(
data
[
0
])
+
','
+
JSON
.
stringify
(
data
[
1
])
+
(
data
.
inclusive
[
1
]
?
']'
:
')'
);
},
parse
:
function
(
value
,
attr
Type
)
{
parse
:
function
(
value
,
Attribute
Type
)
{
if
(
value
===
null
)
return
null
;
if
(
typeof
attrType
===
'function'
)
attrType
=
new
attr
Type
();
attrType
=
attr
Type
||
''
;
if
(
typeof
AttributeType
===
'function'
)
AttributeType
=
new
Attribute
Type
();
AttributeType
=
Attribute
Type
||
''
;
var
result
=
value
.
slice
(
1
,
-
1
)
...
...
@@ -48,7 +48,7 @@ module.exports = {
result
=
result
.
map
(
function
(
value
)
{
switch
(
attr
Type
.
toString
())
{
switch
(
Attribute
Type
.
toString
())
{
case
'int4range'
:
return
parseInt
(
value
,
10
);
case
'numrange'
:
...
...
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