Package: org.apache.groovy.ginq

## [Groovy] Class GinqGroovyMethods

- org.apache.groovy.ginq.GinqGroovyMethods

-     @CompileStatic
      class GinqGroovyMethods
      extends Object

  Declare GINQ macro methods

  Since:
    4.0.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static List<String>` | `CONF_LIST` | Supported GINQ configuration keys.
    `static String` | `CONF_PARALLEL` | Configuration key enabling parallel execution.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static Expression` | `GQ(MacroContext ctx, ClosureExpression ginqClosureExpression)` Transform GINQ code to target method invocation
    `` | `static Expression` | `GQ(MacroContext ctx, MapExpression ginqConfigurationMapExpression, ClosureExpression ginqClosureExpression)` Transform GINQ code to target method invocation
    `` | `static Expression` | `GQL(MacroContext ctx, ClosureExpression ginqClosureExpression)` Represents the abbreviation of `GQ {...}.toList()`, which is very useful when used as list comprehension
    `` | `static Expression` | `GQL(MacroContext ctx, MapExpression ginqConfigurationMapExpression, ClosureExpression ginqClosureExpression)` Represents the abbreviation of `GQ {...}.toList()`, which is very useful when used as list comprehension
    `` | `static Expression` | `transformGinqCode(SourceUnit sourceUnit, MapExpression ginqConfigurationMapExpression, Statement code)` Transforms parsed GINQ code into the corresponding queryable method calls.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### public static final List<String> CONF_LIST

      Supported GINQ configuration keys.

    - #### public static final String CONF_PARALLEL

      Configuration key enabling parallel execution.

  - ### Method Detail

    - #### @Macro
      static Expression GQ(MacroContext ctx, ClosureExpression ginqClosureExpression)

      Transform GINQ code to target method invocation

      Parameters:
        `ctx` - the macro context
        `ginqClosureExpression` - hold the GINQ code
      Returns:
        target method invocation
      Since:
        4.0.0

    - #### @Macro
      static Expression GQ(MacroContext ctx, MapExpression ginqConfigurationMapExpression, ClosureExpression ginqClosureExpression)

      Transform GINQ code to target method invocation

      Parameters:
        `ctx` - the macro context
        `ginqConfigurationMapExpression` - specify the configuration for GINQ, e.g. `astWalker`, `optimize`, `parallel`
        `ginqClosureExpression` - hold the GINQ code
      Returns:
        target method invocation
      Since:
        4.0.0

    - #### @Macro
      static Expression GQL(MacroContext ctx, ClosureExpression ginqClosureExpression)

      Represents the abbreviation of `GQ {...}.toList()`, which is very useful when used as list comprehension

      Parameters:
        `ctx` - the macro context
        `ginqClosureExpression` - hold the GINQ code
      Returns:
        target method invocation
      Since:
        4.0.0

    - #### @Macro
      static Expression GQL(MacroContext ctx, MapExpression ginqConfigurationMapExpression, ClosureExpression ginqClosureExpression)

      Represents the abbreviation of `GQ {...}.toList()`, which is very useful when used as list comprehension

      Parameters:
        `ctx` - the macro context
        `ginqConfigurationMapExpression` - specify the configuration for GINQ, e.g. `astWalker`, `optimize`, `parallel`
        `ginqClosureExpression` - hold the GINQ code
      Returns:
        target method invocation
      Since:
        4.0.0

    - #### static Expression transformGinqCode(SourceUnit sourceUnit, MapExpression ginqConfigurationMapExpression, Statement code)

      Transforms parsed GINQ code into the corresponding queryable method calls.

      Parameters:
        `sourceUnit` - the source unit owning the code
        `ginqConfigurationMapExpression` - the optional GINQ configuration
        `code` - the GINQ code block
      Returns:
        the transformed expression