UUID types
Unlike collections, which assign a default _id value to each document, the Data API does not assign default identifiers or default values to rows in tables.
Each table’s primary key is the unique identifier for that table’s rows.
To store explicitly-typed UUID data in a table, the Data API fully supports the uuid type and partially supports the timeuuid type.
uuid
The uuid type accepts all UUID versions.
Client behavior:
-
Python: Accepts
str,UUID, andastrapy.ids.uuid*. Returnsastrapy.ids.UUID, which is an alias for stdlibuuid.UUID. -
TypeScript: Accepts
UUIDor strings in UUID format, including dashes, such as"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". ReturnsUUID. -
Java: Accepts and returns
java.util.UUID.
timeuuid (partial support)
|
The Data API can’t create columns of The Data API can only read, write, update, and delete values in existing |
timeuuid is a specific type of UUID that includes timestamp information.
timeuuid data is returned and accepted as a JSON string.
objectId (unsupported)
objectId is not supported in tables.
You can store such hexidecimal strings in tables, but they are not recognized or handled as a true objectId.