Great idea Jeremy. This actually did work.

On Sep 18, 10:09 pm, Jeremy Evans <[email protected]> wrote:
> On Sep 18, 7:43 pm, daniel_spaniel <[email protected]> wrote:
>
> > pervasiveSQL / betrieve .. is the db i have to use.
> >  and you have a good point about the sql.
> >  i will keep digging around to see what i can do
>
> You can generate the following SQL, which may work better:
>
> SELECT * FROM "TRIP PASSENGERS"
> WHERE ("KID - DATE" = 39350 AND "KID - TIME" =  764 AND "KID - USER" =
> 4 AND "KID - MULT" = 0 AND "KID COMM" = 17) OR
> ("KID - DATE" = 39829 AND "KID - TIME" =  10 AND "KID - USER" = 20 AND
> "KID - MULT" = 3 AND "KID COMM" = 4)
>
> So the :eager_loader part in the example would change from:
>
> [:album_id, :disc_number, :number]=>id_map.keys
>
> to:
>
> Sequel::SQL::BooleanExpression.new(:OR, *id_map.keys.map{|k|
> [[:album_id, k[0]], [:disc_number, k[1]], [:number, k[2]]].sql_expr})
>
> 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