From dcada03c43457f28fc0fc9d61aeea7f3f8bb3b80 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Thu, 25 Jul 2013 15:05:49 -0700 Subject: [PATCH] Add precision/scale --- lib/datasource.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/datasource.js b/lib/datasource.js index 979ecb9f..f4a250ae 100644 --- a/lib/datasource.js +++ b/lib/datasource.js @@ -696,7 +696,9 @@ DataSource.prototype.discoverSchemas = function (modelName, options, cb) { schema.properties[propName] = { type: item.type, required: (item.nullable === 'N'), - length: item.dataLength + length: item.dataLength, + precision: item.dataPrecision, + scale: item.dataScale }; if (pks[item.columnName]) { @@ -706,6 +708,8 @@ DataSource.prototype.discoverSchemas = function (modelName, options, cb) { columnName: i.columnName, dataType: i.dataType, dataLength: i.dataLength, + dataPrecision: item.dataPrecision, + dataScale: item.dataScale, nullable: i.nullable }; });