extractor: enable numeric for multi table data format (#2977)

This commit is contained in:
Remy 2019-09-24 11:42:15 +02:00 committed by GitHub
parent 2644c98508
commit 141f1e8940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -303,10 +303,7 @@ object Queries {
)
case V.ValueInt64(value) => Fragment("?", value)
case V.ValueNumeric(value) =>
// FixMe: https://github.com/digital-asset/daml/issues/2289
// For now all the ValueNumeric should have scale 10
// Check this code once it is possible to create Numerics with different scale
Fragment("?::numeric(38,10)", value: BigDecimal)
Fragment(s"?::numeric(38,${value.scale})", value: BigDecimal)
case V.ValueText(value) => Fragment("?", value)
case ts @ V.ValueTimestamp(_) => Fragment("?", ts)
case V.ValueParty(value) => Fragment("?", value: String)

View File

@ -6,6 +6,9 @@ daml 1.2 module PrimitiveTypes where
import DA.Date
import DA.TextMap as TM
-- FixMe: https://github.com/digital-asset/daml/issues/2289
-- add test for Numerics once the compiler can produce them,
template BasicPrimitiveTypes
with
reference: Text