Feature Request #2548

Completely Abstracted ORM

Added by Ben Rogers over 4 years ago.

Status:NewStart date:02/06/2010
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Points:


ORM is a great concept for representing data as a class object, it would be nice to extend it beyond the use of just SQL engines.

To start, ORM as it is now used, would be a Database_ORM class that extended an abstract ORM class. this is similar to a driver based approach, except that the ORM class doesnt need to know what the driver is, the driver extends upon abstract ORM.

This design would allow other types of programs which deliver data represent themselves via an ORM like interface, possibilities are endless, but to give a few ideas: Sphinx search, lucene search, memcache, REST, SOAP, etc.

Ideally each driver would not have to implement a full SQL type interface. it's completely understandable that a sphinx driver doesnt need relationships, where statements, or anything that complex. if one were to create a search model extending sphinx, and it required a special function specific to search, and they later moved to a mysql full test solution, it would be expected for them to change functions to accommodate this change.

I think a good place to start is to lay out what the abstract ORM would require of all drivers. a find function and a limit function for example should be required, as well as a find_all.

any input on what else should be done here would be great. for the purposes of the ticket, the only included "driver" would be database.

Also available in: Atom PDF