Summary

restSQL 0.8.8 adds an automatic resource definition generation tool.
  1. Get started with the framework faster by generating resource definitions for all tables in a database schema.
  2. Framework refactoring necessitates changes to restsql.properties files.
  3. The release also addresses Issue #51 and restores operation of the definition viewer in the SDK API Explorer.

Automatic Resource Definition Generation Tool

The tool creates resource definition templates for all columns for each table in a database schema. The definitions are created in the user-provided subfolder. These resources can be immediately used, or modified and reloaded and moved as necessary.

The tool is accessed after deploying restsql from the Tools link on the home page, or from http://host:port/restsql/tools . Enter the subfolder name (default is 'auto') and the database name. The definitions are created in the configured SQL Resources directory (in the restsql.properties file). These are viewable from the SQL Resources browser, i.e. http://host:port/restsql/res .

restsql.properties changes

Db-specific implementations of SqlBuilder were added.

A new tool, ResourceDefinitionGenerator was added, with db-specific implmentations.

Framework now binds to ColumnMetaData and TableMetaData interfaces, so custom implementations can be provided.

Following are the excerpts with the additional properties

# DB-specific implementation classes - match the implementation to your database
...
org.restsql.core.SqlBuilder=org.restsql.core.impl.mysql.MySqlSqlBuilder
org.restsql.tools.ResourceDefinitionGenerator=org.restsql.tools.impl.mysql.MySqlResourceDefinitionGenerator

# Implementation classes - use these to customize the framework
...
org.restsql.core.ColumnMetaData=org.restsql.core.impl.ColumnMetaDataImpl
org.restsql.core.TableMetaData=org.restsql.core.impl.TableMetaDataImpl

If you are using MySQL with the built-in implementation classes, none of the preceeding properties are required. Please refer to the following examples:

Migration

Possibly change restsql.properties per above.