Datatypes

Datatypes & Type Check

Deskree datatypes are not database-native types provided by the database company. Instead, it is an abstraction of those types with some additional functionality. We use those values to type-check the data sent via the APIs before it arrives in the database

Below is the list of all current datatypes and their description of use:

Datatype Name
Internal Format
Description
Limitations

UID

UID

Unique identifier of an object

One default column per table

String

String

Any string data including json

<1Mb

Integer

Integer

Any integer values (ex. 10, 12, 16)

64-bit

Float

Float

Any float values (ex. 10.20, 12.10, 16.14)

64-bit

Boolean

Boolean

true or false

Array of Strings

Array<string>

Array containing only string values. (ex. ["one", "two", "three"]

<1Mb

Array of Integers

Array<integer>

Array containing only integer values. (ex. [1, 2, 3]

<1Mb

Array of Floats

Array<float>

Array containing only float values. (ex. [1.2, 2.5, 3.1]

<1Mb

Array of Booleans

Array<boolean>

Array containing only boolean values. (ex. [true, false]

<1Mb

Storage

Storage

Maximum base64 string file size is 4Mb Maximum fileURL size is 50Mb Maxium data stream size is 500Mb

One-to-one reference

Users<string>

One-to-one reference to another object via UID.

One-to-many reference

Users<Array<string>>

One-to-many reference to other objects via UIDs.

Map

Map

Valid Object type

<1Mb

Required Parameters

If a column is set as required, the value must be provided during the API request, otherwise a 422 error will be returned.

In the internal format, those values are marked with ? sign at the end of the data type. For example, an optional String data type will be String?

FAQ

Do you have JSON data type?

There are two ways to save JSON data:

  • It can be saved as a String data type (< 10Mb).

  • It can be saved as a Map data type in a form of a valid JSON object

  • You can also save JSON as a file via Storage data type.

Do you have DateTime data type?

Currently, there is no separate DateTime type available. However, this can be saved and queried/sorted in the database as a String datatype. For instance, createdAt and updatedAt columns have String data type with data in ISO8601 format:

YYYY-MM-DDTHH:mm:ssZ Example:2021-06-29T15:27:34-04:00

Last updated

Copyright © 2023 Deskree Technologies Inc.