On Apr 14, 12:16 pm, Michael Lang <[email protected]> wrote:
> One of the biggest mistakes I've made is calling update dataset before
> adding a filter call.
>
> That is,
>     DB[:patients].update(:code => 5).filter(:chart => 1234)
>
> is not the same as:
>     DB[:patients].filter(:chart => 1234).update(:code => 5)
>
> The select construct is so easy to mix up the order of things, its not too
> hard to imagine a beginner not knowing the real rules to ordering of various
> calls and their ramification.  Covering how to correctly construct these
> calls and what the ramifications are would help the beginner that is
> starting to grok sequel along a little better.
>
> Better coverage of the fact that as you chain each dataset method calls,
> you're getting back a cloned dataset (recent sequel-talk thread) so that
> each is always mutable.  I never quite realized this was happening, but now
> that I know, it helps me understand how Sequel works a lot better.

Today I committed the first set of documentation patches related to
this area:

http://github.com/jeremyevans/sequel/commit/a39fc8f30438ba07fffaec48013f43fb1ea6b25e
http://github.com/jeremyevans/sequel/commit/c898e4d0c0c1ed1b6c886fec97cfe886f4558c94
http://github.com/jeremyevans/sequel/commit/81af78a6fc306affb258ba7326b02f0bd460a882

Examples of the results are available at:
http://code.jeremyevans.net/sequel-www/rdoc/files/README_rdoc.html
http://code.jeremyevans.net/sequel-www/rdoc/classes/Sequel/Dataset.html
http://code.jeremyevans.net/sequel-www/rdoc/files/doc/dataset_basics_rdoc.html

Please take a look and let me know if I'm heading in the right
direction.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to