Asyncrhonous database

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Asyncrhonous database

Martin Nilsson (Coppermist) @ Pike (-) developers forum
Anyone looked at asynchronous database query API? I'm thinking about
all the big_query, big_typed_query etc. but retuning a Promise.
Reply | Threaded
Open this post in threaded view
|

Re: Asyncrhonous database

Stephen R. van den Berg
Martin Nilsson (Coppermist) @ Pike (-) developers forum wrote:
>Anyone looked at asynchronous database query API? I'm thinking about
>all the big_query, big_typed_query etc. but retuning a Promise.

Sql.Promise()

I've used it in applications.
It works fine, I think.
You want something different?
--
Stephen.
Reply | Threaded
Open this post in threaded view
|

Re: Asyncrhonous database

Martin Nilsson (Coppermist) @ Pike (-) developers forum
>Martin Nilsson (Coppermist) @ Pike (-) developers forum wrote:
>>Anyone looked at asynchronous database query API? I'm thinking about
>>all the big_query, big_typed_query etc. but retuning a Promise.
>
>Sql.Promise()
>
>I've used it in applications.
>It works fine, I think.
>You want something different?

Thanks. Yes, like that, but non-blocking :) Doesn't look like MySQL is
using the mysql_*_nonblocking functions.
Reply | Threaded
Open this post in threaded view
|

Re: Asyncrhonous database

Stephen R. van den Berg
Martin Nilsson (Coppermist) @ Pike (-) developers forum wrote:
>>Sql.Promise()

>Thanks. Yes, like that, but non-blocking :) Doesn't look like MySQL is
>using the mysql_*_nonblocking functions.

I see.  With PostgreSQL (obviously ;-)) it *is* non-blocking.
Soon (hopefully) I'll have a working CQL implementation modeled after
the pgsql driver (so you can interface with Cassandra and ScyllaDB (cql
network protocol v4)).
--
Stephen.