phillipcheng / log.analysis

1 stars 15 forks source link

Fix bug: can't generate type decimal(0,0) #144

Closed hanzac closed 7 years ago

hanzac commented 7 years ago

Now it supports precision and scale, e.g.

{ "tableId" : { "headerColumnName" : "Table" }, "tableName" : { "headerColumnName" : "Table Descript" }, "fields" : [ { "idHeaderColumnName" : "Counter", "headerColumnName" : "Field Name", "fieldTypeHeaderColumnName" : "Unit" } ], "fieldTypeMapping" : { "number" : "numeric", "kilo-number" : "numeric(4)", "0.001number" : "numeric(4,3)", } }

If decided type is numeric, then use default precision and scale, which are (37,15) If decided type is numeric(4), then precision is 4, scale is 15 If decided type is numeric(4,3), then precision is 4, scale is 3