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:
<ingest:ingestRecords 
      xmlns:ingest="http://www.endeca.com/MDEX/ingest/1/0" 
      xmlns:mdex="http://www.endeca.com/MDEX/XQuery/2009/09">
   <ingest:addAssignments>
      <mdex:record>
         <FactSalesID>504</FactSalesID>
         <Price type="mdex:double">19.99</Price>
         <NumInStock type="mdex:int">45</NumInStock>
         <TotalSold type="mdex:long">92233720</TotalSold>
      </mdex:record>
   </ingest:addAssignments>
</ingest:ingestRecords>