Skip to content

Commit

Permalink
Add HStore NULL to None conversion example
Browse files Browse the repository at this point in the history
  • Loading branch information
aaliddell authored and elprans committed Jul 18, 2020
1 parent f3013b7 commit c585001
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/usage.rst
Expand Up @@ -320,8 +320,8 @@ be registered on a connection using :meth:`Connection.set_builtin_type_codec()
# Assuming the hstore extension exists in the public schema.
await conn.set_builtin_type_codec(
'hstore', codec_name='pg_contrib.hstore')
result = await conn.fetchval("SELECT 'a=>1,b=>2'::hstore")
assert result == {'a': '1', 'b': '2'}
result = await conn.fetchval("SELECT 'a=>1,b=>2,c=>NULL'::hstore")
assert result == {'a': '1', 'b': '2', 'c': None}
asyncio.get_event_loop().run_until_complete(run())
Expand Down

0 comments on commit c585001

Please sign in to comment.