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 <[email protected]> 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 <[email protected]> wrote:
>
>> Does someone consider DB-API for asyncio?
>>
>>
>> --
>> INADA Naoki <[email protected]>
>>
>> _______________________________________________
>> DB-SIG maillist - [email protected]
>> https://mail.python.org/mailman/listinfo/db-sig
>>
>>
>
> _______________________________________________
> DB-SIG maillist - [email protected]
> https://mail.python.org/mailman/listinfo/db-sig
>
>
--
INADA Naoki <[email protected]>
_______________________________________________
DB-SIG maillist - [email protected]
https://mail.python.org/mailman/listinfo/db-sig