Package org.jooq

Interface Parser


  • public interface Parser
    This is experimental functionality.

    While the parser API will probably not change between versions, the functionality itself may be subject to change in future releases.

    Author:
    Lukas Eder
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Queries parse​(java.lang.String sql)
      Parse a SQL string to a set of queries.
      Queries parse​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a set of queries.
      Condition parseCondition​(java.lang.String sql)
      Parse a SQL string to a condition.
      Condition parseCondition​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a condition.
      Field<?> parseField​(java.lang.String sql)
      Parse a SQL string to a field.
      Field<?> parseField​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a field.
      Name parseName​(java.lang.String sql)
      Parse a SQL string to a name.
      Name parseName​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a name.
      Query parseQuery​(java.lang.String sql)
      Parse a SQL string to a query.
      Query parseQuery​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a query.
      ResultQuery<?> parseResultQuery​(java.lang.String sql)
      Parse a SQL string to a result query.
      ResultQuery<?> parseResultQuery​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a result query.
      Row parseRow​(java.lang.String sql)
      Parse a SQL string to a row.
      Row parseRow​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a row.
      Select<?> parseSelect​(java.lang.String sql)
      Parse a SQL string to a select statement.
      Select<?> parseSelect​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string to a select statement.
      Statement parseStatement​(java.lang.String sql)
      Parse a SQL string to a procedural statement.
      Statement parseStatement​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a procedural statement.
      Block parseStatements​(java.lang.String sql)
      Parse a SQL string to a set of procedural statements.
      Block parseStatements​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a set of procedural statements.
      Table<?> parseTable​(java.lang.String sql)
      Parse a SQL string to a table.
      Table<?> parseTable​(java.lang.String sql, java.lang.Object... bindings)
      Parse a SQL string with bind variables to a table.
    • Method Detail

      • parse

        @Support
        @PlainSQL
        Queries parse​(java.lang.String sql,
                      java.lang.Object... bindings)
               throws ParserException
        Parse a SQL string with bind variables to a set of queries.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseQuery

        @Support
        @PlainSQL
        Query parseQuery​(java.lang.String sql,
                         java.lang.Object... bindings)
                  throws ParserException
        Parse a SQL string with bind variables to a query.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseStatement

        @Support
        @PlainSQL
        Statement parseStatement​(java.lang.String sql,
                                 java.lang.Object... bindings)
                          throws ParserException
        Parse a SQL string with bind variables to a procedural statement.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseStatements

        @Support
        @PlainSQL
        @Pro
        Block parseStatements​(java.lang.String sql,
                              java.lang.Object... bindings)
                       throws ParserException
        Parse a SQL string with bind variables to a set of procedural statements.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseResultQuery

        @Support
        @PlainSQL
        ResultQuery<?> parseResultQuery​(java.lang.String sql,
                                        java.lang.Object... bindings)
                                 throws ParserException
        Parse a SQL string with bind variables to a result query.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseSelect

        @Support
        @PlainSQL
        Select<?> parseSelect​(java.lang.String sql,
                              java.lang.Object... bindings)
                       throws ParserException
        Parse a SQL string to a select statement.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseTable

        @Support
        @PlainSQL
        Table<?> parseTable​(java.lang.String sql,
                            java.lang.Object... bindings)
                     throws ParserException
        Parse a SQL string with bind variables to a table.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseField

        @Support
        @PlainSQL
        Field<?> parseField​(java.lang.String sql,
                            java.lang.Object... bindings)
                     throws ParserException
        Parse a SQL string with bind variables to a field.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseRow

        @Support
        @PlainSQL
        Row parseRow​(java.lang.String sql,
                     java.lang.Object... bindings)
              throws ParserException
        Parse a SQL string with bind variables to a row.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseCondition

        @Support
        @PlainSQL
        Condition parseCondition​(java.lang.String sql,
                                 java.lang.Object... bindings)
                          throws ParserException
        Parse a SQL string with bind variables to a condition.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.
      • parseName

        @Support
        @PlainSQL
        Name parseName​(java.lang.String sql,
                       java.lang.Object... bindings)
                throws ParserException
        Parse a SQL string with bind variables to a name.
        Parameters:
        sql - The SQL string
        bindings - The bind variables
        Throws:
        ParserException - If the SQL string could not be parsed.