Reverting r2892 -- not necessary
This commit is contained in:
parent
dd776bbb70
commit
2df1e34dc2
|
@ -262,13 +262,6 @@ Zotero.Utilities.prototype.isInt = function(x) {
|
||||||
Zotero.Utilities.prototype.getSQLDataType = function(value) {
|
Zotero.Utilities.prototype.getSQLDataType = function(value) {
|
||||||
var strVal = value + '';
|
var strVal = value + '';
|
||||||
if (strVal.match(/^[1-9]+[0-9]*$/)) {
|
if (strVal.match(/^[1-9]+[0-9]*$/)) {
|
||||||
// 2^53 (9007199254740992) is JS's upper-bound for decimal integers,
|
|
||||||
// but since integer comparisons above that won't work,
|
|
||||||
// we use a string past 15 digits
|
|
||||||
if (strVal.length > 15) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// These upper bounds also specified in Zotero.DB
|
// These upper bounds also specified in Zotero.DB
|
||||||
//
|
//
|
||||||
// Store as 32-bit signed integer
|
// Store as 32-bit signed integer
|
||||||
|
@ -276,7 +269,8 @@ Zotero.Utilities.prototype.getSQLDataType = function(value) {
|
||||||
return 32;
|
return 32;
|
||||||
}
|
}
|
||||||
// Store as 64-bit signed integer
|
// Store as 64-bit signed integer
|
||||||
else {
|
// 2^53 is JS's upper-bound for decimal integers
|
||||||
|
else if (value < 9007199254740992) {
|
||||||
return 64;
|
return 64;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user