1 2# Distributed Data Management Subsystem Changelog 3 4## cl.distributeddatamgr.1 Change of int (*close)(OH_Cursor *cursor) in OH_Cursor Struct to int (\*destroy)(OH_Cursor \*cursor) 5 6**Change Impact** 7 8This change is incompatible with earlier versions. The function pointer name is changed from **close** to **destroy**. The input parameters and return values remain unchanged. 9 10**Key API/Component Changes** 11 12Before change: 13 14 ```ts 15 int (*close)(OH_Cursor *cursor); 16 ``` 17 18After change: 19 20 ```ts 21 int (*destroy)(OH_Cursor *cursor); 22 ``` 23 24**Adaptation Guide** 25Example: 26 27Code before change: 28 29``` 30cursor->close(cursor); 31``` 32 33Code after change: 34 35``` 36cursor->destroy(cursor); 37``` 38 39## cl.distributeddatamgr.2 Change of int (\*destroyPredicates)(OH_Predicates \*predicates) in OH_Predicates Struct to int (*destroy)(OH_Predicates *predicates) 40 41**Change Impact** 42 43This change is incompatible with earlier versions. The function pointer name is changed from **destroyPredicates** to **destroy**. The input parameters and return values remain unchanged. 44 45**Key API/Component Changes** 46 47Before change: 48 49 ```ts 50int (*destroyPredicates)(OH_Predicates *predicates); 51 ``` 52 53After change: 54 55 ```ts 56int (*destroy)(OH_Predicates *predicates); 57 ``` 58 59**Adaptation Guide** 60Example: 61 62Code before change: 63 64``` 65predicates->destroyPredicates(predicates); 66``` 67 68Code after change: 69 70``` 71predicates->destroy(predicates); 72``` 73 74## cl.distributeddatamgr.3 Change of int (\*destroyValueObject)(OH_VObject \*valueObject) in OH_VObject Struct to int (\*destroy)(OH_VObject \*valueObject) 75 76**Change Impact** 77 78This change is incompatible with earlier versions. The function pointer name is changed from **destroyValueObject** to **destroy**. The input parameters and return values remain unchanged. 79 80**Key API/Component Changes** 81 82Before change: 83 84 ```ts 85int (*destroyValueObject)(OH_VObject *valueObject); 86 ``` 87 88After change: 89 90 ```ts 91int (*destroy)(OH_VObject *valueObject); 92 ``` 93 94**Adaptation Guide** 95Example: 96 97Code before change: 98 99``` 100valueObject->destroyValueObject(valueObject); 101``` 102 103Code after change: 104 105``` 106valueObject->destroy(valueObject); 107``` 108 109## cl.distributeddatamgr.4 Change of int (\*destroyValuesBucket)(OH_VBucket \*bucket) in OH_VBucket Struct to int (\*destroy)(OH_VBucket \*bucket) 110 111**Change Impact** 112 113This change is incompatible with earlier versions. The function pointer name is changed from **destroyValuesBucket** to **destroy**. The input parameters and return values remain unchanged. 114 115**Key API/Component Changes** 116 117Before change: 118 119 ```ts 120int (*destroyValuesBucket)(OH_VBucket *bucket); 121 ``` 122 123After change: 124 125 ```ts 126int (*destroy)(OH_VBucket *bucket); 127 ``` 128 129**Adaptation Guide** 130Example: 131 132Code before change: 133 134``` 135valueBucket->destroyValuesBucket(valueBucket); 136``` 137 138Code after change: 139 140``` 141 valueBucket->destroy(valueBucket); 142``` 143 144## cl.distributeddatamgr.5 Change of OH_Rdb_Config Struct Member Variables 145 146**Change Impact** 147 148The changes are incompatible with earlier versions. <br>The type of **securityLevel** is changed from **enum OH_Rdb_SecurityLevel** to **in**.<br>The member variable **path** is deleted.<br>The member variables **selfSize**, **dataBaseDir**, **storeName**, **bundleName**, and **moduleName** are added. 149 150**Key API/Component Changes** 151 152OH_Rdb_Config before change: 153 154 ```ts 155typedef struct { 156 const char *path; 157 bool isEncrypt; 158 enum OH_Rdb_SecurityLevel securityLevel; 159} OH_Rdb_Config; 160 ``` 161 162OH_Rdb_Config after change: 163 164 ```ts 165typedef struct { 166 int selfSize; 167 const char *dataBaseDir; 168 const char *storeName; 169 const char *bundleName; 170 const char *moduleName; 171 bool isEncrypt; 172 int securityLevel; 173} OH_Rdb_Config; 174 ``` 175 176**Adaptation Guide** 177When creating an RDB store with **OH_Rdb_Config**, you need to pass in the bundle name and module name. 178 179## cl.distributeddatamgr.6 Change of const char *path in OH_Rdb_DeleteStore() to const OH_Rdb_Config *config 180 181**Change Impact** 182 183This change is incompatible with earlier versions. The input parameter is changed from **const char *path** to **const OH_Rdb_Config *config**. 184 185**Key API/Component Changes** 186 187OH_Rdb_DeleteStore before change: 188 189 ```ts 190int OH_Rdb_DeleteStore(const char *path); 191 ``` 192 193OH_Rdb_DeleteStore after change: 194 195 ```ts 196int OH_Rdb_DeleteStore(const OH_Rdb_Config *config); 197 ``` 198 199**Adaptation Guide** 200 201Example: 202 203Code before change: 204 205``` 206OH_Rdb_DeleteStore("") 207``` 208 209Code after change: 210 211``` 212OH_Rdb_DeleteStore(config) 213``` 214