Interface SqlTokenizer

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
SqlReaderTokenizer

public interface SqlTokenizer extends Closeable
This interface provides a contract to iterate SQL statements.
Version:
1.0
Author:
Fyodor Kupolov
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int[]
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int[]
    This method returns list of injections for the last returned statement.
    Parses the following SQL statement from the source.

    Methods inherited from interface java.io.Closeable

    close
  • Field Details

    • EMPTY_INJECTIONS_ARRAY

      static final int[] EMPTY_INJECTIONS_ARRAY
  • Method Details

    • nextStatement

      String nextStatement() throws IOException
      Parses the following SQL statement from the source.

      Use getInjections() to obtain recognized injections, e.g. binding variables and/or expressions.

      Returns:
      parsed SQL statement or null if EOF.
      Throws:
      IOException - if I/O exception occurs
    • getInjections

      int[] getInjections()
      This method returns list of injections for the last returned statement.
      Returns:
      injections for the last returned statement.