Annotation Interface SqlName


Annotation to facilitate mapping from a result set row to a pojo through the SafeSql.query(java.sql.Connection, Class) method and friends.

For records, you can use it to annotate a constructor parameter's name to match the corresponding result set column name from a SQL query, although, if you can enable the javac -parameters flag, you likely do not need this annotation.

For Java beans, you can annotate a setter method when the property name doesn't otherwise match the result set column name.

Since:
8.7
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name to fetch the corresponding value from a ResultSet.
  • Element Details

    • value

      String value
      The name to fetch the corresponding value from a ResultSet.

      Case (camelCase, snake_case etc.) doesn't matter.