Re: [PATCH] expressions, metaclasses, generic-postgresql

Vladimir Sekissov <[email protected]> Fri, 23 Dec 2005 19:30:24 +0500 (YEKT)
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Good day,

a_bakic> > - sql/metaclasses.lisp - check that metaclass is standard-db-class or
a_bakic> >   it's subclass to prevent adding standard-db-object to supers if
a_bakic> >   somebody in the path has it already when metaclass inherited from
a_bakic> >   standard-db-class.
a_bakic> 
a_bakic> Is the above towards supporting view inheritance? (I am not sure if it is
a_bakic> available already, though.) For example, if I wanted to have
a_bakic> 
a_bakic> (def-view-class a ()
a_bakic>   ((s1...)
a_bakic>    (s2...)))
a_bakic> 
a_bakic> (def-view-class b (a)
a_bakic>   ((s3...)))
a_bakic> 
a_bakic> so that I could call create-view-from-class on b and get a table with three
a_bakic> columns (s1, s2 and s3),
a_bakic> 
a_bakic> would you patch help/make a difference?

It was the problem only when you had metaclass for view distinct from
'standard-db-class' because exact equality was used to check metaclass
type.

I'm using my own metaclass inherited from 'standard-db-class' and had
these problems.

Custom metaclasses are very useful with CLSQL. I'm using them
for slot changes tracking, adding slots from join-slot object to
class (is-a relationship) , mapping virtual slots to attributes
table (instance-id, attribute-name, value) and other things
to fill the gaps between objects and relations.

Best Regards,
Vladimir Sekissov