hi, i have a table like this:
And i get a product with this:
async with db.acquire() as connection:
product = await connection.fetchrow('''
SELECT id, name, price FROM product WHERE id = 1
''')
i want the below result:
{
'id': 1,
'name': 'asyncpg',
'price': 3
}
i want to get a json result from query, and Question is: How do it?
hi, i have a table like this:
And i get a product with this:
i want the below result:
i want to get a json result from query, and Question is: How do it?