Skip to content

Commit f5b425a

Browse files
authored
Update usage.rst (#572)
fix hstore example error, change con to conn
1 parent 745f8f8 commit f5b425a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/usage.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ be registered on a connection using :meth:`Connection.set_builtin_type_codec()
318318
async def run():
319319
conn = await asyncpg.connect()
320320
# Assuming the hstore extension exists in the public schema.
321-
await con.set_builtin_type_codec(
321+
await conn.set_builtin_type_codec(
322322
'hstore', codec_name='pg_contrib.hstore')
323-
result = await con.fetchval("SELECT 'a=>1,b=>2'::hstore")
323+
result = await conn.fetchval("SELECT 'a=>1,b=>2'::hstore")
324324
assert result == {'a': 1, 'b': 2}
325325
326326
asyncio.get_event_loop().run_until_complete(run())

0 commit comments

Comments
 (0)