Javascript DynamoDB Data Types
Introduction to Javascript DynamoDB Data Types
This blog is mainly concerned with the different Javascript DynamoDB Data Types. A variety of basic.NET data types and collections data types supports by the same. A list of all the primitive data types present in the same is:
- byte – It stores the numeric value of 8 bits. Eg: 12
- DateTime – It is useful in storing date and time values. Eg: “dd-mm-yy” and “HH-mm-ss”
- bool – It is basically used for returning the True and False values. Eg: True and False
- char – It stores characters of 1 byte. Eg: ‘a’
- double – It stores decimal numbers with more precision. Eg: 1.234
- float – It stores decimals with less precision. Eg: 1.23
- Guid – It stores strings having up to 128 bits. Eg: ‘Study Experts’
- Int16 – It stores the numeric value of 16 bits. Eg: 128
These all are the list of common data types in Javascript DynamoDB. Other primitive data types in the same are String, Int32, Int64, SByte, UInt16, UInt32, and UInt64.
All of these data types are associated with some specific mapping pattern. All integer, double, and float data types mostly deal with the number type. The bool data type represents the value in the format of 0 and 1 meaning True and False respectively. The DateTime values are useful as strings using the ISO-8601 encoding. The Guid, and char are string-type data types. At last List, HashSet, and array are part of the collection library and represent the binary set, string set, and number set respectively.
Boolean, null, list, and map types from DynamoDB are mapped to the.NET document model API using types defined by the AWS SDK for.NET:
- For Boolean types, use DynamoDBBool.
- Use DynamoDBNull if the type is null.
- You should use DynamoDBList for lists.
- Apply the Document map type.
Also Read: AlphaStar: Strategy game StarCraft II expertise