[web-devel] What does Persist's PersistUpdate datatype do?

Michael Snoyman michael at snoyman.com
Sun Apr 17 05:53:07 CEST 2011

On Sun, Apr 17, 2011 at 6:27 AM, Ian Duncan <iand675 at gmail.com> wrote:

> I'm fiddling around a bit with the Persist library and wondering what the
> PersistUpdate datatype does. From what I can gather, it looks like Update
> replaces the value, add will add to the current value if it is an integer or
> double, and subtract, multiply, and divide perform their respective
> operations. Is this correct, or is there something else to these types?
Nope, that's it. In SQL, none of the
addition/subtraction/multiplication/division logic is performed in
Persistent, rather it's all passed off to the SQL engine. So if you try to
divide two strings, the result depends on what the SQL engine allows.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110417/05ec1911/attachment.htm>

More information about the web-devel mailing list