> ouch, that's seriously unpleasant syntax.should these be proxied by
> methods in DataMapper so you could do DataMapper.query('SELECT.....")
> for default repository?
Well, you don't technically need to specify :default. You can just do
repository.adapter.query().
The reason the method is on the adapter, and not directly on
repository, is because it is a SQL specific action. It makes sense for
a SQL adapter to accept a string to query, but that is not necessarily
the case for other kinds of databases.
It would be easy enough, of course, for you to add that yourself (or
turn it into a plugin).
module DataMapper
def query(sql)
repository.adapter.query(sql)
end
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---