If you built asyncpg locally, which version of Cython did you use?: N/A
Can the issue be reproduced under both asyncio and
uvloop?: I don't know, I'm using uvloop right now
I'm trying to use asyncpg with SQLAlchemy on a project of mine. However, the following constructs to select a subset of columns in the underlying table doesn't work:
File "./main.py", line 140, in post_telemetry
tel_results = await vmo.database.fetch_all(tel_query)
File "/usr/local/lib/python3.6/site-packages/databases/core.py", line 140, in fetch_all
return await connection.fetch_all(query, values)
File "/usr/local/lib/python3.6/site-packages/databases/core.py", line 239, in fetch_all
return await self._connection.fetch_all(built_query)
File "/usr/local/lib/python3.6/site-packages/databases/backends/postgres.py", line 160, in fetch_all
rows = await self._connection.fetch(query, *args)
File "/usr/local/lib/python3.6/site-packages/asyncpg/connection.py", line 443, in fetch
return await self._execute(query, args, 0, timeout)
File "/usr/local/lib/python3.6/site-packages/asyncpg/connection.py", line 1446, in _execute
query, args, limit, timeout, return_status=return_status)
File "/usr/local/lib/python3.6/site-packages/asyncpg/connection.py", line 1454, in __execute
return await self._do_execute(query, executor, timeout)
File "/usr/local/lib/python3.6/site-packages/asyncpg/connection.py", line 1466, in _do_execute
stmt = await self._get_statement(query, None)
File "/usr/local/lib/python3.6/site-packages/asyncpg/connection.py", line 351, in _get_statement
statement = await self._protocol.prepare(stmt_name, query, timeout)
File "asyncpg/protocol/protocol.pyx", line 163, in prepare
asyncpg.exceptions.DatatypeMismatchError: argument of AND must be type boolean, not type timestamp with time zone
I'm trying to use
asyncpg
withSQLAlchemy
on a project of mine. However, the following constructs to select a subset of columns in the underlying table doesn't work:This raises the following error:
As far as I can't tell,
asyncpg
doesn't seem to support this feature that is present in SQLAlchemy since version 1.4, but I may be wrong.Let me know if you need additional information.