You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
why am i not getting results of raw sql query back??? #338
from databases import Database
database=Database('postgres://redacted')
await database.connect()
...
...
...
query = "SELECT orders.id AS orders_id, orders.notification_method AS orders_notification_method WHERE shipped=True"
result = await database.fetch_all(query=query))
here is what am getting instead of getting results of my query
print(result)
[<databases.backends.postgres.Record object at 0x7fb3f415ac50>, <databases.backends.postgres.Record object at 0x7fb3f415ae30>, <databases.backends.postgres.Record object at 0x7fb3f415a470>, <databases.backends.postgres.Record object at 0x7fb3f415af50>, <databases.backends.postgres.Record object at 0x7fb3f415ad70>, <databases.backends.postgres.Record object at 0x7fb3f415ab30>, <databases.backends.postgres.Record object at 0x7fb3f415a7d0>, <databases.backends.postgres.Record object at 0x7fb3f415ae90>]
and type says it is a list
print(type(result))
<class 'list'>
how do i return the actual result of the sql query which is to return all rows from the query???
What i really want to do
what i pretty much want to achieve is to have similar result from sqlalchemy query like below and be able to iterate over the rows from the result of the query
Activity
[-]why am i not getting results of query back???[/-][+]why am i not getting results of raw sql query back???[/+]