Custom data types

Custom data types

Custom data types allow the definition of custom types. The data of such a type is stored as JSON.

All custom data is stored in its own table, with each record stored only once per _uuid. The _uuid can be provided or will be auto-generated based on the data sent. If that data changes, a new UUID is generated and a new record is stored. The old record is kept in the database as long as it is referenced by any object (including historical versions).

Providing UUID

Custom data can contain a _uuid at the top level of the data. With such an ID, a new UUID is not generated.

Record uniqueness is determined solely by the provided UUID. Sending different data with the same UUID will not update the stored data. To update the stored data, a new UUID must be provided.

Custom data types support search mappings. The search mapping is defined in the manifest.yml of the plugin, which defines the custom data type.

Updates

Custom data types can be updated by a background service. This background service collects all expired custom data and asks a script of the plugin to provide any updates on that data as needed. The updates happen periodically, and the custom data type can provide an expiration date for each record.

Oliko artikkelista apua?

Aiheeseen liittyvää

Tarvitsetko tukea?

Etkö löydä etsimääsi vastausta?
Ota yhteyttä tukeen
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.