---
name: "Attean::API::Plan"
section: "3pm"
platform: "linux"
package: "libattean-perl"
version: "0.035-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Attean::API::Plan"
---

# Attean::API::Plan(3pm)

Query plan

## NAME

Attean::API::Plan - Query plan

## VERSION

This document describes Attean::API::Plan version 0.035

## DESCRIPTION

The Attean::API::Plan role defines a common API for all query plans.

## ATTRIBUTES

- "cost"

  - "distinct"

  - "item\_type"

  - "in\_scope\_variables"

  - "ordered"

  ## REQUIRED METHODS

The following methods are required by the Attean::API::Plan role:

- impl( $model )

  Returns a code reference that when called (without arguments), returns an Attean::API::Iterator object.

## METHODS

- "has\_cost"

  - "as\_string"

  Returns a tree-structured string representation of this plan, including children.

- evaluate( $model )

  Evaluates this plan and returns the resulting iterator.

- in\_scope\_variables\_union( @plans )

  Returns the set union of `"in_scope_variables"` of the given plan objects.

- subplans\_of\_type\_are\_variable\_connected( $type )

  Returns true if the subpatterns of the given `$type` are all connected through their `"in_scope_variables"`, false otherwise (implying a cartesian product if the connecting plans perform some form of join.

- children\_are\_variable\_connected( $type )

  Returns true if the children of this plan are all connected through their `"in_scope_variables"`, false otherwise (implying a cartesian product if this plan performs some form of join.

## BUGS

Please report any bugs or feature requests to through the GitHub web interface at \<https://github.com/kasei/attean/issues\>.

## SEE ALSO

## AUTHOR

Gregory Todd Williams  `"<gwilliams@cpan.org>"`

## COPYRIGHT

Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
