mirror of
https://gitee.com/openharmony/applications_settings_data
synced 2024-12-04 04:52:25 +00:00
callback后的数据,不要在使用。避免引用空指针
Signed-off-by: yuwenzheng <yuwenzheng3@h-partners.com>
This commit is contained in:
parent
b0151f535c
commit
a09727c4cf
@ -117,8 +117,8 @@ export default class DataExtAbility extends DataShareExtensionAbility {
|
||||
callback(err, ret);
|
||||
} else {
|
||||
rdbStore.insert(SettingsDataConfig.TABLE_NAME, value, (err, ret) => {
|
||||
callback(err, ret);
|
||||
Log.info('insert result: ' + ret);
|
||||
callback(err, ret);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -150,8 +150,8 @@ export default class DataExtAbility extends DataShareExtensionAbility {
|
||||
callback(err, ret);
|
||||
} else {
|
||||
rdbStore.update(SettingsDataConfig.TABLE_NAME, value, predicates , (err, ret)=> {
|
||||
callback(err, ret);
|
||||
Log.info('update result: ' + ret);
|
||||
callback(err, ret);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -177,8 +177,8 @@ export default class DataExtAbility extends DataShareExtensionAbility {
|
||||
callback(err, {"_napiwrapper":{}});
|
||||
} else {
|
||||
rdbStore.query(SettingsDataConfig.TABLE_NAME, predicates, columns, (err:BusinessError, resultSet:relationalStore.ResultSet)=> {
|
||||
callback(err, resultSet);
|
||||
Log.info('query result: '+ JSON.stringify(resultSet.rowCount) +'columnNames'+ JSON.stringify(resultSet.columnNames));
|
||||
callback(err, resultSet);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user