Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add boolean data type

  • Loading branch information...
commit 40e027701980099ef63049f9989ccbb72799d4b6 1 parent ac5a305
@trojanowski trojanowski authored
Showing with 4 additions and 2 deletions.
  1. +3 −0  lib/sqltree.js
  2. +1 −2  lib/type.js
View
3  lib/sqltree.js
@@ -157,6 +157,9 @@ var SqlTree = Class.extend({
// could not parse json so we will leave it as a string
}
}
+ if (column.modelColumn.type === type.BOOLEAN && (val !== null)) {
+ val = !!val;
+ }
result[column.propertyName] = val;
}
if (result._getModel().onLoad) {
View
3  lib/type.js
@@ -1,8 +1,7 @@
-
exports.STRING = "string";
exports.INTEGER = "int";
exports.REAL = "real";
exports.DATETIME = "datetime";
exports.JSON = "json";
exports.BLOB = "blob";
-
+exports.BOOLEAN = "boolean";

0 comments on commit 40e0277

Please sign in to comment.
Something went wrong with that request. Please try again.