question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getAll function doesn't retrieve value

See original GitHub issue

Hello,

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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
assuncaocharlescommented, Nov 2, 2019

Hi @mauguzun and @zemoa

Bug fixed in version 3.0.1

You can check it working here: https://codesandbox.io/s/angular-09u0j

1reaction
assuncaocharlescommented, Oct 30, 2019

Definitely a bug, I will look into it asap. Meanwhile, PR’s are welcome

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found