openharmony 鸿蒙 capi-oh-data-values-buckets-h

2026-08-25 浏览 (1)

oh_data_values_buckets.h

Overview

Defines structs, APIs, and enums related to stored data values.

File to include: <database/data/oh_data_values_buckets.h>

Library: libnative_rdb_ndk.z.so

System capability: SystemCapability.DistributedDataManager.RelationalStore.Core

Since: 18

Related module: RDB

Summary

Structs

Nametypedef KeywordDescription
OH_Data_VBucketsOH_Data_VBucketsDefines the OH_Data_VBuckets struct.

Functions

NameDescription
OH_Data_VBuckets *OH_VBuckets_Create(void)Creates an OH_Data_VBuckets instance.
int OH_VBuckets_Destroy(OH_Data_VBuckets *buckets)Destroys an OH_Data_VBuckets instance.
int OH_VBuckets_PutRow(OH_Data_VBuckets *buckets, const OH_VBucket *row)Adds data of the OH_VBucket type to an OH_Data_VBuckets instance.
int OH_VBuckets_PutRows(OH_Data_VBuckets *buckets, const OH_Data_VBuckets *rows)Adds data of the OH_Data_VBuckets type to an OH_Data_VBuckets instance.
int OH_VBuckets_RowCount(OH_Data_VBuckets *buckets, size_t *count)Obtains the number of OH_VBuckets in an OH_Data_VBuckets instance.

Function Description

OH_VBuckets_Create()

OH_Data_VBuckets *OH_VBuckets_Create(void)

Description

Creates an OH_Data_VBuckets instance.

Since: 18

Returns

TypeDescription
OH_Data_VBucketsReturns a pointer to the OH_Data_VBuckets instance if the operation is successful; returns nullptr otherwise.
Use OH_VBuckets_Destroy to release the memory in time.

OH_VBuckets_Destroy()

int OH_VBuckets_Destroy(OH_Data_VBuckets *buckets)

Description

Destroys an OH_Data_VBuckets instance.

Since: 18

Parameters

NameDescription
OH_Data_VBuckets *bucketsPointer to the OH_Data_VBuckets instance.

Returns

TypeDescription
intReturns an error code.
RDB_OK indicates the operation is successful.
RDB_E_INVALID_ARGS indicates that invalid parameters are specified.

OH_VBuckets_PutRow()

int OH_VBuckets_PutRow(OH_Data_VBuckets *buckets, const OH_VBucket *row)

Description

Adds data of the OH_VBucket type to an OH_Data_VBuckets instance.

Since: 18

Parameters

NameDescription
OH_Data_VBuckets *bucketsPointer to the OH_Data_VBuckets instance.
const OH_VBucket *rowPointer to the OH_VBucket instance.

Returns

TypeDescription
intReturns an error code.
RDB_OK indicates the operation is successful.
RDB_E_INVALID_ARGS indicates that invalid parameters are specified.

OH_VBuckets_PutRows()

int OH_VBuckets_PutRows(OH_Data_VBuckets *buckets, const OH_Data_VBuckets *rows)

Description

Adds data of the OH_Data_VBuckets type to an OH_Data_VBuckets instance.

Since: 18

Parameters

NameDescription
OH_Data_VBuckets *bucketsPointer to the OH_Data_VBuckets instance.
const OH_Data_VBuckets *rowsPointer to the OH_Data_VBuckets instance.

Returns

TypeDescription
intReturns an error code.
RDB_OK indicates the operation is successful.
RDB_E_INVALID_ARGS indicates that invalid parameters are specified.

OH_VBuckets_RowCount()

int OH_VBuckets_RowCount(OH_Data_VBuckets *buckets, size_t *count)

Description

Obtains the number of OH_VBuckets in an OH_Data_VBuckets instance.

Since: 18

Parameters

NameDescription
OH_Data_VBuckets *bucketsPointer to the OH_Data_VBuckets instance.
size_t *countPointer to the number of OH_VBuckets in an OH_Data_VBuckets instance.

Returns

TypeDescription
intReturns an error code.
RDB_OK indicates the operation is successful.
RDB_E_INVALID_ARGS indicates that 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/hkK6L889