Skip to main content

Data Types

Cloud development database provides the following data types:

  • String: string
  • Number: number
  • Object: object
  • Array: array
  • Bool: Boolean
  • GeoPoint: Geographic point
  • Date: date
  • Null

Below we provide supplementary explanations for several fields that require additional clarification.

Date

The Date type is used to create client time with millisecond precision and can be created using the built-in Date object in JavaScript. To use server time, you should create a marker for the current server time using the serverDate object provided in the API.

Our database has optimizations specifically for date types, so we recommend that you always use Date or serverDate to construct time objects.

GeoPoint

The GeoPoint` type is used to represent a geographical location point, uniquely identifying a point using latitude and longitude. This is a special data storage type. Note that if you need to query a field of the geographical location type, you must create a geographical index.

Specific geolocation APIs can refer to the Geo API documentation.