yesodweb / yesodweb.com-content

Content for the www.yesodweb.com site
http://www.yesodweb.com/
Other
67 stars 112 forks source link

PersistField vs. PersistValue #262

Closed StevenXL closed 3 years ago

StevenXL commented 3 years ago

Hi folks.

I accidentally pushed a commit to master, when my intention was to open a PR for discussion.

Rather than trying to undo what I did, I thought it would be best to bring attention to the change, and if it is not appropriate, we can discuss how to undo the change (open a PR w/ a revert commit).

In essence, I changed the language from A +PersistField+ correlates to a column in a SQL database. In our person example above, name and age would be our ++PersistField++s to A +PersistValue+ correlates to a column in a SQL database. In our person example above, name and age would be our ++PersistValues++s.

Saying that a PersistField correlates to a column in our database is confusing, as it gives the impression that, for a data type such as data Person = Person {personName :: String, personAge :: Maybe Int}, there exists instances of PersistField for personName and personAge. (Which further implies we've generated data types for the fields, but I think even w/o this elaboration, the point of confusion stands).

LMK what you all think.

snoyberg commented 3 years ago

Looks good to me, not objections. Thanks! I'm fine leaving as is and closing this issue if you are :)