on master help sign in
doc: Mention generics when declaring TableSchemas (#58)
commit92f7c083007a2492a133adb020880474e1eac5fb authorAdam Bergmark <adam@bergmark.nl> dateMon 21 Jun 2021, 12:34 (5 years ago) parent137ebed
1 file changed+9
docs/tutorial.rst+9
docs/tutorial.rst+9
@@ -147,6 +147,15 @@ And likewise for ``project`` and ``Project``::
147147 }
148148 }
149149
150+There is also some generics machinery available if you want to grab the field information from your Rel8able type::
151+
152+ projectSchema :: TableSchema (Project Name)
153+ projectSchema = TableSchema
154+ { name = "project"
155+ , schema = Nothing
156+ , columns = namesFromLabels @(Project Name)
157+ }
158+
150159
151160.. note::
152161