I like these ideas. we should have an IRC meetings and discuss it further.
On Jan 23, 4:58 pm, Robin B <[email protected]> wrote: > Actually storing mini tables inside of tables could be useful for > denormalized databases (GAE) so you can avoid N+1 joins. > > Robin > > On Jan 23, 4:54 pm, Robin B <[email protected]> wrote: > > > DICTDB could be implemented as dicts(tables) of dicts(ids) of dicts > > (attrs), so these simple databases would be pickle-able, therefore you > > could theoretically store little tables inside of regular database > > tables, and access them all with the same DAL syntax. I am not sure > > why anyone would want to do this, but it would work. > > > Robin > > > On Jan 23, 2:53 pm, Robin B <[email protected]> wrote: > > > > I was trying to show that Sessions does not actually use the query > > > interface (db(table.id==record_id).select()) in really only uses > > > get,set,del. > > > > > > del db.sessions[0] -> clear table > > > > > not explicit so dangerous, imagine del db.sessions[id] and id==0 by > > > > mistake? do you really want to clear the table? > > > > Very true, this should not be exposed to the user. But if you think > > > about it the other way, > > > the lower level driver could implement: > > > del db.sessions[0] > > > the high level dal api would call this: > > > db.sessions.clear() -> del db.sessions[0] > > > > > > del db.sessions[id] -> drop row > > > > > works, in trunk > > > > > > db.sessions[0] = db.sessions(**attrs) -> insert > > > > the high level dal api would call this: > > > db.sessions.insert(**attrs) > > > the lower level driver could implement: > > > ->rec = db.sessions[0] = db.sessions(**attrs) > > > ->if rec and getattr(rec,'id',None): > > > -> return 1 > > > ->return 0 > > > > the low level table drivers (the plumbing) could expose the set: > > > __call__,__getitem__,__setitem__,__delitem__ > > > > the high level dal api (the porcelain) could expose the set: > > > insert(),clear(),... > > > > This way you can add to the high level api without touching every > > > driver, since the high level api could call the low level driver the > > > implement the command. > > > > Also, one could create DICTDB which is sufficient to handle sessions > > > and simple CRUD for tables (insert,fetch,update,delete,all), web2py > > > could work (sessions and CRUD) out of the box w/o having to install > > > sqlite, so new users do not need to install sqlite to try a sample > > > welcome application scaffolding. ;) > > > > Robin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

