Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #56 from trojanowski/boolean-type

Add boolean data type
  • Loading branch information...
commit 8a29842b4081faccda378dc3e12590ba75f57663 2 parents ac5a305 + 40e0277
@joeferner 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";
Please sign in to comment.
Something went wrong with that request. Please try again.