oh_values_bucket.h
Overview
Defines the types of the key and value in a KV pair.
File to include: <database/rdb/oh_values_bucket.h>
Library: libnative_rdb_ndk.z.so
System capability: SystemCapability.DistributedDataManager.RelationalStore.Core
Since: 10
Related module: RDB
Summary
Structs
| Name | typedef Keyword | Description |
|---|---|---|
| OH_VBucket | OH_VBucket | Defines a struct for the types of the key and value in a KV pair. |
Functions
| Name | Description |
|---|---|
| int OH_VBucket_PutAsset(OH_VBucket *bucket, const char *field, Data_Asset *value) | Puts a Data_Asset object into the OH_VBucket object in the given column. |
| int OH_VBucket_PutAssets(OH_VBucket *bucket, const char *field, Data_Asset **value, uint32_t count) | Puts an array of Data_Asset objects into the OH_VBucket object in the given column. |
| int OH_VBucket_PutFloatVector(OH_VBucket *bucket, const char *field, const float *vec, size_t len) | Puts a float array into an OH_VBucket object in the given column. |
| int OH_VBucket_PutUnlimitedInt(OH_VBucket *bucket, const char *field, int sign, const uint64_t *trueForm, size_t len) | Puts an integer of any length into an OH_VBucket object in the given column. |
Function Description
OH_VBucket_PutAsset()
int OH_VBucket_PutAsset(OH_VBucket *bucket, const char *field, Data_Asset *value)
Description
Puts a Data_Asset object into the OH_VBucket object in the given column.
Since: 11
Parameters
| Name | Description |
|---|---|
| OH_VBucket *bucket | Pointer to the OH_VBucket instance. |
| const char *field | Pointer to the column name in the database table. |
| Data_Asset *value | Pointer to the value to put. |
Returns
| Type | Description |
|---|---|
| int | Returns RDB_OK if the operation is successful; returns an error code otherwise. RDB_OK indicates that the operation is successful. RDB_E_INVALID_ARGS indicates invalid parameters are specified. |
OH_VBucket_PutAssets()
int OH_VBucket_PutAssets(OH_VBucket *bucket, const char *field, Data_Asset **value, uint32_t count)
Description
Puts an array of Data_Asset objects into the OH_VBucket object in the given column.
Since: 11
Parameters
| Name | Description |
|---|---|
| OH_VBucket *bucket | Pointer to the OH_VBucket instance. |
| const char *field | Pointer to the column name in the database table. |
| Data_Asset **value | Double pointer to the value to put. |
| uint32_t count | Number of elements in the Data_Asset object to put. |
Returns
| Type | Description |
|---|---|
| int | Returns RDB_OK if the operation is successful; returns an error code otherwise. RDB_OK indicates that the operation is successful. RDB_E_INVALID_ARGS indicates invalid parameters are specified. |
See
OH_VBucket
OH_VBucket_PutFloatVector()
int OH_VBucket_PutFloatVector(OH_VBucket *bucket, const char *field, const float *vec, size_t len)
Description
Puts a float array into an OH_VBucket object in the given column.
Since: 18
Parameters
| Name | Description |
|---|---|
| OH_VBucket *bucket | Pointer to the OH_VBucket instance. |
| const char *field | Pointer to the column name in the database table. |
| const float *vec | Pointer to the float array to put. |
| size_t len | Length of the float array to put. |
Returns
| Type | Description |
|---|---|
| int | Returns RDB_OK if the operation is successful; returns an error code otherwise. RDB_OK indicates that the operation is successful. RDB_E_INVALID_ARGS indicates invalid parameters are specified. |
See
OH_VBucket
OH_VBucket_PutUnlimitedInt()
int OH_VBucket_PutUnlimitedInt(OH_VBucket *bucket, const char *field, int sign, const uint64_t *trueForm, size_t len)
Description
Puts an integer of any length into an OH_VBucket object in the given column.
Since: 18
Parameters
| Name | Description |
|---|---|
| OH_VBucket *bucket | Pointer to the OH_VBucket instance. |
| const char *field | Pointer to the column name in the database table. |
| int sign | Sign notation of the integer object. The value 0 indicates a positive integer, and the value 1 indicates a negative integer. |
| const uint64_t *trueForm | Pointer to the integer object to put. |
| size_t len | Length of the integer object to put. |
Returns
| Type | Description |
|---|---|
| int | Returns RDB_OK if the operation is successful; returns an error code otherwise. RDB_OK indicates that the operation is successful. RDB_E_INVALID_ARGS indicates invalid parameters are specified. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 js-apis-distributedKVStore-sys
openharmony 鸿蒙 capi-oh-preferences-h
openharmony 鸿蒙 capi-udmf-oh-udshyperlink
openharmony 鸿蒙 js-apis-data-dataSharePredicates
openharmony 鸿蒙 capi-udmf-oh-udsappitem
openharmony 鸿蒙 capi-rdb-oh-data-vbuckets
openharmony 鸿蒙 capi-rdb-oh-predicates
openharmony 鸿蒙 capi-rdb-oh-data-value