on master help sign in
Expand on #58
269974eOllie Charles
docs/tutorial.rst+6−2
@@ -147,7 +147,8 @@ And likewise for ``project`` and ``Project``::
147 }
147 }
148 }
148 }
149
149
150−There is also some generics machinery available if you want to grab the field information from your Rel8able type::
150+There is also some generics machinery available if you want to grab the field
151+information from your ``Rel8able`` type::
151
152
152 projectSchema :: TableSchema (Project Name)
153 projectSchema :: TableSchema (Project Name)
153 projectSchema = TableSchema
154 projectSchema = TableSchema
@@ -155,7 +156,10 @@ There is also some generics machinery available if you want to grab the field in
155 , schema = Nothing
156 , schema = Nothing
156 , columns = namesFromLabels @(Project Name)
157 , columns = namesFromLabels @(Project Name)
157 }
158 }
158−
159+
160+This will create a ``TableSchema`` for ``Project`` where every column name
161+corresponds exactly to the name of the field. If you need more flexibility, you
162+can use ``namesFromLabelsWith``, which takes a transformation function.
159
163
160.. note::
164.. note::
161
165