Skip to content

Commit 98de5b6

Browse files
committed
bumped version
1 parent e7c5d72 commit 98de5b6

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

CHANGES

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
Changes
22
=======
33

4+
0.24.0
5+
------
6+
Lots of improvements to ``JSON`` and ``JSONB`` columns. Piccolo will now
7+
automatically convert between Python types and JSON strings. For example, with
8+
this schema:
9+
10+
.. code-block:: python
11+
12+
class RecordingStudio(Table):
13+
name = Varchar()
14+
facilities = JSON()
15+
16+
We can now do the following:
17+
18+
.. code-block:: python
19+
20+
RecordingStudio(
21+
name="Abbey Road",
22+
facilities={'mixing_desk': True} # Will automatically be converted to a JSON string
23+
).save().run_sync()
24+
25+
Similarly, when fetching data from a JSON column, Piccolo can now automatically
26+
deserialise it.
27+
28+
.. code-block:: python
29+
30+
>>> RecordingStudio.select().output(load_json=True).run_sync()
31+
[{'id': 1, 'name': 'Abbey Road', 'facilities': {'mixing_desk': True}]
32+
33+
>>> studio = RecordingStudio.objects().first().output(load_json=True).run_sync()
34+
>>> studio.facilities
35+
{'mixing_desk': True}
36+
437
0.23.0
538
------
639
Added the ``create_table_class`` function, which can be used to create

piccolo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__VERSION__ = "0.23.0"
1+
__VERSION__ = "0.24.0"

0 commit comments

Comments
 (0)