Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataMapper adapter #3

Open
marcoow opened this issue Feb 8, 2010 · 4 comments
Open

DataMapper adapter #3

marcoow opened this issue Feb 8, 2010 · 4 comments

Comments

@marcoow
Copy link
Contributor

marcoow commented Feb 8, 2010

Support for DataMapper would be nice especiall as Rails 3 will make it easy to use DataMapper.

@marcoow
Copy link
Contributor Author

marcoow commented Feb 24, 2010

this is probably hard to do as we cannot (easily) group records by arbitrary strings (e.g. DATE_FORMAT(created_at, 'FORMAT')) in DataMapper.

@kristianmandrup
Copy link

I have been working a bit on DataMapper support in my branch of that name. Haven't started with the SQL "heavy" stuff such as grouping yet however...

@marcoow
Copy link
Contributor Author

marcoow commented Apr 7, 2012

Just had a look at your changes. I think ideally we would have it so that the Report classes etc. always are the same for any ORM and we just change the ORM adapter code for them (e.g. by including different modules or something similar). I guess there will be a lot of duplicated code otherwise.

@kristianmandrup
Copy link

I'm not so sure. I think the best approach for starters is to implement the DataMapper adapter on its own, trying to mirror the AR API as close as possible. Only then will you be able to determine if it is feasible to create a "generic" mapper with conditional code or metamagic in order to support multiple ORMs.
I'm afraid the "one-suit-fit-all" result will likely be code that is very hard to read, follow and maintain... we will see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants