Whoops!  Tiny correction on the SQL query examples, they should be:

Union:

  User.all(:active => true) | User.all(:confirmed => false)
  User.all(:active => true) + User.all(:confirmed => false)
  # => SELECT * FROM users WHERE active = true OR confirmed = false

Intersection:

  User.all(:active => true) & User.all(:confirmed => false)
  # => SELECT * FROM users WHERE active = true AND confirmed = false

Difference:

  User.all(:active => true) - User.all(:confirmed => false)
  # => SELECT * FROM users WHERE active = true AND NOT(confirmed =
false)

That's what I get for cutting and pasting ;)

--

Dan
(dkubb)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to datamapper@googlegroups.com
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to