Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
public interface SQLDialectInterface {

    public String getDatabaseType();

    public String quoteStringLiteral(Object str);
 

  public boolean isSupportedFunction(String functionName);

    public boolean isAggregateFunction(String functionName);

    public boolean isSupportedInfixOperator(String operator);

    public SQLFunctionGeneratorInterface getFunctionSQLGenerator(String functionName);

    public SQLOperatorGeneratorInterface getInfixOperatorSQLGenerator(String operatorName);

    public String getDateSQL(int year, int month, int day);
 

  public String generateSelectStatement(SQLQueryModel model);
 

  public int getMaxTableNameLength();
}

...

http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html
http://java.sun.com/developer/technicalArticles/javase/extensible/index.html

Sample Source Code

Attached is a sample project with the aforementioned SampleDB Dialect Plugin and a SampleDB Kettle Database Plugin: http://wiki.pentaho.com/download/attachments/19235857/sampledb-plugin.tar.gz

For more information on how to test a Kettle Plugin click here.