We could do it based on the class name, or based on a class attribute that
indicates its name (so that if you inherit you get the same base name as
your parent class)


On Tue, Apr 30, 2013 at 7:29 AM, Maxime Verger-Del Bove <
notifications@github.com> wrote:

> In gooddataclient/schema/maql.py:
>
> > +
> > +TIME_DROP = ('DROP IF EXISTS {tm.dt.%(dataset)s.%(name)s} CASCADE;\n'
> > +             'ALTER ATTRIBUTE {attr.time.second.of.day.%(schema_ref)s} '
> > +             'DROP KEYS {f_%(dataset)s.tm_%(name)s_id};\n')
> > +
> > +REFERENCE_DROP = 'ALTER ATTRIBUTE {attr.%(schema_ref)s.%(reference)s} DROP KEYS {%(identifier)s}\n;'
> > +
> > +LABEL_DROP = 'ALTER ATTRIBUTE {attr.%(dataset)s.%(reference)s} DROP LABELS {label.%(dataset)s.%(reference)s.%(name)s};\n'
> > +
> > +#####################
> > +# Column alteration #
> > +#####################
> > +
> > +ATTRIBUTE_ALTER_TITLE = 'ALTER ATTRIBUTE {attr.%(dataset)s.%(name)s} VISUAL(TITLE "%(title)s");\n'
> > +
> > +FACT_ALTER_TITLE = 'ALTER FACT {fact.%(dataset)s.%(name)s} VISUAL(TITLE "%(title)s");\n'
>
> Yes, I think it's not that simple. On what parameter would we load the
> templates ? the class name ? what about classes that have no templates and
> that inherit from other class? code duplication ?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Work4Labs/gooddata-python/pull/5/files#r4019230>
> .
>