diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index df961acd5e8219025808a1de1473dfe0e5da5ad3..0d65d6d755f19787050fdb45f2339bd07c1f252a 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -121,7 +121,21 @@ declare namespace rdb { * @return Returns a ResultSet object if the operation is successful; */ query(rdbPredicates: RdbPredicates, columns: Array, callback: AsyncCallback): void; - query(rdbPredicates: RdbPredicates, columns: Array): Promise; + query(rdbPredicates: RdbPredicates, columns?: Array): Promise; + + /** + * Queries data in the database based on SQL statement. + * + * @note N/A + * @since 8 + * @sysCap SystemCapability.Data.DATA_APPDATAMGR + * @devices phone, tablet, tv, wearable, car + * @param sql Indicates the SQL statement to execute. + * @param bindArgs Indicates the values of the parameters in the SQL statement. The values are strings. + * @return Returns a ResultSet object if the operation is successful; + */ + querySql(sql: string, bindArgs: Array, callback: AsyncCallback): void; + querySql(sql: string, bindArgs?: Array): Promise; /** * Executes an SQL statement that contains specified parameters but returns no value. @@ -134,7 +148,7 @@ declare namespace rdb { * @param bindArgs Indicates the values of the parameters in the SQL statement. The values are strings. */ executeSql(sql: string, bindArgs: Array, callback: AsyncCallback): void; - executeSql(sql: string, bindArgs: Array): Promise; + executeSql(sql: string, bindArgs?: Array): Promise; /** * change the encrypted key(not null) if the database is configured with encrypted key.