1e41f4b71Sopenharmony_ci# @ohos.data.ValuesBucket (Data Set) 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciThe **ValuesBucket** module defines a data set in key-value (KV) format for inserting data into an RDB store. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8e41f4b71Sopenharmony_ci> 9e41f4b71Sopenharmony_ci> - The APIs of this module can be used only in the stage model. 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci## Modules to Import 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci```ts 15e41f4b71Sopenharmony_ciimport { ValueType, ValuesBucket } from '@kit.ArkData'; 16e41f4b71Sopenharmony_ci``` 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci## ValueType 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_citype ValueType = number | string | boolean 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ciEnumerates the value types allowed by the database. 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci**System capability**: SystemCapability.DistributedDataManager.DataShare.Core 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci| Type | Description | 27e41f4b71Sopenharmony_ci| ------- | -------------------- | 28e41f4b71Sopenharmony_ci| number | The value is a number. | 29e41f4b71Sopenharmony_ci| string | The value is a string.| 30e41f4b71Sopenharmony_ci| boolean | The value is **true** or **false**.| 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci## ValuesBucket 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_citype ValuesBucket = Record<string, ValueType | Uint8Array | null> 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ciDefines the types of the key and value in a KV pair. This type is not multi-thread safe. If a **ValuesBucket** instance is operated by multiple threads at the same time in an application, use a lock for the instance. 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ci**System capability**: SystemCapability.DistributedDataManager.DataShare.Core 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci| Type | Description | 41e41f4b71Sopenharmony_ci| ------------- | --------------------------------------------- | 42e41f4b71Sopenharmony_ci| Record<string, [ValueType](#valuetype) \| Uint8Array \| null> | Types of the key and value in a KV pair. The key type is string, and the value type is [ValueType](#valuetype), Uint8Array, or null. | 43