3e74d0d8创建于 2025年12月15日历史提交

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

Name typedef Keyword Description
OH_Data_VBuckets OH_Data_VBuckets Defines the OH_Data_VBuckets struct.

Functions

Name Description
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

Type Description
OH_Data_VBuckets Returns 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

Name Description
OH_Data_VBuckets *buckets Pointer to the OH_Data_VBuckets instance.

Returns

Type Description
int Returns 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

Name Description
OH_Data_VBuckets *buckets Pointer to the OH_Data_VBuckets instance.
const OH_VBucket *row Pointer to the OH_VBucket instance.

Returns

Type Description
int Returns 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

Name Description
OH_Data_VBuckets *buckets Pointer to the OH_Data_VBuckets instance.
const OH_Data_VBuckets *rows Pointer to the OH_Data_VBuckets instance.

Returns

Type Description
int Returns 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

Name Description
OH_Data_VBuckets *buckets Pointer to the OH_Data_VBuckets instance.
size_t *count Pointer to the number of OH_VBuckets in an OH_Data_VBuckets instance.

Returns

Type Description
int Returns an error code.
RDB_OK indicates the operation is successful.
RDB_E_INVALID_ARGS indicates that invalid parameters are specified.