net.sourceforge.squirrel_sql.plugins.oracle.tokenizer
Class OracleQueryTokenizer

java.lang.Object
  extended by net.sourceforge.squirrel_sql.fw.sql.QueryTokenizer
      extended by net.sourceforge.squirrel_sql.plugins.oracle.tokenizer.OracleQueryTokenizer
All Implemented Interfaces:
IQueryTokenizer

public class OracleQueryTokenizer
extends QueryTokenizer
implements IQueryTokenizer

This class is loaded by the Oracle Plugin and registered with all Oracle Sessions as the query tokenizer if the plugin is loaded. It handles some of the syntax allowed in SQL-Plus scripts that would be hard to parse in a generic way for any database. It handles create statements for stored procedures, triggers, functions and anonymous procedure blocks. It can also handle "/" as the statement terminator in leiu of or in addition to the default statement separator which is ";". This class is not meant to fully replicate all of the syntax available in the highly expressive and venerable SQL-Plus reporting tool.

Author:
manningr

Field Summary
 
Fields inherited from class net.sourceforge.squirrel_sql.fw.sql.QueryTokenizer
_lineCommentBegin, _queries, _queryIterator, _querySep, _removeMultiLineComment, _tokenizerFactory
 
Constructor Summary
OracleQueryTokenizer(IQueryTokenizerPreferenceBean prefs)
           
 
Method Summary
 TokenizerSessPropsInteractions getTokenizerSessPropsInteractions()
           
protected  void setFactory()
          Sets the ITokenizerFactory which is used to create additional instances of the IQueryTokenizer - this is used for handling file includes recursively.
 void setScriptToTokenize(String script)
           
 
Methods inherited from class net.sourceforge.squirrel_sql.fw.sql.QueryTokenizer
expandFileIncludes, getLineCommentBegin, getQueryCount, getQuerySep, getSQLStatementSeparator, getStatementsFromIncludeFile, hasQuery, isRemoveMultiLineComment, main, nextQuery, setLineCommentBegin, setQuerySep, setRemoveMultiLineComment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.squirrel_sql.fw.sql.IQueryTokenizer
getLineCommentBegin, getQueryCount, getSQLStatementSeparator, hasQuery, isRemoveMultiLineComment, nextQuery
 

Constructor Detail

OracleQueryTokenizer

public OracleQueryTokenizer(IQueryTokenizerPreferenceBean prefs)
Method Detail

setScriptToTokenize

public void setScriptToTokenize(String script)
Specified by:
setScriptToTokenize in interface IQueryTokenizer
Overrides:
setScriptToTokenize in class QueryTokenizer

setFactory

protected void setFactory()
Sets the ITokenizerFactory which is used to create additional instances of the IQueryTokenizer - this is used for handling file includes recursively.

Overrides:
setFactory in class QueryTokenizer

getTokenizerSessPropsInteractions

public TokenizerSessPropsInteractions getTokenizerSessPropsInteractions()
Specified by:
getTokenizerSessPropsInteractions in interface IQueryTokenizer
Overrides:
getTokenizerSessPropsInteractions in class QueryTokenizer


Copyright © 2001-2013. All Rights Reserved.