File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
docs/src/piccolo/api_reference Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,13 @@ Date
106106.. autoclass :: DateOffset
107107 :members:
108108
109+
110+ UUID
111+ ~~~~
112+
113+ .. autoclass :: UUID4
114+ :members:
115+
109116-------------------------------------------------------------------------------
110117
111118Testing
Original file line number Diff line number Diff line change 77
88
99class UUID4 (Default ):
10+ """
11+ This makes the default value for a
12+ :class:`UUID <piccolo.columns.column_types.UUID>` column a randomly
13+ generated UUID v4 value. The advantage over using :func:`uuid.uuid4` from
14+ the standard library, is the default is set on the column definition in the
15+ database too.
16+ """
17+
1018 @property
1119 def postgres (self ):
1220 return "uuid_generate_v4()"
You can’t perform that action at this time.
0 commit comments