Annotation Interface SqlQuery


@Target(METHOD) @Retention(RUNTIME) public @interface SqlQuery

Annotates a DAO method to mark it as a query that returns results. Typically, a SELECT, but could be an update with a RETURNING clause.

Exactly one of the 'value' or 'sql' parameters must be set, and will contain the SQL statement.

The method parameters and return types must be "supported types" TODO link The method parameter names must match placeholder names in the SQL statement, unless a method parameter is a Record, in which case record component names may match placeholder names.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
     
     
    Alias for "sql"
  • Element Details

    • value

      @Language("SQL") String value
      Alias for "sql"
      Default:
      ""
    • sql

      @Language("SQL") String sql
      Default:
      ""
    • fetchSize

      int fetchSize
      Default:
      -2147483648