remove commentouted source

This commit is contained in:
taiyoh 2012-11-05 22:30:57 +09:00
parent 885e9188f8
commit 30e9983abf
1 changed files with 0 additions and 36 deletions

View File

@ -172,20 +172,6 @@ BridgeToRedis.prototype.defineForeignKey = function (model, key, cb) {
cb(null, Number);
};
// BridgeToRedis.prototype.forDb = function (model, data) {
// var p = this._models[model].properties;
// for (var i in data) {
// if (p[i] && p[i].type.name === 'Date') {
// data[i] = data[i] && data[i].getTime ? data[i].getTime() : 0;
// } else if (p[i] && [
// 'String', 'Text', 'Number', 'Boolean', 'Date'
// ].indexOf(p[i].type.name) === -1) {
// data[i] = JSON.stringify(data[i]);
// }
// }
// return data;
// };
BridgeToRedis.prototype.forDb = function (model, data) {
var p = this._models[model].properties;
for (var i in data) {
@ -214,28 +200,6 @@ BridgeToRedis.prototype.forDb = function (model, data) {
return data;
};
// BridgeToRedis.prototype.fromDb = function (model, data) {
// var p = this._models[model].properties;
// for (var i in data) {
// if (p[i] && p[i].type.name === 'Date') {
// if (isNaN(parseInt(data[i]))) {
// data[i] = new Date(data[i]);
// } else {
// var ms = data[i];
// data[i] = new Date();
// data[i].setTime(ms);
// }
// } else if (p[i] && [
// 'String', 'Text', 'Number', 'Boolean', 'Date'
// ].indexOf(p[i].type.name) === -1) {
// try {
// data[i] = JSON.parse(data[i]);
// } catch (e) {}
// }
// }
// return data;
// };
BridgeToRedis.prototype.fromDb = function (model, data) {
var p = this._models[model].properties, d;
for (var i in data) {