As promised, I have recently done substantial testing of the code resulting from the database search query project. After some final adjustments, the code provides excellent backward compatibility with the previously existing code, including SCAN-related code.
This concludes the project. I have attached a short list of issues which might be of interest when making the conversion from MMBase-1.6 to 1.7. These should probably go in the release-notes as well. Ciao, 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]
Conversion of strings to Constraint object ------------------------------------------ Although the searchquery API provides methods to construct queries with constraints, backward compatibility requires conversion of strings to Constraint objects. The following classes provide utility methods to perform this task: * org.mmbase.storage.search.legacy.ConstraintParser * org.mmbase.util.QueryConvertor The former requires a syntax which is a subset of SQL92, the latter allows a few other formats as well. Consult the APIdocs for details. Fallback to legacycode ---------------------- The following classes make attempts to convert constraints strings to Constraint objects, in order to provide backward compatibility. * org.mmbase.storage.search.legacy.ConstraintParser * org.mmbase.module.core.ClusterBuilder * org.mmbase.module.builders.MultiRelations If the attempt fails, execution proceeds gracefully by falling back to the legacy treatment. Each time this happens is logged to a dedicated logger, using priority "SERVICE" and one of the following categories: * org.mmbase.storage.search.legacy.ConstraintParser.fallback * org.mmbase.module.core.ClusterBuilder.fallback * org.mmbase.module.builders.MultiRelations.fallback Reserved words -------------- The new code generates different SQL statements than previously. Because of this, the database may report syntax errors, if the generated SQl contains reserved words, where it previously did not. This situation is known to occur when a reserved word is used as a name for a builder. When this happens, the offending reserved word needs to be added to the list of "disallowed fields" in the database configuration file for your database (in config/databases).
