Annotation Interface LazySQLUpsert


@Documented @Target(METHOD) @Retention(SOURCE) public @interface LazySQLUpsert
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The keys which are used to compare which rows should be updated (those are not updated obviously, but inserted if no match was found
    The table where you want to update/insert
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the method in the LazyDb class.
    If specified, only the fields specified are updated (still everything is inserted).
    The params of the method.
    boolean
    If true (default) we use a single object containing all properties as input (with typesafe builder).
  • Element Details

    • table

      String table
      The table where you want to update/insert
      Returns:
    • keys

      String[] keys
      The keys which are used to compare which rows should be updated (those are not updated obviously, but inserted if no match was found
      Returns:
    • params

      String[] params
      The params of the method. Corresponds to the columns in the table, default to the method parameters
      Returns:
      Default:
      {""}
    • useObjectAsInput

      boolean useObjectAsInput
      If true (default) we use a single object containing all properties as input (with typesafe builder). If set to false, the parameters are normal method parameters
      Returns:
      Default:
      true
    • onlyUpdate

      String[] onlyUpdate
      If specified, only the fields specified are updated (still everything is inserted). If empty everything is updated (except for the keys).
      Returns:
      Default:
      {""}
    • methodName

      String methodName
      The name of the method in the LazyDb class. Defaults to the annotated method.
      Returns:
      Default:
      ""