I also need to do this, I want to issue a command to MySQL to set the 
Transaction Isolation level but haven't found out how to send raw SQL 
statements through DataMapper. Any takers?

On Thursday, May 3, 2012 8:19:43 AM UTC+2, Johannes Held wrote:
>
> Hello list,
>
> I’m wondering what's the proper way to execute a SQL statement via 
> DataMapper.
>
> Assume I these models are created at runtime:
>
> class Bar
>   include DataMapper::Resource
>   property :id, :Serial
> end
>
> class Foo
>   include DataMapper::Resource
>   property :a, :Serial
>   property :b, :Serial
>   belongs_to Bar, :key => true
> end
>
> Now I want to create a view (and a model to mirror that view):
> create view foo_count as 
> select a, b, count(bar) as count 
> from foo 
> group by a, b
>
> How can I use DataMapper to execute this statement?
> Is there a way to use the name system of DataMapper?
>
> --
> Cheers, Johannes
>

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/datamapper/-/BBN4m098lKsJ.
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/datamapper?hl=en.

Reply via email to