Permalink
Browse files

Add boolean data type

  • Loading branch information...
1 parent ac5a305 commit 40e027701980099ef63049f9989ccbb72799d4b6 @trojanowski trojanowski committed Jan 24, 2013
Showing with 4 additions and 2 deletions.
  1. +3 −0 lib/sqltree.js
  2. +1 −2 lib/type.js
View
@@ -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
@@ -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.