diff --git a/src/Opaleye/Internal/Table.hs b/src/Opaleye/Internal/Table.hs index d43a3dc7..54cf0d22 100644 --- a/src/Opaleye/Internal/Table.hs +++ b/src/Opaleye/Internal/Table.hs @@ -93,7 +93,9 @@ requiredTableField :: String -> TableFields (Field_ n a) (Field_ n a) requiredTableField = lmap Just . optionalTableField -- | 'optionalTableField' is for fields that you can omit on writes, --- such as fields which have defaults or which are SERIAL. +-- such as fields which have defaults or which are SERIAL. Setting +-- the write value to @Nothing@ uses SQL @DEFAULT@ in the generated +-- update. optionalTableField :: String -> TableFields (Maybe (Field_ n a)) (Field_ n a) optionalTableField columnName = TableFields (optionalW columnName)