Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to utilize \React\Async\await method #55

Open
kristos80 opened this issue Jan 10, 2024 · 0 comments
Open

How to utilize \React\Async\await method #55

kristos80 opened this issue Jan 10, 2024 · 0 comments

Comments

@kristos80
Copy link

kristos80 commented Jan 10, 2024

Hi there,

Thanks for this library. Really appreciate your efforts.

It's not an issue/bug per se, but rather a question on a specific implementation scenario.

I have an interface for an SQL client which under the hood uses React\MySQL\ConnectionInterface or PgAsync\Client.

The way PgAsync\Client is built, the expression await($this->sqlClient->query($sql)->toPromise()) will only return the very first record, while --for the needs of the interface--, I need them all [the records].

I cannot figure out how to achieve such a behaviour: A way of fetching all records in a synchronous manner by using React\Async\await with the PgAsync\Client::toPromise() method.

I hope it makes sense what I wrote.

Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant