dkubb changed the topic of #datamapper to: Datamapper v1.2.0 | Mailing List: http://is.gd/aa9D | Logs: http://is.gd/qWAL7V | DataMapper 2 Renamed to ROM, see #rom-rb for development
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
v0n has joined #datamapper
v0n has quit [Ping timeout: 260 seconds]
akasper has joined #datamapper
akasper has quit [Quit: Leaving.]
v0n has joined #datamapper
brianpWins has joined #datamapper
v0n has quit [Ping timeout: 248 seconds]
snusnu has quit [Quit: Leaving.]
postmodern has quit [Quit: Leaving]
postmodern has joined #datamapper
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
namelessjon has quit [Ping timeout: 240 seconds]
namelessjon has joined #datamapper
v0n has joined #datamapper
v0n has quit [Read error: Operation timed out]
skade has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
mbj has joined #datamapper
mbj has quit [Ping timeout: 264 seconds]
skade has joined #datamapper
mbj has joined #datamapper
grandy has quit [Ping timeout: 264 seconds]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #datamapper
snusnu has joined #datamapper
mbj has quit [Ping timeout: 268 seconds]
grandy has joined #datamapper
mikecmpbll has joined #datamapper
akasper has joined #datamapper
akasper has quit [Quit: Leaving.]
rsim has joined #datamapper
zombor has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
zombor has quit [Remote host closed the connection]
<brianpWins>
When dealing with composite keys. How do I know which one goes first? I would have thought alphabetically by key name. but in one case it's getting me to do it Join.get(tag_id, event_id).
<brianpWins>
where I would have assumed it to be alphabetically. Join.get(event_id, tag_id)
rsim has quit [Quit: Leaving.]
snusnu has quit [Quit: Leaving.]
zombor has joined #datamapper
grandy has quit [Ping timeout: 268 seconds]
kapowaz has quit [Ping timeout: 252 seconds]
zombor has quit [Remote host closed the connection]
zombor has joined #datamapper
kapowaz has joined #datamapper
rsim has joined #datamapper
skade has quit [Quit: Computer has gone to sleep.]
rsim has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
mbj has joined #datamapper
brianpWins has quit [Quit: brianpWins]
grandy has joined #datamapper
brianpWins has joined #datamapper
snusnu has joined #datamapper
lgierth has joined #datamapper
<brianpWins>
Is there a method I can call somewhere in DM to escape a string properly before I query with that string using User.all(:conditions => my_query)
<lgierth>
brianpWins, you dont need to escape it
<lgierth>
the underlying adapter will take care of that
<lgierth>
i.e. do_mysql will use the proper mysql function to escape it, do_postgres will use the pg function, etc.
<brianpWins>
hmmm
<lgierth>
ah, for custom sql?
<brianpWins>
yeah. it's a generated string being fed in.
<brianpWins>
IS NULL AND (first_name ilike '%Brian'Pearce% is throwing DataObjects::SyntaxError because of the apostrophe between names.
<brianpWins>
was hoping dm might have a generic string escaping method somewhere I coulditilize before I pass my string into the condition.
<lgierth>
maybe you could construct that query using the dsl. something like User.all(:foo.ne => nil, :first_name.like => "%brian%")
<lgierth>
i'm sure it has such a method, looking where it is
<brianpWins>
I had tried that but failed at the unions.
<brianpWins>
as first_name and last_name need to be checked for every word in whatever the passed string is.
<brianpWins>
which mean a lot of User.all(firtst_name => '', :last_name => '') | User.etc
<brianpWins>
I couldn't find a graceful way to dynamically create that many lookups and union them together