Class SqlStatement

java.lang.Object
org.apache.juneau.beanquery.sql.SqlStatement

public final class SqlStatement extends Object
A fully-rendered SQL statement: the text (with ? placeholders) plus its ordered bind values, and the selected column names in SELECT order.

SqlBeanQueryContext renders these purely (no DataSource needed), so callers — and tests — can inspect the generated SQL and binds before any execution.

Since:
10.0.0
  • Method Details

    • sql

      public String sql()
      The SQL text, with a ? placeholder for each bind value.
      Returns:
      The SQL text.
    • binds

      public List<Object> binds()
      The bind values in placeholder order.
      Returns:
      An unmodifiable list of bind values.
    • columns

      public List<String> columns()
      The selected column names in SELECT order (empty for a COUNT statement).
      Returns:
      An unmodifiable list of column names.
    • toString

      public String toString()
      Overrides:
      toString in class Object