Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update .NET type mapping

...

Ignite will provide out-of-box mapping from standard platform types (Java, C#, C++) to built-in primitives. A user will be able to alter this mapping using some external mechanism (e.g. annotations to map long values to Number). Standard mapping is listed in the table below:

Built-inJavaC#.NETC++
Bitmask(n)BitSetbyte[] (question)
Int8byte (Byte if nullable)sbyte
Uint8short with range constraintsbyte
Int16short (Short if nullable)short
Uint16int with range constratintsushort
Int32int (Integer if nullable)int
Uint32long with range constratintsuint
Int64long (Long if nullable)long
Uint64BigInteger with range constratintsulong
Floatfloat (Float if nullable)float
Doubledouble (Double if nullable)double
Number([n])BigIntegerBigInteger
DecimalBigDecimaldecimal
UUIDUUIDGuid
StringStringstring
DateLocalDateNodaTime.LocalDate
TimeLocalTimeNodaTime.LocalTime
DatetimeLocalDateTimeNodaTime.LocalDateTime
InstantDate (Instant?)NodaTime.Instant
BLOBbyte[]byte[]

Java has no native support for unsigned types. We still can introduce 'unsigned' flag to schema type or separate binary type-codes, and allow to map to the closest types of wider range. E.g. map Uint8 → short and recheck constraints during serialization.

...