# GetTaxonomyNodeChildren

## Overview

GetTaxonomyNodeChildren retrieves the direct child nodes of a given taxonomy node. Used as a guard check before node deletion to enforce the constraint that only leaf nodes can be deleted.

## Business Rules

- Searches TaxonomyNode table for records with parentId matching the given node ID
- Returns all matching child node records as an array
- Returns an empty array if the node has no children (is a leaf node)

## Process Flow

```mermaid
flowchart TD
    A[Receive parentId] --> B[SELECT from TaxonomyNode where parentId = input]
    B --> C{Children found?}
    C -->|Yes| D[Return child records]
    C -->|No| E[Return empty array]
```

## External Dependencies

- None

## Error Scenarios

- **NO_CHILDREN**: No child nodes exist for the given parent — caller receives empty array

## Test Cases

- returns children when found
- returns multiple children
- returns empty array when no children
