I like this. I looked at the code but I couldn't find how it gets the table name corresponding to the columns in order to populate the correct objects. The mysql interface has mysql_field_table() but that doesn't exist in mysqli or PDO.
Hi there, I'm not 100% sure what you mean here but I would love to continue the discussion - feel free to email me: [email protected]
In reply to alnayyir:
"Well, if it were Python and not PHP, you'd have a customer. :)"
This from the README:
Anorm is implemented here using PHP, however it was so easy to build (only took me an hour to write the actual code) that I would encourage others to use a similar pattern and implement it in other languages.
Fork and enjoy! I'd love to see this same pattern implemented in a bunch of different languages
I hate to be that guy, but Anorm is already the name of the Play! Scala ORM. Might want to consider a rename. =)
Haha no shit! That's hilarious. Anorm was a typo last year in November when I was first talking to my friend about it on IRC. I meant to type "an orm" - maybe someone else made the same mistake ;)
Thanks for the heads up! (name suggestions welcome :)
Clearly the answer is:
Abnorm.
Nanorm?
anotherorm ?
https://github.com/iaindooley/Anorm
The ORM for SQL lovers!
That's only half the story: I've done the "query reader". Hopefully we can all come up with the ultimate "query builder" together - but the basic principle is that the query reader and query builder should be kept completely separate with SQL as their interface.
I also need to come up with a neat way using closures to "mix-in" functionality to the "query row" objects (that take the place of the normal "boiler plate" DbObject type classes (usually "one per table" kind of deal).
What do y'all reckon? Email [email protected] or fork the project - would love to hear everyone's opinions.