> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Michiel Meeuwissen > > So I was looking to BasicSqlHandler to see if I could smartly > override some things for PostgreSqlSqlHandler to make it > perform better. > > The problem with BasicSqlHandler is however that it consists > of a few gigantic methods (like > 'appendQueryBodyToSql',appendConstraintsToSql) doing much of > the work. > > Would it be an idea to split these methods somehow up in > smaller pieces, which would then be overridable a bit more easily?
Yes, this can be done when the need arises. I did anticipate the BasicSqlHandler subclasses to evolve overtime, each one becoming a better fit to the specific database it handles. The PostgreSQL join syntax is a good example for such an improvement. In BasicSqlHandler I prefered to use a small number of large methods to keep things simple and easy to understand. This will effectively make it easier to modify the subclasses. MMBase contains several examples demonstrating the opposite case: classes that are hard to modify because the superclass contains too many methods, making it hard to understand (e.g. MMSQL92Node). Rob van Maris Technical Consultant Quantiq xmedia & communication solutions Koninginneweg 11-13 1217 KP Hilversum T +31 (0)356257211 M +31 (0)651444006 E [EMAIL PROTECTED]
