From 9f22d6cc318077deebc7b07975a1d949180c0559 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Mon, 8 Aug 2022 04:41:24 +0700 Subject: [PATCH] Add `BigInt` storage support into `DBRecord` --- sources/Data/Database/Local/DBRecord.uc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sources/Data/Database/Local/DBRecord.uc b/sources/Data/Database/Local/DBRecord.uc index 2ea4bbc..9f343f0 100644 --- a/sources/Data/Database/Local/DBRecord.uc +++ b/sources/Data/Database/Local/DBRecord.uc @@ -112,7 +112,10 @@ enum DBDataType DBAT_String, // We actually store the name of another `DBRecord` that represents either // sub-array or sub-object. - DBAT_Reference + DBAT_Reference, + // Some integer values we might want to store won't fit into `int`, so we + // store them as `BigIntData` + DBAT_BigInt, }; /** @@ -130,6 +133,9 @@ struct StorageItem var float f; // For both `DBRecord` references and JSON strings var string s; + // For storing `BigInt`'s `BigIntData` - last `byte` stores `negative` + // value + var array b; }; var private config array storage;