long2ice / asynch

An asyncio ClickHouse Python Driver with native (TCP) interface support.
https://github.com/long2ice/asynch
Apache License 2.0
186 stars 43 forks source link

with_column_types=True, but there are no column types #4

Closed ghuname closed 3 years ago

ghuname commented 3 years ago

Why code:

import asyncio
from asynch import connect

async def main():
    conn = await connect(
        host="127.0.0.1",
        port=2714,
        database="default",
    )

    async with conn.cursor() as cursor:
        await cursor.execute("SELECT 1")
        ret = cursor.fetchone()
        print(ret)

loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.wait([main()]))

returns: (1,)

with no column types?

In the line https://github.com/long2ice/asynch/blob/01f2502d8b22868d03996839625d6c3299bfcf3e/asynch/cursors.py#L61, I can see with_column_types=True, but you are not returning them.

ghuname commented 3 years ago

@long2ice Can you please answer to this issue?

long2ice commented 3 years ago

Maybe bug there, PR is welcome

ghuname commented 3 years ago

Why you closed this issue?