I think having definition about what method returns Future is good.

For example:

con = yield from pymysql.connect_async(...)  # connection may cause
cur = con.cursor()  # cursor creation should done without asyncio
yield from cur.execute("...")  # execute may use asyncio
row = yield from cur.fetchone()  # fetch also uses asyncio

for row in cur:  # raises NotImplementedError



On Mon, Nov 11, 2013 at 5:49 AM, Tony Locke <tlo...@tlocke.org.uk> wrote:

> What sort of thing do you have in mind? Perhaps something where the
> execute() method returns immediately, and a callback function is called
> when the query is complete?
>
> This could be implemented in a library on top of DB-API. But should it be
> part of the spec?
>
> Cheers,
>
> Tony.
>
>
> On 25 October 2013 08:27, INADA Naoki <songofaca...@gmail.com> wrote:
>
>> Does someone consider DB-API for asyncio?
>>
>>
>> --
>> INADA Naoki  <songofaca...@gmail.com>
>>
>> _______________________________________________
>> DB-SIG maillist  -  DB-SIG@python.org
>> https://mail.python.org/mailman/listinfo/db-sig
>>
>>
>
> _______________________________________________
> DB-SIG maillist  -  DB-SIG@python.org
> https://mail.python.org/mailman/listinfo/db-sig
>
>


-- 
INADA Naoki  <songofaca...@gmail.com>
_______________________________________________
DB-SIG maillist  -  DB-SIG@python.org
https://mail.python.org/mailman/listinfo/db-sig

Reply via email to