numeric properties

The Dgraph records can have three numeric properties.

The three numeric properties are:
  • mdex:int
  • mdex:long
  • mdex:double

int properties

An mdex:int property represents a 32-bit signed integer. It has a minimum value of -2147483648 and a maximum value of 2147483647 (inclusive).

long properties

An mdex:long property represents a 64-bit signed integer. It has a minimum value of -9223372036854775808 and a maximum value of 9223372036854775807 (inclusive).

double properties

An mdex:double property represents a floating point value. Values can be specified in a decimal-point format (such as 20.0) or in a scientific notation format using "e" or "E" (such as 2.0E1).

Example of ingesting numeric properties

This example shows how to use the numeric property types for record assignments:
<ns:ingestChanges>
<ns:updateRecords>
 <ns:recordSpecifier>FactSalesID='568'</ns:recordSpecifier>
   <ns:addAssignments>
     <ns1:attribute name="Price" type="mdex:double">19.99</ns1:attribute>
     <ns1:attribute name="NumInStock" type="mdex:int">45</ns1:attribute>
     <ns1:attribute name="TotalSold" type="mdex:long">92233720</ns1:attribute>
    </ns:addAssignments>
   </ns:updateRecords>
 </ns:ingestChanges>