Re: [MOP] How do I add an extra slot to a class?



* Saurabh Nanda <fb5r6i$mrq$1@xxxxxxxxxxxxxxxxxxxxxxxxx> :
|> Another thing I wanted to do was: given a view-class object, introspect
|> the join slots and figure out the relations. The key thing is to have a
|> representation for the relations that your program (not just CL-SQL) can
|> access and use at runtime. This could not be done with view-class
|> across sql + lisp implementation combinations. (I use clsql and ysql,
|> and would like to use commonsql too).
|
| I'm not sure I understood what you're trying to do here. Can you
| elaborate a bit?

Just that. Imagine you don't know the columns (slot names) upfront.
Now the descriptions of relations are specified by the db-kind and
db-info arguments to def-view-class. I was making the case for this
information to be available at runtime, given just a view-class object.

One application, if this were possible, is to say, write "generic" code
for presentation and input methods for database objects for a specific
application, which can be called at runtime, and which takes advantage
of standard clos modeling. A lot of this would otherwise be just boiler
plate db access and presentation code which needs to be filled in with
correct slot names, and which cannot use OO (to capture the common
behaviour.) Maybe this is clearer?

--
Madhu
.