SMACS

Package smacs.find

[5] extended AST tree handling generating JDBC snippets.

See:
          Description

Class Summary
CreateTableFile Parse TableDefs from Sql File.
CreateTableFile.Code SqlWriter adapter
CreateTableFile.Writer SqlWriter derivate
DatabaseList Scan node tree for items looking like database/schema references.
InsertFrom derived from earlier {link smacs.find.Selins}. - described as follows...
InsertFrom.Rule a compact notation to pass around parts of a SelIns rule
InsertFromTree Writing out a LoadStore tree taking some SqlScript Tree as input.
InsertInto derived from earlier SelinsCode - described as follows...
InsertInto.Rule a compact notation to pass around parts of a SelIns rule
JavaWriter java code formatting helper.
Selected Build a new tree with nodes selected on an xpath string.
SelinsCode create java code for an sql tree.
SelinsCode.Rule a compact notation to pass around parts of a SelIns rule
SelinsCodeTree Writing out a LoadStore Tree taking some SqlScript Tree as input.
SelinsCodeWriter writing out SelinsCodeTree as a jdbc tasklet script.
SelinsFile write java program for a Selins list.
SelinsFile.Code write the script including table mapping
SelinsFile.Writer write the script including table mapping
TableDefs build node tree representing a schema definition done in sql/ddl.
TableList scan a list of tables from an sql parsing tree.
TableListMapping Convert a list of remote table reference into simple table names.
TableName a data container. used by: TableListMapping, ...
TableName.Sorter to sort TableName arrays
TableReferenceMaker Generate TablerReference nodes in multipart TableColumn nodes.
TableReferenceWalker Generate TableReference entries in multipart TableColumn nodes.
testtable  
 

Package smacs.find Description

[5] extended AST tree handling generating JDBC snippets.

This is based on the source templates from smacs.findsql.* and uses the extended Node interface from smacs.tree.*

During the course of adapting the source templates from smacs.findsql.* it turned out that some implementation pieces were not quite generic at all. The conversion of source code from using smacs.tree.SimpleNode insteadd of smacs.sql.SimpleNode was yield lots of small changes.

In the end, there are some parts in smacs.find.* being virtually identical code-wise with smacs.findsql.* but working on a very different internal AST. Using that extended AST we can choose different implementation methods for other algorithms. It happens that the mere javacc AST is sometimes a bit uneasy.

Or more formally, the SelinsFile should generate an output AST to be converted to a script in a second step. Only with that output AST we have a chance to add proper optimization routines on the output lanuage. The SelinsFile however is code drawn from the template in smacs.findsql.* and shows how to do it directly with a javacc AST - generating java source code directly.

After all, this is the next step for a proper smacs.tree AST compiler system allowing the amount of subtree unrolling and GCSE methods (common subexpression evaluation detections) that is needed for an extensible optimizing compiler that results in efficient schema mapping applications.


SMACS