Skip to content

Commit 18912e4

Browse files
authored
Add HStore NULL to None conversion example
1 parent 7989203 commit 18912e4

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
@@ -320,8 +320,8 @@ be registered on a connection using :meth:`Connection.set_builtin_type_codec()
320320
# Assuming the hstore extension exists in the public schema.
321321
await con.set_builtin_type_codec(
322322
'hstore', codec_name='pg_contrib.hstore')
323-
result = await con.fetchval("SELECT 'a=>1,b=>2'::hstore")
324-
assert result == {'a': '1', 'b': '2'}
323+
result = await con.fetchval("SELECT 'a=>1,b=>2,c=>NULL'::hstore")
324+
assert result == {'a': '1', 'b': '2', 'c': None}
325325
326326
asyncio.get_event_loop().run_until_complete(run())
327327

0 commit comments

Comments
 (0)