harmony 鸿蒙relational_store.h

2023-10-30 浏览 (613)

relational_store.h

Overview

Provides APIs to manage a relational database (RDB) store.

Since

10

Related Modules

RDB

Summary

Structs

NameDescription
OH_Rdb_ConfigDefines the RDB store configuration.
OH_Rdb_StoreDefines the RDB store type.

Types

NameDescription
OH_Rdb_SecurityLevelDefines the RDB store security levels.

Enums

NameDescription
OH_Rdb_SecurityLevel { S1 = 1, S2, S3, S4 }Enumerates the RDB store security levels.

Functions

NameDescription
OH_Rdb_CreateValueObject (void)Creates an OH_VObject instance.
OH_Rdb_CreateValuesBucket (void)Creates an OH_VBucket instance.
OH_Rdb_CreatePredicates (const char *table)Creates an OH_Predicates instance.
OH_Rdb_GetOrOpen (const OH_Rdb_Config *config, int *errCode)Obtains an OH_Rdb_Store instance for RDB store operations.
OH_Rdb_CloseStore (OH_Rdb_Store *store)Destroys an OH_Rdb_Store object and reclaims the memory occupied by the object.
OH_Rdb_DeleteStore (const OH_Rdb_Config *config)Deletes an RDB store with the specified database file configuration.
OH_Rdb_Insert (OH_Rdb_Store *store, const char *table, OH_VBucket *valuesBucket)Inserts a row of data into a table.
OH_Rdb_Update (OH_Rdb_Store *store, OH_VBucket *valuesBucket, OH_Predicates *predicates)Updates data in an RDB store based on specified conditions.
OH_Rdb_Delete (OH_Rdb_Store *store, OH_Predicates *predicates)Deletes data from an RDB store based on specified conditions.
OH_Rdb_Query (OH_Rdb_Store *store, OH_Predicates *predicates, const char *const *columnNames, int length)Queries data in an RDB store based on specified conditions.
OH_Rdb_Execute (OH_Rdb_Store *store, const char *sql)Executes the SQL statement that returns no value.
OH_Rdb_ExecuteQuery (OH_Rdb_Store *store, const char *sql)Queries data in an RDB store based on the SQL statements executed.
OH_Rdb_BeginTransaction (OH_Rdb_Store *store)Starts the transaction before executing the SQL statements.
OH_Rdb_RollBack (OH_Rdb_Store *store)Rolls back the SQL statements executed.
OH_Rdb_Commit (OH_Rdb_Store *store)Commits the executed SQL statements.
OH_Rdb_Backup (OH_Rdb_Store *store, const char *databasePath)Backs up the RDB store in the specified path.
OH_Rdb_Restore (OH_Rdb_Store *store, const char *databasePath)Restores an RDB store from the specified database backup file.
OH_Rdb_GetVersion (OH_Rdb_Store *store, int *version)Obtains the RDB store version.
OH_Rdb_SetVersion (OH_Rdb_Store *store, int version)Sets the RDB store version.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

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