getAll function doesn't retrieve value
See original GitHub issueHello,
I try to use this plugin in my Angular 8 project. I registered the Module as expected in Readme. Then I use the service like this :
@Injectable({
providedIn: "roo"'
})
export class RequestCacheHelper {
constructor(private dbService: NgxIndexedDBService) {
this.dbService.currentStore = 'request';
}
...
retryRequests() {
this.dbService.getAll().then(
requestEntityList => {
if (requestEntityList) {
// do something
}
});
}
The result “requestEntityList” is always undefined. I look through your code and I discover that in “NgxIndexedDBService” you retrieve the value like that
request.onsuccess = function({ target: { successResult } }: any) {
resolve(successResult as T[]);
};
whereas it should be, I think :
request.onsuccess = function({ target: { success } }: any) {
resolve(success as T[]);
};
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Failed to get data when accessing the rest-api method getAll
When I access the URL to get the list of users, it doesn't fetch all the users. When I check the browser console...
Read more >Making queries | Django documentation
The all() method returns a QuerySet of all the objects in the database. Retrieving specific objects with filters¶. The QuerySet returned by all()...
Read more >Get data with Cloud Firestore - Firebase
There are three ways to retrieve data stored in Cloud Firestore. Any of these methods can be used with documents, collections of documents,...
Read more >Map-specific operations | Kotlin Documentation
Retrieve keys and values ... For retrieving a value from a map, you must provide its key as an argument of the get()...
Read more >Retrieving and Modifying Values from Result Sets (The Java ...
The method for retrieving a value of SQL type VARCHAR is getString . ... on the first row and false if the ResultSet...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @mauguzun and @zemoa
Bug fixed in version 3.0.1
You can check it working here: https://codesandbox.io/s/angular-09u0j
Definitely a bug, I will look into it asap. Meanwhile, PR’s are welcome