Signed-off-by: lvqiang214 <lvqiang1@huawei.com>
This commit is contained in:
lvqiang214
2023-07-07 18:33:06 +08:00
parent 4e7c878507
commit 7a115985d0
2 changed files with 7 additions and 7 deletions
@@ -94,7 +94,7 @@ bool TriggerDbHelper::UpdateGenericTriggerModel(std::shared_ptr<GenericTriggerMo
return true;
}
bool TriggerDbHelper::GetVendorUuid(std::unique_ptr<ResultSet> &set, int32_t &vendorUuid)
bool TriggerDbHelper::GetVendorUuid(std::shared_ptr<AbsSharedResultSet> &set, int32_t &vendorUuid)
{
int columnIndex;
int ret = set->GetColumnIndex("vendor_uuid", columnIndex);
@@ -111,7 +111,7 @@ bool TriggerDbHelper::GetVendorUuid(std::unique_ptr<ResultSet> &set, int32_t &ve
return true;
}
bool TriggerDbHelper::GetBlob(std::unique_ptr<ResultSet> &set, std::vector<uint8_t> &data)
bool TriggerDbHelper::GetBlob(std::shared_ptr<AbsSharedResultSet> &set, std::vector<uint8_t> &data)
{
int columnIndex;
int ret = set->GetColumnIndex("data", columnIndex);
@@ -128,7 +128,7 @@ bool TriggerDbHelper::GetBlob(std::unique_ptr<ResultSet> &set, std::vector<uint8
return true;
}
bool TriggerDbHelper::GetModelVersion(std::unique_ptr<ResultSet> &set, int32_t &version)
bool TriggerDbHelper::GetModelVersion(std::shared_ptr<AbsSharedResultSet> &set, int32_t &version)
{
int columnIndex;
int ret = set->GetColumnIndex("model_version", columnIndex);
@@ -154,7 +154,7 @@ std::shared_ptr<GenericTriggerModel> TriggerDbHelper::GetGenericTriggerModel(con
return nullptr;
}
std::unique_ptr<ResultSet> set = store_->QuerySql(
std::shared_ptr<AbsSharedResultSet> set = store_->QuerySql(
"SELECT * FROM trigger WHERE model_uuid = ?", std::vector<std::string> {std::to_string(modelUuid)});
if (set == nullptr) {
INTELL_VOICE_LOG_ERROR("set is nullptr");
@@ -33,9 +33,9 @@ public:
void DeleteGenericTriggerModel(const int32_t modelUuid);
private:
bool GetVendorUuid(std::unique_ptr<OHOS::NativeRdb::ResultSet> &set, int32_t &vendorUuid);
bool GetBlob(std::unique_ptr<OHOS::NativeRdb::ResultSet> &set, std::vector<uint8_t> &data);
bool GetModelVersion(std::unique_ptr<OHOS::NativeRdb::ResultSet> &set, int32_t &version);
bool GetVendorUuid(std::shared_ptr<OHOS::NativeRdb::AbsSharedResultSet> &set, int32_t &vendorUuid);
bool GetBlob(std::shared_ptr<OHOS::NativeRdb::AbsSharedResultSet> &set, std::vector<uint8_t> &data);
bool GetModelVersion(std::shared_ptr<OHOS::NativeRdb::AbsSharedResultSet> &set, int32_t &version);
private:
std::mutex mutex_;