# TernaryNode

Represents a ternary condition in the AST, with a value for when the condition is true and another value for when the condition is false

****

- Since [5.1.0](https://github.com/getkirby/kirby/releases/tag/5.1.0)
- Full class name: `Kirby\Query\AST\TernaryNode`
- Source: <https://github.com/getkirby/kirby/tree/5.5.3/src/Query/AST/TernaryNode.php#L19>

<unstable-notice>
`TernaryNode` has been **marked as unstable**. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.
</unstable-notice>

****

### TernaryNode

- [new TernaryNode()](https://getkirby.com/docs/reference/objects/query-ast/ternary-node/__construct.md)
- [$ternaryNode->resolve()](https://getkirby.com/docs/reference/objects/query-ast/ternary-node/resolve.md)