Following the creation of the MMBase-1_6 branch in CVS, I've committed lots
of new code resulting from the dbsq project to CVS HEAD.
This concludes phase 1 and 2 according to our plan of action - as posted on
this list and the project homepage. In summary:

- New packages containing the core of the new SearchQuery framework:
    org.mmbase.storage.search - and subpackages

- Some of thes containg handler classes for database:
    org.mmbase.storage.search.implementation.database - and subpackages

- The database support class interface, MMJdbc2Node, has been extended with
three methods to make it implement the SearchQueryHandler interface.

- Consequently, the concrete database supportclasses have been modified, to
implement the extended MMJdbc2Node interface:
1) They extend BaseJdbc2Node
2) This line has been inserted in their init() method to initialize their
superclass:
    super.init(disallowed2allowed, parser);
If you are using a database support class that is not in CVS, you'll have to
modify it accordingly yourself.

- BaseJdbc2Node delegates to a BasicQueryHandler instance, that implements
the SearchQueryHandler interface for a database storage. BasicQueryHandler,
in turn, delegates to a SqlHandler instance the translation of SearchQuery
objects to SQL statements.
The BasicQueryHandler instance also provides support for LIMIT/OFFSET
functionality depending on the SqlHandler instance.
If the SqlHandler instance provides support for this (depending on the
underlying database), BasicQueryHandler will use this.
Otherwise, BasicQueryHandler will provide "weak" support by
truncating/skipping resultsets - already a substantial improvement over
reading the entire resultset.

- There are now 4 SqlHandler implementations:
1) BasicSqlHandler - handles only standard SQL92 funtionality. Consequently
it does not support LIMIT/OFFSET.
2) MySqlSqlHandler, InformixSqlHandler and PostgresSqlSqlHandler - extend
BasicSqlHandler to support LIMIT/OFFSET as well, with syntax varying accross
vendors.

- The database config dtd has been extended (now version 1.2) to contain
extra configuration data, to configure the SqlHandler implementation to be
used.

- The database configuration files have been modified accordingly, by
inserting a line like this:

<sqlhandler>org.mmbase.storage.search.implementation.database.BasicSqlHandle
r</sqlhandler>
If you are using a database support class that is not in CVS, you'll have to
modify its configuration accordingly yourself.

Thanks to this design, factoring out handling code into separate handlers,
it will be possible to reuse the handlers later on in the new "storage"
classes without duplicating code.

Having completed phase1 and 2, the new SearchQuery core is in place. At
present, MMBase is not affected in its operation, as it does not access the
new SearchQuery API's yet.

Phase 3 will clean/modify existing code to take advantage of the new
SearchQuery framework. Proposals for modifications to existing API's will
follow shortly.

Perhaps you have no idea what I'm talking about.
Don't worry. You can visit the project homepage at
http://www.vpro.nl/personal/robvanmaris/index.html for more info.


Rob van Maris
Developer

Finalist IT Group
Java Specialists
-------------------------------------------------------------
Amsterdam, The Netherlands
Office: +31 20 5962321 (Direct)
Mobile: +31 651444006
Fax: +31 20 5962331
-------------------------------------------------------------



Reply via email to