On Apr 21, 2010, at 5:19 PM, Fearless Fool wrote:
Rob Biedenharn wrote:
Can you do it in two steps?
...
You could also split your single sql on a '$$' boundary and iterate
over each fragment.
-Rob
Hi Rob: Sure - I could feed a line at a time for that matter. But
consider me curious: what's the rationale behind splitting it? (I
admit
I'm a little nervous about a function that leaves the intermediate
state
of the SQL interpreter with delimiters set to $$ -- I suspect
everything
would stop working if that was interrupted before resetting the
delimiters...)
- ff
I'm not saying to change the delimiter at all! You just need to pass
one statement to the mysql adapter (note Fred's post) rather than
expecting it to parse the multiple statements. You're not feeding
"lines", but "statements". The create part is certainly more than one
line.
-Rob
Rob Biedenharn http://agileconsultingllc.com
[email protected]
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: 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/rubyonrails-talk?hl=en.