edit-icon download-icon

Long type

Last Updated: Apr 08, 2018

Table Store provides five data types. The relationship between the Table Store data types and the NodeJS SDK data types is as follows:

Table Store NodeJS SDK Description
String string The basic data type in JavaScript
Integer int64 The data type for NodeJs SDK encapsulation
Dobule number The basic data type in JavaScript
Boolean boolean The basic data type in JavaScript
Binary Buffer The buffer object of NodeJS

int64 type

The Integer type of Table Store is a 64-bit signed integer, which does not have a corresponding data type in JavaScript. Therefore, a data type that can represent a 64-bit signed integer is required for NodeJS.

You can perform the following conversions.

  1. var numberA = TableStore.Long.fromNumber(1000);
  2. var numberB = TableStroe.Long.fromString('2000');
  3. var num = numberA.toNumber();
  4. num = numberA.toString();
  5. var str = numberB.toNumber();
  6. str = numberB.toString();
Thank you! We've received your feedback.