SQL Blender is a form generating tool that uses a database connection to learn about your schema and automagically build useful forms and methods.
One of the earliest form generating tools for Zope is the P SQL Input Wizard. After a multipage input form, asking what tables and columns you are interested in, it generates a usable input form and Z SQL Methods. This was expanded to the Znolk SQL Wizard which added some additional features. Both of these Products provide a way to generate a simple form relatively quickly, but suffer the same flaw: The entry pages are somewhat protracted and unforgiving; if an error is made in selecting columns, you need to start over or manually edit.
Behold the SQL Blender!
The SQL Blender Product was designed with these goals in mind:
With one form, SQL Blender is able to interrogate your database and build all the forms and Z SQL Methods you need to list, display, and edit records for every table in your database. It will also massage the column labels if you want. And if you need to make changes, the SQL Blender is a persistent object you can edit to add more columns or computed fields, or even JOIN conditions.
SQL Blender works best with a Database Adapter that supports a table browser. If your DA does not have a table browser, SQL Blender will be unable to determine your database's schema, but you can still create SQL Blenders and SQLB Columns manually. So far, the only tested DA is ZMySQLDA, but a number of others should work.
Starting with ZMySQLDA-2.0.8, a great deal of column information is stored in the table browser data, such as primary key, index, unique, NOT NULL, etc. This information is used by SQL Blender to implement various interesting features. Other DAs probably do not provide all this information yet, but can probably be easily modified to do so.
No form-generating product is going to be flexible enough to cover every possible contingency. Even with SQL Blender, you should expect to do some editing to get things where you want them.
|aqueduct.diff (1 K)||All|
|sqlgroup.1576.diff (2 K)||All|
|SQLBlender-0.0.0.tar.gz (8 K)||All|