openharmony 鸿蒙 capi-oh-values-bucket-h

2026-08-25 浏览 (1)

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

Nametypedef KeywordDescription
OH_VBucketOH_VBucketDefines a struct for the types of the key and value in a KV pair.

Functions

NameDescription
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

NameDescription
OH_VBucket *bucketPointer to the OH_VBucket instance.
const char *fieldPointer to the column name in the database table.
Data_Asset *valuePointer to the value to put.

Returns

TypeDescription
intReturns 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

NameDescription
OH_VBucket *bucketPointer to the OH_VBucket instance.
const char *fieldPointer to the column name in the database table.
Data_Asset **valueDouble pointer to the value to put.
uint32_t countNumber of elements in the Data_Asset object to put.

Returns

TypeDescription
intReturns 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

NameDescription
OH_VBucket *bucketPointer to the OH_VBucket instance.
const char *fieldPointer to the column name in the database table.
const float *vecPointer to the float array to put.
size_t lenLength of the float array to put.

Returns

TypeDescription
intReturns 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

NameDescription
OH_VBucket *bucketPointer to the OH_VBucket instance.
const char *fieldPointer to the column name in the database table.
int signSign notation of the integer object. The value 0 indicates a positive integer, and the value 1 indicates a negative integer.
const uint64_t *trueFormPointer to the integer object to put.
size_t lenLength of the integer object to put.

Returns

TypeDescription
intReturns 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

openharmony 鸿蒙 capi-preferences-oh-preferencespair

openharmony 鸿蒙 errorcode-datashare

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/npRvFEqo