| Int128 | UInt128 | |
|---|---|---|
| Range | −170141183460469231731687303715884105728 | |
| to | ||
| 170141183460469231731687303715884105727 | 0 to | |
| 340282366920938463463374607431768211455 | ||
| Parser representation | UserNum(value, suffix) → tryparse as Int128 |
UserNum(value, suffix) → tryparse as UInt128 |
| DB | We believe all Int128 values can be stored and queried in the DB. | |
SqlValue used in dvalToSql/lambdaToSql: int128 |
int128 is a function that takes a int128 and returns an SqlValue.
We are using System.Numerics.BigInteger.op_Implicit to convert it to a bigint
Postgres type used: numeric(39,0) | We believe all UInt128 values can be stored and queried in the DB.
SqlValue used in dvalToSql/lambdaToSql: uint128
uint128 is a function that takes a int128 and returns an SqlValue.
We are using System.Numerics.BigInteger.op_Implicit to convert it to a bigint
Postgres type used: numeric(39,0) |
| JSON | We believe all Int128 values are supported in Json
Serialize: WriteNumberValue
Parse: System.Int128.TryParse(j.GetRawText(), &i128)
| We believe all UInt128 values are supported in Json
Serialize: WriteNumberValue
Parse: System.UInt128.TryParse(j.GetRawText(), &i128)
|
| Serialization | Int128 isn’t built-in supported type in MessagePack. We use bigint to serialize int128.
Creating custom formatters for Int128 would introduce complexity, especially when dealing with endianness and serialization/deserialization processes. | UInt128 isn’t built-in supported type in MessagePack. We use bigint to serialize int128.
Creating custom formatters for UInt128 would introduce complexity, especially when dealing with endianness and serialization/deserialization processes. |
| Tests | Roundtrip tests:
Serialization tests
DB tests: set, query,etc.
Equality tests work | Roundtrip tests: Serialization tests DB tests: set, query,etc.
Equality tests work | | Overflow/Underflow | Addition/Subtraction/Multiplication/…: Raise an out of range RTE
SQLCompiler: NotYetImplemented | Addition/Subtraction/Multiplication/…: Raise an out of range RTE
SQLCompiler: NotYetImplemented | | Missing functions/constants | - conversions from/to other ints
Q unique to dark | Z unique to dark |
| pretty printing | Implemented but not tested yet | Implemented but not tested yet |