Annotation Interface SQLAction


Annotation that supplies verbatim commands to be copied into the deployment descriptor.

Strings supplied to install or remove within a single SQLAction annotation become code snippets emitted into the deployment descriptor's INSTALL or REMOVE section, respectively, in the order supplied.

Snippets from different SQLAction annotations, and snippets generated by annotations on functions, types, and such, will be assembled in an order that can be influenced by provides and requires labels. No snippet X will be emitted as an INSTALL action ahead of any snippets that provide what X requires. The sense of that dependency is reversed when ordering REMOVE snippets.

Conditional execution

An SQLAction may supply an install snippet that tests some condition at the time of deployment and adjusts the pljava.implementors setting to include or not include a specific <implementor name>, controlling whether actions later in the deployment descriptor that are annotated with that <implementor name> will be executed. The SQLAction that controls whether an <implementor name> will be recognized should use provides with exactly that name, which is implicitly 'required' by statements that use that name as implementor. For details on this usage, which involves a different ordering rule, see "conditional execution" in the package documentation.

Author:
Thomas Hallgren - pre-Java6 version, Chapman Flack (Purdue Mathematics) - updated to Java6, added SQLAction
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The <implementor name> to be used around SQL code generated here.
    SQL commands to be included in a BEGIN INSTALL group (each string considered a separate command to which a semicolon will be added).
    One or more arbitrary labels that will be considered 'provided' by the object carrying this annotation.
    SQL commands to be included in a BEGIN REMOVE group (each string considered a separate command to which a semicolon will be added).
    One or more arbitrary labels that will be considered 'required' by the object carrying this annotation.
  • Element Details

    • install

      String[] install
      SQL commands to be included in a BEGIN INSTALL group (each string considered a separate command to which a semicolon will be added).
      Default:
      {}
    • remove

      String[] remove
      SQL commands to be included in a BEGIN REMOVE group (each string considered a separate command to which a semicolon will be added).
      Default:
      {}
    • provides

      String[] provides
      One or more arbitrary labels that will be considered 'provided' by the object carrying this annotation. The deployment descriptor will be generated in such an order that other objects that 'require' labels 'provided' by this come later in the output for install actions, and earlier for remove actions.

      For use of this element on an SQLAction that tests a condition to control conditional execution, see "conditional execution" in the class description.

      Default:
      {}
    • requires

      String[] requires
      One or more arbitrary labels that will be considered 'required' by the object carrying this annotation. The deployment descriptor will be generated in such an order that other objects that 'provide' labels 'required' by this come earlier in the output for install actions, and later for remove actions.
      Default:
      {}
    • implementor

      String implementor
      The <implementor name> to be used around SQL code generated here. Defaults to PostgreSQL. Set explicitly to "" to emit code not wrapped in an <implementor block>.
      Default:
      ""