Examples of SQLStatementParser


Examples of org.hibernate.hql.internal.antlr.SqlStatementParser

*/
public class MultipleLinesSqlCommandExtractor implements ImportSqlCommandExtractor {
  @Override
  public String[] extractCommands(Reader reader) {
    final SqlStatementLexer lexer = new SqlStatementLexer( reader );
    final SqlStatementParser parser = new SqlStatementParser( lexer );
    try {
      parser.script(); // Parse script.
      parser.throwExceptionIfErrorOccurred();
    }
    catch ( Exception e ) {
      throw new ImportScriptException( "Error during import script parsing.", e );
    }
    List<String> statementList = parser.getStatementList();
    return statementList.toArray( new String[statementList.size()] );
  }
View Full Code Here

Examples of org.jitterbit.integration.database.SqlStatementParser

    }

    private void applyAdHocFilterToManualSqlStatement(CROM rootTable, String adHocFilter, String manualSql)
                    throws ExternalDatabaseException {
        try {
            SqlStatementParser parser = new SqlStatementParser(manualSql);
            String newSql = parser.replaceFilter(adHocFilter);
            ((CROM_DB) rootTable.getExtension()).setManualSqlStatement(newSql);
        } catch (Exception ex) {
            throw new ExternalDatabaseException("Jitterbit could not modify the manual SQL statement by adding " +
                    "the filter \"" + adHocFilter + "\". This is a bug. Please report it to Jitterbit Support.", ex);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.