提交 cf25d58d 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 5b738c8c
......@@ -7,6 +7,7 @@
- [Drawing](_drawing.md)
- [Image](image.md)
- [Rawfile](rawfile.md)
- [RDB](_r_d_b.md)
- [MindSpore](_mind_spore.md)
- [NeuralNeworkRuntime](_neural_nework_runtime.md)
- [AudioDecoder](_audio_decoder.md)
......@@ -58,6 +59,12 @@
- [native_huks_api.h](native__huks__api_8h.md)
- [native_huks_param.h](native__huks__param_8h.md)
- [native_huks_type.h](native__huks__type_8h.md)
- [oh_cursor.h](oh__cursor_8h.md)
- [oh_predicates.h](oh__predicates_8h.md)
- [oh_value_object.h](oh__value__object_8h.md)
- [oh_values_bucket.h](oh__values__bucket_8h.md)
- [relational_store_error_code.h](relational__store__error__code_8h.md)
- [relational_store.h](relational__store_8h.md)
- [syscap_ndk.h](syscap__ndk_8h.md)
- [purgeable_memory.h](purgeable__memory_8h.md)
- Structs
......@@ -95,3 +102,9 @@
- [OH_Huks_ParamSet](_o_h___huks___param_set.md)
- [OH_Huks_PubKeyInfo](_o_h___huks___pub_key_info.md)
- [OH_Huks_Result](_o_h___huks___result.md)
- [OH_Cursor](_o_h___cursor.md)
- [OH_Predicates](_o_h___predicates.md)
- [OH_Rdb_Config](_o_h___rdb___config.md)
- [OH_Rdb_Store](_o_h___rdb___store.md)
- [OH_VBucket](_o_h___v_bucket.md)
- [OH_VObject](_o_h___v_object.md)
# OH_Cursor
## Overview
Defines a result set.
It provides APIs to access the result set obtained by querying the RDB store.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [id](_r_d_b.md) | Unique identifier of the **OH_Cursor** struct.|
| [getColumnCount](_r_d_b.md#getcolumncount) | Pointer to the function used to obtain the number of columns in the result set.|
| [getColumnType](_r_d_b.md#getcolumntype) | Pointer to the function used to obtain the column type based on the specified column index.|
| [getColumnIndex](_r_d_b.md#getcolumnindex) | Pointer to the function used to obtain the column index based on the specified column name.|
| [getColumnName](_r_d_b.md#getcolumnname) | Pointer to the function used to obtain the column name based on the specified column index.|
| [getRowCount](_r_d_b.md#getrowcount) | Pointer to the function used to obtain the number of rows in the result set.|
| [goToNextRow](_r_d_b.md#gotonextrow) | Pointer to the function used to go to the next row of the result set.|
| [getSize](_r_d_b.md#getsize) | Pointer to the function used to obtain information about the memory required when the column data type in the result set is **BLOB** or **TEXT**.|
| [getText](_r_d_b.md#gettext) | Pointer to the function used to obtain the value in the form of a string based on the specified column and the current row.|
| [getInt64](_r_d_b.md#getint64) | Pointer to the function used to obtain the value of the int64_t type based on the specified column and the current row.|
| [getReal](_r_d_b.md#getreal) | Pointer to the function used to obtain the value of the double type based on the specified column and the current row.|
| [getBlob](_r_d_b.md#getblob) | Pointer to the function used to obtain the value in the form of a byte array based on the specified column and the current row.|
| [isNull](_r_d_b.md#isnull-12) | Pointer to the function used to check whether the value in the specified column is null.|
| [close](_r_d_b.md#close) | Pointer to the function used to close a result set.|
# OH_Predicates
## Overview
Defines the predicates.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [id](_r_d_b.md#id-14) | Unique identifier of the **OH_Predicates** struct.|
| [equalTo](_r_d_b.md#equalto) | Pointer to the function used to set a predicates object to match the field whose value is equal to the specified value.|
| [notEqualTo](_r_d_b.md#notequalto) | Pointer to the function used to set a predicates object to match the field whose value is not equal to the specified value.|
| [beginWrap](_r_d_b.md#beginwrap) | Pointer to the function used to add a left parenthesis to the predicates.|
| [endWrap](_r_d_b.md#endwrap) | Pointer to the function used to add a right parenthesis to the predicates.|
| [orOperate](_r_d_b.md#oroperate) | Pointer to the function used to add the OR operator to the predicates.|
| [andOperate](_r_d_b.md#andoperate) | Pointer to the function used to add the AND operator to the predicates.|
| [isNull](_r_d_b.md#isnull-22) | Pointer to the function used to set a predicates object to match the field whose value is null.|
| [isNotNull](_r_d_b.md#isnotnull) | Pointer to the function used to set a predicates object to match the field whose value is not null.|
| [like](_r_d_b.md#like) | Pointer to the function used to set a predicates object to match a string that is similar to the specified value.|
| [between](_r_d_b.md#between) | Pointer to the function used to set a predicates object to match the field whose value is within the specified range.|
| [notBetween](_r_d_b.md#notbetween) | Pointer to the function used to set a predicates object to match the field whose value is out of the specified range.|
| [greaterThan](_r_d_b.md#greaterthan) | Pointer to the function used to set a predicates object to match the field with value greater than the specified value.|
| [lessThan](_r_d_b.md#lessthan) | Pointer to the function used to set a predicates object to match the field with value less than the specified value.|
| [greaterThanOrEqualTo](_r_d_b.md#greaterthanorequalto) | Pointer to the function used to set a predicates object to match the field with value greater than or equal to the specified value.|
| [lessThanOrEqualTo](_r_d_b.md#lessthanorequalto) | Pointer to the function used to set a predicates object to match the field with value less than or equal to the specified value.|
| [orderBy](_r_d_b.md#orderby) | Pointer to the function used to set a predicates object to sort the values in a column in ascending or descending order.|
| [distinct](_r_d_b.md#distinct) | Pointer to the function used to set a predicates object to filter out duplicate records.|
| [limit](_r_d_b.md#limit) | Pointer to the function used to set a predicates object to specify the maximum number of records.|
| [offset](_r_d_b.md#offset) | Pointer to the function used to set a predicates object to specify the start position of the returned result.|
| [groupBy](_r_d_b.md#groupby) | Pointer to the function used to set a predicates object to group rows that have the same value into summary rows.|
| [in](_r_d_b.md#in) | Pointer to the function used to set a predicates object to match the field with the value within the specified range.|
| [notIn](_r_d_b.md#notin) | Pointer to the function used to set a predicates object to match the field with the value out of the specified range.|
| [clear](_r_d_b.md#clear-12) | Pointer to the function used to clear a predicates instance.|
| [destroyPredicates](_r_d_b.md#destroypredicates) | Destroys an **OH_Predicates** object and reclaims the memory occupied.|
# OH_Rdb_Config
## Overview
Defines the RDB store configuration.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [path](_r_d_b.md#path) | Path of the database file.|
| [isEncrypt](_r_d_b.md#isencrypt) | Whether to encrypt the RDB store.|
| [securityLevel](_r_d_b.md#securitylevel) | RDB store security level [OH_Rdb_SecurityLevel](_r_d_b.md#oh_rdb_securitylevel).|
# OH_Rdb_Store
## Overview
Defines the RDB store type.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [id](_r_d_b.md#id-44) | Unique identifier of the **OH_Rdb_Store** struct.|
# OH_VBucket
## Overview
Defines the types of the key and value in a KV pair.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [id](_r_d_b.md#id-34) | Unique identifier of the **OH_VBucket** struct.|
| [capability](_r_d_b.md#capability) | Number of the KV pairs in the struct.|
| [putText](_r_d_b.md#puttext-12) | Puts a char value into the **OH_VBucket** object in the given column.|
| [putInt64](_r_d_b.md#putint64-12) | Puts an int64_t value into the **OH_VBucket** object in the given column.|
| [putReal](_r_d_b.md#putreal) | Puts a double value into the **OH_VBucket** object in the given column.|
| [putBlob](_r_d_b.md#putblob) | Puts a const uint8_t value into the **OH_VBucket** object in the given column.|
| [putNull](_r_d_b.md#putnull) | Puts a null value into the **OH_VBucket** object in the given column.|
| [clear](_r_d_b.md#clear-22) | Clears an **OH_VBucket** object.|
| [destroyValuesBucket](_r_d_b.md#destroyvaluesbucket) | Destroys an **OH_VBucket** object and reclaims the memory occupied.|
# OH_VObject
## Overview
Defines the allowed data field types.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Member Variables
| Name| Description|
| -------- | -------- |
| [id](_r_d_b.md#id-24) | Unique identifier of the **OH_VObject** struct.|
| [putInt64](_r_d_b.md#putint64-22) | Converts a single parameter or an array of the int64 type into a value of the OH_VObject type.|
| [putDouble](_r_d_b.md#putdouble) | Converts a single parameter or an array of the int64 type into a value of the OH_VObject type.|
| [putText](_r_d_b.md#puttext-22) | Converts a character array of the char type to a value of the OH_VObject type.|
| [putTexts](_r_d_b.md#puttexts) | Converts a string array of the char type to a value of the OH_VObject type.|
| [destroyValueObject](_r_d_b.md#destroyvalueobject) | Destroys an OH_VObject object and reclaims the memory occupied.|
此差异已折叠。
# oh_cursor.h
## Overview
Provides APIs to access the result set obtained by querying the RDB store.
A result set is a set of results returned by **query()**.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OH_Cursor](_o_h___cursor.md) | Defines a result set.|
### Types
| Name| Description|
| -------- | -------- |
| [OH_Cursor](_r_d_b.md#oh_cursor) | Indicates a result set.|
### Enums
| Name| Description|
| -------- | -------- |
| [OH_ColumnType](_r_d_b.md#oh_columntype)&nbsp;{<br>TYPE_NULL&nbsp;=&nbsp;0,&nbsp;TYPE_INT64,&nbsp;TYPE_REAL,&nbsp;TYPE_TEXT,<br>TYPE_BLOB<br>} | Enumerates the field types in an RDB store.|
# oh_predicates.h
## Overview
Defines the predicates for RDB stores.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OH_Predicates](_o_h___predicates.md) | Defines a **predicates** object. |
### Types
| Name| Description|
| -------- | -------- |
| [OH_Predicates](_r_d_b.md#oh_predicates) | Indicates a **predicates** object. |
### Enums
| Name| Description|
| -------- | -------- |
| [OH_OrderType](_r_d_b.md#oh_ordertype)&nbsp;{&nbsp;ASC&nbsp;=&nbsp;0,&nbsp;DESC&nbsp;=&nbsp;1&nbsp;} | Enumerates the sorting types.|
# oh_value_object.h
## Overview
Provides type conversion methods.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OH_VObject](_o_h___v_object.md) | Defines the allowed data field types.|
### Types
| Name| Description|
| -------- | -------- |
| [OH_VObject](_r_d_b.md#oh_vobject) | Indicates the allowed data field types. |
# oh_values_bucket.h
## Overview
Defines the types of the key and value in a key-value (KV) pair.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OH_VBucket](_o_h___v_bucket.md) | Defines the types of the key and value in a KV pair.|
### Types
| Name| Description|
| -------- | -------- |
| [OH_VBucket](_r_d_b.md#oh_vbucket) | Indicates the types of the key and value in a KV pair. |
# relation_store.h
## Overview
Provides APIs to manage a relational database (RDB) store.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Structs
| Name| Description|
| -------- | -------- |
| [OH_Rdb_Config](_o_h___rdb___config.md) | Defines the RDB store configuration.|
| [OH_Rdb_Store](_o_h___rdb___store.md) | Defines the RDB store type.|
### Enums
| Name| Description|
| -------- | -------- |
| [OH_Rdb_SecurityLevel](_r_d_b.md#oh_rdb_securitylevel) { S1 = 1, S2, S3, S4 } | Enumerates the RDB store security levels.|
### Functions
| Name| Description|
| -------- | -------- |
| [OH_Rdb_CreateValueObject](_r_d_b.md#oh_rdb_createvalueobject) (void) | Creates an [OH_VObject](_o_h___v_object.md) instance.|
| [OH_Rdb_CreateValuesBucket](_r_d_b.md#oh_rdb_createvaluesbucket) (void) | Creates an [OH_VBucket](_o_h___v_bucket.md) instance.|
| [OH_Rdb_CreatePredicates](_r_d_b.md#oh_rdb_createpredicates) (const char \*table) | Creates an [OH_Predicates](_o_h___predicates.md) instance.|
| [OH_Rdb_GetOrOpen](_r_d_b.md#oh_rdb_getoropen) (const [OH_Rdb_Config](_o_h___rdb___config.md) \*config, int \*errCode) | Obtains an [OH_Rdb_Store](_o_h___rdb___store.md) instance for RDB store operations.|
| [OH_Rdb_CloseStore](_r_d_b.md#oh_rdb_closestore) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | Destroys an [OH_Rdb_Store](_o_h___rdb___store.md) object and reclaims the memory occupied by the object.|
| [OH_Rdb_DeleteStore](_r_d_b.md#oh_rdb_deletestore) (const char \*path) | Deletes an RDB store with the specified database file configuration.|
| [OH_Rdb_Insert](_r_d_b.md#oh_rdb_insert) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*table, [OH_VBucket](_o_h___v_bucket.md) \*valuesBucket) | Inserts a row of data into a table.|
| [OH_Rdb_Update](_r_d_b.md#oh_rdb_update) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_VBucket](_o_h___v_bucket.md) \*valuesBucket, [OH_Predicates](_o_h___predicates.md) \*predicates) | Updates data in an RDB store based on specified conditions.|
| [OH_Rdb_Delete](_r_d_b.md#oh_rdb_delete) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_Predicates](_o_h___predicates.md) \*predicates) | Deletes data from an RDB store based on specified conditions.|
| [OH_Rdb_Query](_r_d_b.md#oh_rdb_query) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_Predicates](_o_h___predicates.md) \*predicates, const char \*const \*columnNames, int length) | Queries data in an RDB store based on specified conditions.|
| [OH_Rdb_Execute](_r_d_b.md#oh_rdb_execute) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*sql) | Executes the SQL statement that returns no value.|
| [OH_Rdb_ExecuteQuery](_r_d_b.md#oh_rdb_executequery) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*sql) | Queries data in an RDB store based on the SQL statements executed.|
| [OH_Rdb_BeginTransaction](_r_d_b.md#oh_rdb_begintransaction) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | Starts the transaction before executing the SQL statements.|
| [OH_Rdb_RollBack](_r_d_b.md#oh_rdb_rollback) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | Rolls back the SQL statements executed. |
| [OH_Rdb_Commit](_r_d_b.md#oh_rdb_commit) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | Commits the executed SQL statements.|
| [OH_Rdb_Backup](_r_d_b.md#oh_rdb_backup) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*databasePath) | Backs up the RDB store in the specified path.|
| [OH_Rdb_Restore](_r_d_b.md#oh_rdb_restore) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*databasePath) | Restores an RDB store from the specified database backup file.|
| [OH_Rdb_GetVersion](_r_d_b.md#oh_rdb_getversion) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, int \*version) | Obtains the RDB store version.|
| [OH_Rdb_SetVersion](_r_d_b.md#oh_rdb_setversion) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, int version) | Sets the RDB store version.|
# relation_error_code.h
## Overview
Declares the error codes used for relational database (RDB) stores.
**Since**
10
**Related Modules**
[RDB](_r_d_b.md)
## Summary
### Enums
| Name| Description|
| -------- | -------- |
| [OH_Rdb_ErrCode](_r_d_b.md#oh_rdb_errcode)&nbsp;{&nbsp;RDB_ERR_INVALID_ARGS&nbsp;=&nbsp;-2,&nbsp;RDB_ERR&nbsp;=&nbsp;-1,&nbsp;RDB_ERR_OK&nbsp;=&nbsp;0&nbsp;} | Enumerates the RDB store error codes. |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册