提交 210f4b34 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 806973ac
......@@ -36,4 +36,4 @@ It provides APIs to access the result set obtained by querying the RDB store.
| [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.|
| [destroy](_r_d_b.md#destroy-14) | Pointer to the function used to close a result set.|
......@@ -3,7 +3,7 @@
## Overview
Defines the predicates.
Defines the predicates used for RDB stores.
**Since**
......@@ -45,4 +45,4 @@ Defines the predicates.
| [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.|
| [destroy](_r_d_b.md#destroy-24) | Destroys an **OH_Predicates** object and reclaims the memory occupied.|
......@@ -21,6 +21,9 @@ Defines the RDB store configuration.
| Name| Description|
| -------- | -------- |
| [path](_r_d_b.md#path) | Path of the database file.|
| [selfSize](_r_d_b.md#selfsize) | Size of the struct.|
| [dataBaseDir](_r_d_b.md#databasedir) | Path of the database file.|
| [bundleName](_r_d_b.md#bundlename) | Bundle name.|
| [moduleName](_r_d_b.md#modulename) | Module name. |
| [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).|
| [securityLevel](_r_d_b.md#securitylevel) | Security level of the RDB store.|
......@@ -29,4 +29,4 @@ Defines the types of the key and value in a KV pair.
| [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.|
| [destroy](_r_d_b.md#destroy-34) | Destroys an **OH_VBucket** object and reclaims the memory occupied.|
......@@ -26,4 +26,4 @@ Defines the allowed data field types.
| [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.|
| [destroy](_r_d_b.md#destroy-44) | Destroys an OH_VObject object and reclaims the memory occupied.|
......@@ -5,7 +5,7 @@
The relational database (RDB) store manages data based on relational models. The RDB store provides a complete mechanism for managing local databases based on the underlying SQLite. It provides a series of methods for performing operations, such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements to satisfy different needs in complicated scenarios.
\@syscap SystemCapability.DistributedDataManager.RelationalStore.Core
\@SystemCapability.DistributedDataManager.RelationalStore.Core
**Since**
......@@ -19,11 +19,11 @@ The relational database (RDB) store manages data based on relational models. The
| Name| Description|
| -------- | -------- |
| [oh_cursor.h](oh__cursor_8h.md) | Provides APIs to access the result set obtained by querying the RDB store.<br>File to include: \<database/rdb/oh_cursor.h>|
| [oh_cursor.h](oh__cursor_8h.md) | Defines the APIs for accessing the result set obtained by querying the RDB store.<br>File to include: \<database/rdb/oh_cursor.h> |
| [oh_predicates.h](oh__predicates_8h.md) | Defines the predicates for RDB stores.<br>File to include: \<database/rdb/oh_predicates.h>|
| [oh_value_object.h](oh__value__object_8h.md) | Provides type conversion methods.<br>File to include: \<database/rdb/oh_value_object.h>|
| [oh_value_object.h](oh__value__object_8h.md) | Defines type conversion methods.<br>File to include: \<database/rdb/oh_value_object.h> |
| [oh_values_bucket.h](oh__values__bucket_8h.md) | Defines the types of the key and value in a key-value (KV) pair.<br>File to include: \<database/rdb/oh_values_bucket.h>|
| [relational_store.h](relational__store_8h.md) | Provides APIs to manage an RDB store.<br>File to include: \<database/rdb/relational_store.h>|
| [relational_store.h](relational__store_8h.md) | Defines the APIs for managing an RDB store.<br>File to include: \<database/rdb/relational_store.h> |
| [relational_store_error_code.h](relational__store__error__code_8h.md) | Declares the error codes used for RDB stores.<br>File to include: \<database/rdb/relational_error_code.h>|
......@@ -43,10 +43,13 @@ The relational database (RDB) store manages data based on relational models. The
| Name| Description|
| -------- | -------- |
| [OH_ColumnType](#oh_columntype) | Enumerates the field types in an RDB store.|
| [OH_Cursor](#oh_cursor) | Indicates a result set.|
| [OH_OrderType](#oh_ordertype) | Enumerates the sorting types.|
| [OH_Predicates](#oh_predicates) | Indicates a **predicates** object.|
| [OH_VObject](#oh_vobject) | Indicates the allowed data field types.|
| [OH_VBucket](#oh_vbucket) | Indicates the types of the key and value in a KV pair.|
| [OH_Rdb_SecurityLevel](#oh_rdb_securitylevel) | Enumerates the RDB store security levels.|
| [OH_Rdb_ErrCode](#oh_rdb_errcode) | Indicates error codes.|
......@@ -69,7 +72,7 @@ The relational database (RDB) store manages data based on relational models. The
| [OH_Rdb_CreatePredicates](#oh_rdb_createpredicates) (const char \*table) | Creates an [OH_Predicates](_o_h___predicates.md) instance.|
| [OH_Rdb_GetOrOpen](#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](#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](#oh_rdb_deletestore) (const char \*path) | Deletes an RDB store with the specified database file configuration.|
| [OH_Rdb_DeleteStore](#oh_rdb_deletestore) (const [OH_Rdb_Config](_o_h___rdb___config.md) \*config) | Deletes an RDB store with the specified database file configuration.|
| [OH_Rdb_Insert](#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](#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](#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.|
......@@ -102,7 +105,7 @@ The relational database (RDB) store manages data based on relational models. The
| [OH_Cursor::getReal](#getreal) | Pointer to the function used to obtain the value of the double type based on the specified column and the current row.|
| [OH_Cursor::getBlob](#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.|
| [OH_Cursor::isNull](#isnull-12) | Pointer to the function used to check whether the value in the specified column is null.|
| [OH_Cursor::close](#close) | Pointer to the function used to close a result set. |
| [OH_Cursor::destroy](#destroy-14) | Pointer to the function used to close the result set.|
| [OH_Predicates::id](#id-14) | Unique identifier of the **OH_Predicates** struct.|
| [OH_Predicates::equalTo](#equalto) | Pointer to the function used to set a predicates object to match the field whose value is equal to the specified value.|
| [OH_Predicates::notEqualTo](#notequalto) | Pointer to the function used to set a predicates object to match the field whose value is not equal to the specified value.|
......@@ -127,13 +130,13 @@ The relational database (RDB) store manages data based on relational models. The
| [OH_Predicates::in](#in) | Pointer to the function used to set a predicates object to match the field with the value within the specified range.|
| [OH_Predicates::notIn](#notin) | Pointer to the function used to set a predicates object to match the field with the value out of the specified range.|
| [OH_Predicates::clear](#clear-12) | Pointer to the function used to clear a predicates instance.|
| [OH_Predicates::destroyPredicates](#destroypredicates) | Destroys an [OH_Predicates](_o_h___predicates.md) object and reclaims the memory occupied.|
| [OH_Predicates::destroy](#destroy-24) | Destroys an [OH_Predicates](_o_h___predicates.md) object and reclaims the memory occupied.|
| [OH_VObject::id](#id-24) | Unique identifier of the **OH_VObject** struct.|
| [OH_VObject::putInt64](#putint64-22) | Converts a single parameter or an array of the int64 type into a value of the [OH_VObject](_o_h___v_object.md) type.|
| [OH_VObject::putDouble](#putdouble) | Converts a single parameter or an array of the double type into a value of the [OH_VObject](_o_h___v_object.md) type.|
| [OH_VObject::putText](#puttext-22) | Converts a character array of the char type to a value of the [OH_VObject](_o_h___v_object.md) type.|
| [OH_VObject::putTexts](#puttexts) | Converts a string array of the char type to a value of the [OH_VObject](_o_h___v_object.md) type.|
| [OH_VObject::destroyValueObject](#destroyvalueobject) | Destroys an [OH_VObject](_o_h___v_object.md) object and reclaims the memory occupied.|
| [OH_VObject::destroy](#destroy-44) | Destroys an [OH_VObject](_o_h___v_object.md) object and reclaims the memory occupied.|
| [OH_VBucket::id](#id-34) | Unique identifier of the **OH_VBucket** struct.|
| [OH_VBucket::capability](#capability) | Number of the KV pairs in the struct.|
| [OH_VBucket::putText](#puttext-12) | Puts a char value into the [OH_VBucket](_o_h___v_bucket.md) object in the given column.|
......@@ -142,18 +145,31 @@ The relational database (RDB) store manages data based on relational models. The
| [OH_VBucket::putBlob](#putblob) | Puts a const uint8_t value into the [OH_VBucket](_o_h___v_bucket.md) object in the given column.|
| [OH_VBucket::putNull](#putnull) | Puts a null value into the [OH_VBucket](_o_h___v_bucket.md) object in the given column.|
| [OH_VBucket::clear](#clear-22) | Clears an [OH_VBucket](_o_h___v_bucket.md) object.|
| [OH_VBucket::destroyValuesBucket](#destroyvaluesbucket) | Destroys an [OH_VBucket](_o_h___v_bucket.md) object and reclaims the memory occupied.|
| [OH_Rdb_Config::path](#path) | Path of the database file.|
| [OH_VBucket::destroy](#destroy-34) | Destroys an [OH_VBucket](_o_h___v_bucket.md) object and reclaims the memory occupied.|
| [OH_Rdb_Config::selfSize](#selfsize) | Size of the struct.|
| [OH_Rdb_Config::dataBaseDir](#databasedir) | Path of the database file.|
| [OH_Rdb_Config::bundleName](#bundlename) | Bundle name.|
| [OH_Rdb_Config::moduleName](#modulename) | Module name. |
| [OH_Rdb_Config::isEncrypt](#isencrypt) | Whether to encrypt the RDB store.|
| [OH_Rdb_Config::securityLevel](#securitylevel) | Set the RDB store security level [OH_Rdb_SecurityLevel](#oh_rdb_securitylevel).|
| [OH_Rdb_Config::securityLevel](#securitylevel) | Sets the RDB store security level [OH_Rdb_SecurityLevel](#oh_rdb_securitylevel). |
| [OH_Rdb_Store::id](#id-44) | Unique identifier of the **OH_Rdb_Store** struct.|
## Type Description
### OH_Cursor
### OH_ColumnType
```
typedef enum OH_ColumnType OH_ColumnType
```
**Description**
Enumerates the field types in an RDB store.
### OH_Cursor
```
typedef struct OH_Cursor OH_Cursor
......@@ -166,8 +182,18 @@ Indicates a result set.
It provides APIs to access the result set obtained by querying the RDB store.
### OH_Predicates
### OH_OrderType
```
typedef enum OH_OrderType OH_OrderType
```
**Description**
Enumerates the sorting types.
### OH_Predicates
```
typedef struct OH_Predicates OH_Predicates
......@@ -180,7 +206,6 @@ Indicates a **predicates** object.
### OH_Rdb_ErrCode
```
typedef enum OH_Rdb_ErrCode OH_Rdb_ErrCode
```
......@@ -190,8 +215,18 @@ typedef enum OH_Rdb_ErrCode OH_Rdb_ErrCode
Indicates an error code.
### OH_VBucket
### OH_Rdb_SecurityLevel
```
typedef enum OH_Rdb_SecurityLevel OH_Rdb_SecurityLevel
```
**Description**
Enumerates the RDB store security levels.
### OH_VBucket
```
typedef struct OH_VBucket OH_VBucket
......@@ -204,7 +239,6 @@ Indicates the types of the key and value in a KV pair.
### OH_VObject
```
typedef struct OH_VObject OH_VObject
```
......@@ -219,7 +253,6 @@ Indicates the allowed data field types.
### OH_ColumnType
```
enum OH_ColumnType
```
......@@ -239,7 +272,6 @@ Enumerates the field types in an RDB store.
### OH_OrderType
```
enum OH_OrderType
```
......@@ -256,7 +288,6 @@ Enumerates the sorting types.
### OH_Rdb_ErrCode
```
enum OH_Rdb_ErrCode
```
......@@ -323,7 +354,6 @@ Enumerates the error codes.
### OH_Rdb_SecurityLevel
```
enum OH_Rdb_SecurityLevel
```
......@@ -345,7 +375,6 @@ Enumerates the RDB store security levels.
### OH_Rdb_Backup()
```
int OH_Rdb_Backup (OH_Rdb_Store * store, const char * databasePath )
```
......@@ -372,7 +401,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_BeginTransaction()
```
int OH_Rdb_BeginTransaction (OH_Rdb_Store * store)
```
......@@ -398,7 +426,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_CloseStore()
```
int OH_Rdb_CloseStore (OH_Rdb_Store * store)
```
......@@ -424,7 +451,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_Commit()
```
int OH_Rdb_Commit (OH_Rdb_Store * store)
```
......@@ -450,7 +476,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_CreatePredicates()
```
OH_Predicates* OH_Rdb_CreatePredicates (const char * table)
```
......@@ -476,9 +501,8 @@ Returns the pointer to the [OH_Predicates](_o_h___predicates.md) instance create
### OH_Rdb_CreateValueObject()
```
OH_VObject* OH_Rdb_CreateValueObject (void )
OH_VObject* OH_Rdb_CreateValueObject (void)
```
**Description**
......@@ -496,9 +520,8 @@ Returns the pointer to the [OH_VObject](_o_h___v_object.md) instance created if
### OH_Rdb_CreateValuesBucket()
```
OH_VBucket* OH_Rdb_CreateValuesBucket (void )
OH_VBucket* OH_Rdb_CreateValuesBucket (void)
```
**Description**
......@@ -516,7 +539,6 @@ Returns the pointer to the [OH_VBucket](_o_h___v_bucket.md) instance created if
### OH_Rdb_Delete()
```
int OH_Rdb_Delete (OH_Rdb_Store * store, OH_Predicates * predicates )
```
......@@ -543,9 +565,8 @@ Returns the number of affected rows if the operation is successful; returns an e
### OH_Rdb_DeleteStore()
```
int OH_Rdb_DeleteStore (const char * path)
int OH_Rdb_DeleteStore (const OH_Rdb_Config * config)
```
**Description**
......@@ -565,7 +586,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_Execute()
```
int OH_Rdb_Execute (OH_Rdb_Store * store, const char * sql )
```
......@@ -592,7 +612,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_ExecuteQuery()
```
OH_Cursor* OH_Rdb_ExecuteQuery (OH_Rdb_Store * store, const char * sql )
```
......@@ -619,7 +638,6 @@ Returns the pointer to the [OH_Cursor](_o_h___cursor.md) instance if the operati
### OH_Rdb_GetOrOpen()
```
OH_Rdb_Store* OH_Rdb_GetOrOpen (const OH_Rdb_Config * config, int * errCode )
```
......@@ -646,7 +664,6 @@ Returns the pointer to the [OH_Rdb_Store](_o_h___rdb___store.md) instance create
### OH_Rdb_GetVersion()
```
int OH_Rdb_GetVersion (OH_Rdb_Store * store, int * version )
```
......@@ -673,7 +690,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_Insert()
```
int OH_Rdb_Insert (OH_Rdb_Store * store, const char * table, OH_VBucket * valuesBucket )
```
......@@ -701,7 +717,6 @@ Returns the row ID if the operation is successful; returns an error code otherwi
### OH_Rdb_Query()
```
OH_Cursor* OH_Rdb_Query (OH_Rdb_Store * store, OH_Predicates * predicates, const char *const * columnNames, int length )
```
......@@ -730,7 +745,6 @@ Returns the pointer to the [OH_Cursor](_o_h___cursor.md) instance if the operati
### OH_Rdb_Restore()
```
int OH_Rdb_Restore (OH_Rdb_Store * store, const char * databasePath )
```
......@@ -744,7 +758,7 @@ Restores an RDB store from the specified database backup file.
| Name| Description|
| -------- | -------- |
| store | Pointer to the [OH_Rdb_Store](_o_h___rdb___store.md) instance.|
| databasePath | Pointer to the path of the RDB store backup file.|
| databasePath | Pointer to the destination directory in which the RDB store is backed up.|
**Returns**
......@@ -757,7 +771,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_RollBack()
```
int OH_Rdb_RollBack (OH_Rdb_Store * store)
```
......@@ -783,7 +796,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_SetVersion()
```
int OH_Rdb_SetVersion (OH_Rdb_Store * store, int version )
```
......@@ -797,7 +809,7 @@ Sets the RDB store version.
| Name| Description|
| -------- | -------- |
| store | Pointer to the [OH_Rdb_Store](_o_h___rdb___store.md) instance.|
| version | Version number to set.|
| version | Pointer to the version number.|
**Returns**
......@@ -810,7 +822,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### OH_Rdb_Update()
```
int OH_Rdb_Update (OH_Rdb_Store * store, OH_VBucket * valuesBucket, OH_Predicates * predicates )
```
......@@ -841,7 +852,6 @@ Returns the number of affected rows if the operation is successful; returns an e
### andOperate
```
OH_Predicates*(* OH_Predicates::andOperate) (OH_Predicates *predicates)
```
......@@ -869,7 +879,6 @@ Returns the predicates with the AND operator.
### beginWrap
```
OH_Predicates*(* OH_Predicates::beginWrap) (OH_Predicates *predicates)
```
......@@ -897,7 +906,6 @@ Returns the predicates with a left parenthesis.
### between
```
OH_Predicates*(* OH_Predicates::between) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -925,9 +933,19 @@ Returns the predicates created.
[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md).
### capability
### bundleName
```
const char* OH_Rdb_Config::bundleName
```
**Description**
Application bundle name.
### capability
```
uint16_t OH_VBucket::capability
```
......@@ -939,7 +957,6 @@ Number of the KV pairs in the struct.
### clear [1/2]
```
OH_Predicates*(* OH_Predicates::clear) (OH_Predicates *predicates)
```
......@@ -965,7 +982,6 @@ Returns the cleared predicates.
### clear [2/2]
```
int(* OH_VBucket::clear) (OH_VBucket *bucket)
```
......@@ -989,16 +1005,26 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
[OH_VBucket](_o_h___v_bucket.md).
### close
### dataBaseDir
```
const char* OH_Rdb_Config::dataBaseDir
```
**Description**
Path of the database file.
### destroy [1/4]
```
int(* OH_Cursor::close) (OH_Cursor *cursor)
int(* OH_Cursor::destroy) (OH_Cursor *cursor)
```
**Description**
Pointer to the function used to close a result set.
Pointer to the function used to close the result set.
**Parameters**
......@@ -1015,11 +1041,10 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
[OH_Cursor](_o_h___cursor.md).
### destroyPredicates
### destroy [2/4]
```
int(* OH_Predicates::destroyPredicates) (OH_Predicates *predicates)
int(* OH_Predicates::destroy) (OH_Predicates *predicates)
```
**Description**
......@@ -1041,22 +1066,21 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
[OH_Predicates](_o_h___predicates.md).
### destroyValueObject
### destroy [3/4]
```
int(* OH_VObject::destroyValueObject) (OH_VObject *valueObject)
int(* OH_VBucket::destroy) (OH_VBucket *bucket)
```
**Description**
Destroys an [OH_VObject](_o_h___v_object.md) object and reclaims the memory occupied.
Destroys an [OH_VBucket](_o_h___v_bucket.md) object and reclaims the memory occupied.
**Parameters**
| Name| Description|
| -------- | -------- |
| valueObject | Pointer to the [OH_VObject](_o_h___v_object.md) instance.|
| bucket | Pointer to the [OH_VBucket](_o_h___v_bucket.md) instance.|
**Returns**
......@@ -1064,25 +1088,24 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
**See**
[OH_VObject](_o_h___v_object.md).
[OH_VBucket](_o_h___v_bucket.md).
### destroyValuesBucket
### destroy [4/4]
```
int(* OH_VBucket::destroyValuesBucket) (OH_VBucket *bucket)
int(* OH_VObject::destroy) (OH_VObject *valueObject)
```
**Description**
Destroys an [OH_VBucket](_o_h___v_bucket.md) object and reclaims the memory occupied.
Destroys an [OH_VObject](_o_h___v_object.md) object and reclaims the memory occupied.
**Parameters**
| Name| Description|
| -------- | -------- |
| bucket | Pointer to the [OH_VBucket](_o_h___v_bucket.md) instance.|
| valueObject | Pointer to the [OH_VObject](_o_h___v_object.md) instance.|
**Returns**
......@@ -1090,12 +1113,11 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
**See**
[OH_VBucket](_o_h___v_bucket.md).
[OH_VObject](_o_h___v_object.md).
### distinct
```
OH_Predicates*(* OH_Predicates::distinct) (OH_Predicates *predicates)
```
......@@ -1123,7 +1145,6 @@ Returns the predicates created.
### endWrap
```
OH_Predicates*(* OH_Predicates::endWrap) (OH_Predicates *predicates)
```
......@@ -1151,7 +1172,6 @@ Returns the predicates object with a right parenthesis.
### equalTo
```
OH_Predicates*(* OH_Predicates::equalTo) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1181,7 +1201,6 @@ Returns the predicates created.
### getBlob
```
int(* OH_Cursor::getBlob) (OH_Cursor *cursor, int32_t columnIndex, unsigned char *value, int length)
```
......@@ -1210,7 +1229,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getColumnCount
```
int(* OH_Cursor::getColumnCount) (OH_Cursor *cursor, int *count)
```
......@@ -1237,7 +1255,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getColumnIndex
```
int(* OH_Cursor::getColumnIndex) (OH_Cursor *cursor, const char *name, int *columnIndex)
```
......@@ -1265,7 +1282,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getColumnName
```
int(* OH_Cursor::getColumnName) (OH_Cursor *cursor, int32_t columnIndex, char *name, int length)
```
......@@ -1294,7 +1310,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getColumnType
```
int(* OH_Cursor::getColumnType) (OH_Cursor *cursor, int32_t columnIndex, OH_ColumnType *columnType)
```
......@@ -1322,7 +1337,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getInt64
```
int(* OH_Cursor::getInt64) (OH_Cursor *cursor, int32_t columnIndex, int64_t *value)
```
......@@ -1350,7 +1364,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getReal
```
int(* OH_Cursor::getReal) (OH_Cursor *cursor, int32_t columnIndex, double *value)
```
......@@ -1378,7 +1391,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getRowCount
```
int(* OH_Cursor::getRowCount) (OH_Cursor *cursor, int *count)
```
......@@ -1405,7 +1417,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getSize
```
int(* OH_Cursor::getSize) (OH_Cursor *cursor, int32_t columnIndex, size_t *size)
```
......@@ -1433,7 +1444,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### getText
```
int(* OH_Cursor::getText) (OH_Cursor *cursor, int32_t columnIndex, char *value, int length)
```
......@@ -1462,7 +1472,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### goToNextRow
```
int(* OH_Cursor::goToNextRow) (OH_Cursor *cursor)
```
......@@ -1488,7 +1497,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### greaterThan
```
OH_Predicates*(* OH_Predicates::greaterThan) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1518,7 +1526,6 @@ Returns the predicates created.
### greaterThanOrEqualTo
```
OH_Predicates*(* OH_Predicates::greaterThanOrEqualTo) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1548,7 +1555,6 @@ Returns the predicates created.
### groupBy
```
OH_Predicates*(* OH_Predicates::groupBy) (OH_Predicates *predicates, char const *const *fields, int length)
```
......@@ -1578,7 +1584,6 @@ Returns the predicates created.
### id [1/4]
```
int64_t OH_Predicates::id
```
......@@ -1590,7 +1595,6 @@ Unique identifier of the **OH_Predicates** struct.
### id [2/4]
```
int64_t OH_VObject::id
```
......@@ -1602,7 +1606,6 @@ Unique identifier of the **OH_VObject** struct.
### id [3/4]
```
int64_t OH_VBucket::id
```
......@@ -1614,7 +1617,6 @@ Unique identifier of the **OH_VBucket** struct.
### id [4/4]
```
int64_t OH_Rdb_Store::id
```
......@@ -1626,7 +1628,6 @@ Unique identifier of the **OH_Rdb_Store** struct.
### in
```
OH_Predicates*(* OH_Predicates::in) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1656,7 +1657,6 @@ Returns the predicates created.
### isEncrypt
```
bool OH_Rdb_Config::isEncrypt
```
......@@ -1668,7 +1668,6 @@ Whether to encrypt the RDB store.
### isNotNull
```
OH_Predicates*(* OH_Predicates::isNotNull) (OH_Predicates *predicates, const char *field)
```
......@@ -1697,7 +1696,6 @@ Returns the predicates created.
### isNull [1/2]
```
int(* OH_Cursor::isNull) (OH_Cursor *cursor, int32_t columnIndex, bool *isNull)
```
......@@ -1725,7 +1723,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### isNull [2/2]
```
OH_Predicates*(* OH_Predicates::isNull) (OH_Predicates *predicates, const char *field)
```
......@@ -1754,7 +1751,6 @@ Returns the predicates created.
### lessThan
```
OH_Predicates*(* OH_Predicates::lessThan) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1784,7 +1780,6 @@ Returns the predicates created.
### lessThanOrEqualTo
```
OH_Predicates*(* OH_Predicates::lessThanOrEqualTo) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1814,7 +1809,6 @@ Returns the predicates created.
### like
```
OH_Predicates*(* OH_Predicates::like) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1844,7 +1838,6 @@ Returns the predicates created.
### limit
```
OH_Predicates*(* OH_Predicates::limit) (OH_Predicates *predicates, unsigned int value)
```
......@@ -1871,9 +1864,19 @@ Returns the predicates created.
[OH_Predicates](_o_h___predicates.md).
### notBetween
### moduleName
```
const char* OH_Rdb_Config::moduleName
```
**Description**
Module name.
### notBetween
```
OH_Predicates*(* OH_Predicates::notBetween) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1903,7 +1906,6 @@ Returns the predicates created.
### notEqualTo
```
OH_Predicates*(* OH_Predicates::notEqualTo) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1933,7 +1935,6 @@ Returns the predicates created.
### notIn
```
OH_Predicates*(* OH_Predicates::notIn) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject)
```
......@@ -1963,7 +1964,6 @@ Returns the predicates created.
### offset
```
OH_Predicates*(* OH_Predicates::offset) (OH_Predicates *predicates, unsigned int rowOffset)
```
......@@ -1992,7 +1992,6 @@ Returns the predicates created.
### orderBy
```
OH_Predicates*(* OH_Predicates::orderBy) (OH_Predicates *predicates, const char *field, OH_OrderType type)
```
......@@ -2022,7 +2021,6 @@ Returns the predicates created.
### orOperate
```
OH_Predicates*(* OH_Predicates::orOperate) (OH_Predicates *predicates)
```
......@@ -2048,21 +2046,8 @@ Returns the predicates with the OR operator.
[OH_Predicates](_o_h___predicates.md).
### path
```
const char* OH_Rdb_Config::path
```
**Description**
Path of the database file.
### putBlob
```
int(* OH_VBucket::putBlob) (OH_VBucket *bucket, const char *field, const uint8_t *value, uint32_t size)
```
......@@ -2091,7 +2076,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### putDouble
```
int(* OH_VObject::putDouble) (OH_VObject *valueObject, double *value, uint32_t count)
```
......@@ -2119,7 +2103,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### putInt64 [1/2]
```
int(* OH_VBucket::putInt64) (OH_VBucket *bucket, const char *field, int64_t value)
```
......@@ -2147,7 +2130,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### putInt64 [2/2]
```
int(* OH_VObject::putInt64) (OH_VObject *valueObject, int64_t *value, uint32_t count)
```
......@@ -2175,7 +2157,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### putNull
```
int(* OH_VBucket::putNull) (OH_VBucket *bucket, const char *field)
```
......@@ -2202,14 +2183,13 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### putReal
```
int(* OH_VBucket::putReal) (OH_VBucket *bucket, const char *field, double value)
```
**Description**
Puts the double value into the {OH_VBucket} object of the given column name.
Puts a double value into the [OH_VBucket](_o_h___v_bucket.md) object in the given column.
**Parameters**
......@@ -2230,7 +2210,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### putText [1/2]
```
int(* OH_VBucket::putText) (OH_VBucket *bucket, const char *field, const char *value)
```
......@@ -2245,7 +2224,7 @@ Puts a char value into the [OH_VBucket](_o_h___v_bucket.md) object in the given
| -------- | -------- |
| bucket | Pointer to the [OH_VBucket](_o_h___v_bucket.md) instance.|
| field | Pointer to the column name in the database table.|
| value | Pointer to the char value to put.|
| value | Pointer to the value to put.|
**Returns**
......@@ -2258,7 +2237,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### putText [2/2]
```
int(* OH_VObject::putText) (OH_VObject *valueObject, const char *value)
```
......@@ -2285,7 +2263,6 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### putTexts
```
int(* OH_VObject::putTexts) (OH_VObject *valueObject, const char **value, uint32_t count)
```
......@@ -2313,11 +2290,21 @@ Returns **RDB_OK** is the operation is successful; returns an error code otherwi
### securityLevel
```
enum OH_Rdb_SecurityLevel OH_Rdb_Config::securityLevel
int OH_Rdb_Config::securityLevel
```
**Description**
Set the RDB store security level [OH_Rdb_SecurityLevel](#oh_rdb_securitylevel).
### selfSize
```
int OH_Rdb_Config::selfSize
```
**Description**
Size of the struct.
......@@ -30,6 +30,7 @@ A result set is a set of results returned by **query()**.
| Name| Description|
| -------- | -------- |
| [OH_ColumnType](_r_d_b.md#oh_columntype) | Enumerates the field types in an RDB store.|
| [OH_Cursor](_r_d_b.md#oh_cursor) | Indicates a result set.|
......@@ -37,4 +38,4 @@ A result set is a set of results returned by **query()**.
| 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_ColumnType](_r_d_b.md#oh_columntype) {<br>TYPE_NULL = 0, TYPE_INT64, TYPE_REAL, TYPE_TEXT,<br>TYPE_BLOB<br>} | Enumerates the field types in an RDB store.|
......@@ -28,6 +28,7 @@ Defines the predicates for RDB stores.
| Name| Description|
| -------- | -------- |
| [OH_OrderType](_r_d_b.md#oh_ordertype) | Enumerates the sorting types.|
| [OH_Predicates](_r_d_b.md#oh_predicates) | Indicates a **predicates** object. |
......@@ -35,4 +36,4 @@ Defines the predicates for RDB stores.
| 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_OrderType](_r_d_b.md#oh_ordertype) { ASC = 0, DESC = 1 } | Enumerates the sorting types.|
# relation_store.h
# relational_store.h
## Overview
......@@ -25,6 +25,13 @@ Provides APIs to manage a relational database (RDB) store.
| [OH_Rdb_Store](_o_h___rdb___store.md) | Defines the RDB store type.|
### Types
| Name| Description|
| -------- | -------- |
| [OH_Rdb_SecurityLevel](_r_d_b.md#oh_rdb_securitylevel) | Defines the RDB store security levels. |
### Enums
| Name| Description|
......@@ -41,7 +48,7 @@ Provides APIs to manage a relational database (RDB) store.
| [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_DeleteStore](_r_d_b.md#oh_rdb_deletestore) (const [OH_Rdb_Config](_o_h___rdb___config.md) \*config) | 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.|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册