David E. Smith on 22 Jan 2003 01:24:01 -0000


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

Re: [spoon-discuss] Prioritized rule list?


On Tue, 21 Jan 2003, bd wrote:

> Couldn't you use multiple SORT clauses in SQL? I'm something of a newbie when
> it comes to SQL, however, so beware.

Are you thinking of ORDER BY at the end of a query? (as in 'select * from
nomicrules where itemtype='rule' order by rulenum' or something)

The main problem is that both Layers and Chutzpah are sorta grafted on
like some weird Frankenstein's monster's limbs.

There is the big massive "nomicrules" table, which also holds proposals,
CFJs, society charters, and generally anything that's a revisable big
chunk of text. I've worked out how to do most things that need to be done
with it.

Then there's the 'keywords' system, which is just:
Rulenum: Keyword

I just recently added the 'attributes' table, which works exactly like
Keywords. It's basically a few entries like "Chutzpah 3" and
"Deactivated". More cosmetic than anything, really; it just puts that
information at the TOP of a rule's listing, instead of at the bottom with
the revision history.

At some point, I'll either have to:

* Work out the joys of fairly complex joined queries, to sort out those
items with 'Layer *' or 'Chutzpah *' attributes, and do something
intelligent

or

* Try to retro-fit a precedence system into the database, and write all
the code to make that work reasonably well (so that changing a rule's
Chutzpah doesn't involve doing naked db queries)

Neither of these looks like much fun. :-)

...dave
_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss