lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Aug 14, 2005 at 01:52:05PM +0200, PA wrote:
> I'm wondering if anyone is working on some sort of object-relational  
> mapping tool for LuaSQL?
What would such a tool do, mapping which object system?
Isn't most of the OR/M work about type mapping,
which is mostly a non-issue with Lua?
Or would you want to set up set methods derived
from constraints found in the DB?
Or have Lua errors trigger DB rollbacks?
Or have "finally" commit?
Use yet more new syntax for transactions?

> Perhaps something along the lines of NeXT's Enterprise Object's  
> EOAccess framework:
> Or Rails's ActiveRecord:
Don't grasp how this would apply to Lua!?
Could you describe a real problem which could have a mucher
nicer solution using some O/RM?

> SQL92 INFORMATION_SCHEMA provides all the necessary information to  
> build a full fledge ORM library without too much fuss.
Wouldn't we need a "full fledge" object system first?

> Thoughts?
Several years ago I rolled my own little DB frontend (in Java),
coming to the conclusion that there is basically nothing I
could sensibly learn from the DB's metadata, because,
if, say, I find the primary keys to differ from what is
expected, my app is in big trouble anyway.

Nowadays I see one of our customers running hibernate and
I am trying to figure out for months what the fine idea is
about the stuff (besides selling bigger database boxes plus
query caching and DB distribution and load balancing tools,
since hibernate is trashing the DB like mad).

So, thoughts:
Starting from an idea of "full fledged" copied from some other
universe would for sure just end up in trying to emulate much
of this universe (inheritance? exceptions?) in Lua.
Could you give hints what could be improved in plain lua-style
use of LuaSQL?