Skip to content

Commit

Permalink
docs: fetch() -> query()
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Feb 25, 2021
1 parent 90d1b22 commit 9aad290
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/api/asyncio_con.rst
Original file line number Diff line number Diff line change
Expand Up @@ -635,15 +635,15 @@ Python code. Here is an example:
async for tx in pool.retrying_transaction():
async with tx:
user = await tx.fetch_one(
user = await tx.query_one(
"SELECT User { email } FILTER .login = <str>$login",
login=login,
)
data = await httpclient.get(
'https://service.local/email_info',
params=dict(email=user.email),
)
user = await tx.fetch_one('''
user = await tx.query_one('''
UPDATE User FILTER .login = <str>$login
SET { email_info := <json>$data}
''',
Expand Down
4 changes: 2 additions & 2 deletions docs/api/blocking_con.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,15 @@ Python code. Here is an example:
for tx in pool.retrying_transaction():
with tx:
user = tx.fetch_one(
user = tx.query_one(
"SELECT User { email } FILTER .login = <str>$login",
login=login,
)
data = httpclient.get(
'https://service.local/email_info',
params=dict(email=user.email),
)
user = tx.fetch_one('''
user = tx.query_one('''
UPDATE User FILTER .login = <str>$login
SET { email_info := <json>$data}
''',
Expand Down

0 comments on commit 9aad290

Please sign in to comment.