From fbbda7da10f7c8642395e4ee015c7fcad36b6089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=BE=8E=E4=BA=AE?= Date: Wed, 9 Jul 2025 21:50:42 +0800 Subject: [PATCH] add rdb semantic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周澎亮 --- .../relational_store/include/relational_store.h | 13 +++++++++++++ .../relational_store/libnative_rdb.ndk.json | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h index 57daa9ea3ab..81f2c6e468d 100644 --- a/distributeddatamgr/relational_store/include/relational_store.h +++ b/distributeddatamgr/relational_store/include/relational_store.h @@ -411,6 +411,19 @@ int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer); */ int OH_Rdb_SetPersistent(OH_Rdb_ConfigV2 *config, bool isPersistent); +/** + * @brief Set whether the database enable the capabilities for semantic indexing processing. + * + * @param config Represents a pointer to {@link OH_Rdb_ConfigV2} instance. + * Indicates the configuration of the database related to this RDB store. + * @param enableSemanticIndex Indicates whether the database enable the capabilities for semantic indexing processing. + * @return Returns the status code of the execution. Successful execution returns RDB_OK, + * {@link RDB_OK} - success. + * {@link RDB_E_INVALID_ARGS} - The error code for common invalid args. + * @since 20 + */ +int OH_Rdb_SetSemanticIndex(OH_Rdb_ConfigV2 *config, bool enableSemanticIndex); + /** * @brief Check if a tokenizer is supported or not. * diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json index 297caefed1c..fd3614309c9 100644 --- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json +++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json @@ -44,6 +44,10 @@ "first_introduced": "14", "name":"OH_Rdb_SetDbType" }, + { + "first_introduced": "20", + "name":"OH_Rdb_SetSemanticIndex" + }, { "first_introduced": "17", "name":"OH_Rdb_SetTokenizer" -- Gitee